@@ -72,8 +72,8 @@ describe('GraphQLError', () => {
72
72
73
73
it ( 'converts nodes to positions and locations' , ( ) => {
74
74
const e = new GraphQLError ( 'msg' , [ fieldNode ] ) ;
75
- expect ( e ) . to . have . property ( 'source' , source ) ;
76
75
expect ( e ) . to . deep . include ( {
76
+ source,
77
77
nodes : [ fieldNode ] ,
78
78
positions : [ 4 ] ,
79
79
locations : [ { line : 2 , column : 3 } ] ,
@@ -82,8 +82,8 @@ describe('GraphQLError', () => {
82
82
83
83
it ( 'converts single node to positions and locations' , ( ) => {
84
84
const e = new GraphQLError ( 'msg' , fieldNode ) ; // Non-array value.
85
- expect ( e ) . to . have . property ( 'source' , source ) ;
86
85
expect ( e ) . to . deep . include ( {
86
+ source,
87
87
nodes : [ fieldNode ] ,
88
88
positions : [ 4 ] ,
89
89
locations : [ { line : 2 , column : 3 } ] ,
@@ -92,8 +92,8 @@ describe('GraphQLError', () => {
92
92
93
93
it ( 'converts node with loc.start === 0 to positions and locations' , ( ) => {
94
94
const e = new GraphQLError ( 'msg' , operationNode ) ;
95
- expect ( e ) . to . have . property ( 'source' , source ) ;
96
95
expect ( e ) . to . deep . include ( {
96
+ source,
97
97
nodes : [ operationNode ] ,
98
98
positions : [ 0 ] ,
99
99
locations : [ { line : 1 , column : 1 } ] ,
@@ -102,8 +102,8 @@ describe('GraphQLError', () => {
102
102
103
103
it ( 'converts source and positions to locations' , ( ) => {
104
104
const e = new GraphQLError ( 'msg' , null , source , [ 6 ] ) ;
105
- expect ( e ) . to . have . property ( 'source' , source ) ;
106
105
expect ( e ) . to . deep . include ( {
106
+ source,
107
107
nodes : undefined ,
108
108
positions : [ 6 ] ,
109
109
locations : [ { line : 2 , column : 5 } ] ,
0 commit comments