Skip to content

Commit a3d215b

Browse files
GraphQLError-test: merge check of source with rest of the properties (#3324)
1 parent cd35c99 commit a3d215b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/error/__tests__/GraphQLError-test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ describe('GraphQLError', () => {
7272

7373
it('converts nodes to positions and locations', () => {
7474
const e = new GraphQLError('msg', [fieldNode]);
75-
expect(e).to.have.property('source', source);
7675
expect(e).to.deep.include({
76+
source,
7777
nodes: [fieldNode],
7878
positions: [4],
7979
locations: [{ line: 2, column: 3 }],
@@ -82,8 +82,8 @@ describe('GraphQLError', () => {
8282

8383
it('converts single node to positions and locations', () => {
8484
const e = new GraphQLError('msg', fieldNode); // Non-array value.
85-
expect(e).to.have.property('source', source);
8685
expect(e).to.deep.include({
86+
source,
8787
nodes: [fieldNode],
8888
positions: [4],
8989
locations: [{ line: 2, column: 3 }],
@@ -92,8 +92,8 @@ describe('GraphQLError', () => {
9292

9393
it('converts node with loc.start === 0 to positions and locations', () => {
9494
const e = new GraphQLError('msg', operationNode);
95-
expect(e).to.have.property('source', source);
9695
expect(e).to.deep.include({
96+
source,
9797
nodes: [operationNode],
9898
positions: [0],
9999
locations: [{ line: 1, column: 1 }],
@@ -102,8 +102,8 @@ describe('GraphQLError', () => {
102102

103103
it('converts source and positions to locations', () => {
104104
const e = new GraphQLError('msg', null, source, [6]);
105-
expect(e).to.have.property('source', source);
106105
expect(e).to.deep.include({
106+
source,
107107
nodes: undefined,
108108
positions: [6],
109109
locations: [{ line: 2, column: 5 }],

0 commit comments

Comments
 (0)