Skip to content

Commit 72a1278

Browse files
committed
minor edits:
Signed-off-by: asararatnakar <[email protected]>
1 parent a2911a4 commit 72a1278

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

transforms/setters/requests.graphql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ query CustomerByID($id: ID!) {
33
customerByID(id: $id) {
44
cAddress {
55
city
6-
country
76
state
8-
street
9-
postalCode
7+
country
108
}
119
cId
1210
cName

transforms/setters/tests/Test.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const fs = require('fs');
1+
const fs = require("fs");
22
const path = require("node:path");
33
const {
44
deployAndRun,
@@ -8,51 +8,45 @@ const {
88

99
testDescription = getTestDescription("snippets", __dirname);
1010

11-
const requestsFile = path.join(path.dirname(__dirname), 'requests.graphql');
12-
const requests = fs.readFileSync(requestsFile, 'utf8').toString();
11+
const requestsFile = path.join(path.dirname(__dirname), "requests.graphql");
12+
const requests = fs.readFileSync(requestsFile, "utf8").toString();
1313

1414
describe(testDescription, function () {
1515
const tests = [
1616
{
1717
label: "customer-by-id-1",
1818
query: requests,
19-
operationName: 'CustomerByID',
19+
operationName: "CustomerByID",
2020
variables: { id: 1 },
2121
expected: {
2222
customerByID: {
2323
cAddress: {
2424
city: "Raleigh",
2525
country: "USA",
2626
state: "NC",
27-
street: "101 Main St",
28-
postalCode: "54321"
2927
},
3028
cId: "12345",
31-
cName: "John Doe"
32-
33-
}
34-
}
29+
cName: "John Doe",
30+
},
31+
},
3532
},
3633
{
3734
label: "customer-by-id-100",
3835
query: requests,
39-
operationName: 'CustomerByID',
36+
operationName: "CustomerByID",
4037
variables: { id: 100 },
4138
expected: {
4239
customerByID: {
4340
cAddress: {
4441
city: "Hyderabad",
4542
country: "India",
4643
state: "TS",
47-
street: "J.N.T.U Colony",
48-
postalCode: "654231"
4944
},
5045
cId: "21345",
51-
cName: "Siddarth A"
52-
53-
}
54-
}
55-
}
56-
]
46+
cName: "Siddarth A",
47+
},
48+
},
49+
},
50+
];
5751
return deployAndRun(__dirname, tests, stepzen.admin);
5852
});

0 commit comments

Comments
 (0)