Skip to content

Commit a982330

Browse files
committed
fix: fixed test-case to run in older node versions and ran prettier
1 parent 1219dec commit a982330

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/execution/__tests__/variables-test.ts

+9-10
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const TestFaultyScalarGraphQLError = new GraphQLError(
3232
'FaultyScalarErrorMessage',
3333
{
3434
extensions: {
35-
code: 'FaultyScalarErrorExtensionCode'
36-
}
37-
}
35+
code: 'FaultyScalarErrorExtensionCode',
36+
},
37+
},
3838
);
3939

4040
const TestFaultyScalar = new GraphQLScalarType({
@@ -66,7 +66,7 @@ const TestInputObject = new GraphQLInputObjectType({
6666
b: { type: new GraphQLList(GraphQLString) },
6767
c: { type: new GraphQLNonNull(GraphQLString) },
6868
d: { type: TestComplexScalar },
69-
e: { type: TestFaultyScalar }
69+
e: { type: TestFaultyScalar },
7070
},
7171
});
7272

@@ -268,7 +268,6 @@ describe('Execute: Handles inputs', () => {
268268
},
269269
],
270270
});
271-
272271
});
273272
});
274273

@@ -415,15 +414,15 @@ describe('Execute: Handles inputs', () => {
415414
const params = { input: { c: 'foo', e: 'SerializedValue' } };
416415
const result = executeQuery(doc, params);
417416

418-
expect(result.errors?.at(0)?.originalError).to.equal(TestFaultyScalarGraphQLError);
419417
expectJSON(result).toDeepEqual({
420418
errors: [
421419
{
422-
message: 'Variable "$input" got invalid value "SerializedValue" at "input.e"; FaultyScalarErrorMessage',
420+
message:
421+
'Variable "$input" got invalid value "SerializedValue" at "input.e"; FaultyScalarErrorMessage',
423422
locations: [{ line: 2, column: 16 }],
424-
extensions: { code: 'FaultyScalarErrorExtensionCode' }
425-
}
426-
]
423+
extensions: { code: 'FaultyScalarErrorExtensionCode' },
424+
},
425+
],
427426
});
428427
});
429428

0 commit comments

Comments
 (0)