8
8
import { expect } from 'chai' ;
9
9
import { describe , it } from 'mocha' ;
10
10
import {
11
- graphql ,
11
+ graphqlSync ,
12
12
GraphQLSchema ,
13
13
GraphQLObjectType ,
14
14
GraphQLInterfaceType ,
@@ -39,7 +39,7 @@ class Human {
39
39
}
40
40
41
41
describe ( 'Execute: Handles execution of abstract types' , ( ) => {
42
- it ( 'isTypeOf used to resolve runtime type for Interface' , async ( ) => {
42
+ it ( 'isTypeOf used to resolve runtime type for Interface' , ( ) => {
43
43
const PetType = new GraphQLInterfaceType ( {
44
44
name : 'Pet' ,
45
45
fields : {
@@ -94,7 +94,7 @@ describe('Execute: Handles execution of abstract types', () => {
94
94
}
95
95
}` ;
96
96
97
- const result = await graphql ( schema , query ) ;
97
+ const result = graphqlSync ( schema , query ) ;
98
98
99
99
expect ( result ) . to . deep . equal ( {
100
100
data : {
@@ -112,7 +112,7 @@ describe('Execute: Handles execution of abstract types', () => {
112
112
} ) ;
113
113
} ) ;
114
114
115
- it ( 'isTypeOf used to resolve runtime type for Union' , async ( ) => {
115
+ it ( 'isTypeOf used to resolve runtime type for Union' , ( ) => {
116
116
const DogType = new GraphQLObjectType ( {
117
117
name : 'Dog' ,
118
118
isTypeOf : obj => obj instanceof Dog ,
@@ -163,7 +163,7 @@ describe('Execute: Handles execution of abstract types', () => {
163
163
}
164
164
}` ;
165
165
166
- const result = await graphql ( schema , query ) ;
166
+ const result = graphqlSync ( schema , query ) ;
167
167
168
168
expect ( result ) . to . deep . equal ( {
169
169
data : {
@@ -181,7 +181,7 @@ describe('Execute: Handles execution of abstract types', () => {
181
181
} ) ;
182
182
} ) ;
183
183
184
- it ( 'resolveType on Interface yields useful error' , async ( ) => {
184
+ it ( 'resolveType on Interface yields useful error' , ( ) => {
185
185
const PetType = new GraphQLInterfaceType ( {
186
186
name : 'Pet' ,
187
187
resolveType ( obj ) {
@@ -252,9 +252,9 @@ describe('Execute: Handles execution of abstract types', () => {
252
252
}
253
253
}` ;
254
254
255
- const result = await graphql ( schema , query ) ;
255
+ const result = graphqlSync ( schema , query ) ;
256
256
257
- expect ( result ) . to . jsonEqual ( {
257
+ expect ( result ) . to . deep . equal ( {
258
258
data : {
259
259
pets : [
260
260
{
@@ -279,7 +279,7 @@ describe('Execute: Handles execution of abstract types', () => {
279
279
} ) ;
280
280
} ) ;
281
281
282
- it ( 'resolveType on Union yields useful error' , async ( ) => {
282
+ it ( 'resolveType on Union yields useful error' , ( ) => {
283
283
const HumanType = new GraphQLObjectType ( {
284
284
name : 'Human' ,
285
285
fields : {
@@ -346,9 +346,9 @@ describe('Execute: Handles execution of abstract types', () => {
346
346
}
347
347
}` ;
348
348
349
- const result = await graphql ( schema , query ) ;
349
+ const result = graphqlSync ( schema , query ) ;
350
350
351
- expect ( result ) . to . jsonEqual ( {
351
+ expect ( result ) . to . deep . equal ( {
352
352
data : {
353
353
pets : [
354
354
{
@@ -373,7 +373,7 @@ describe('Execute: Handles execution of abstract types', () => {
373
373
} ) ;
374
374
} ) ;
375
375
376
- it ( 'resolveType allows resolving with type name' , async ( ) => {
376
+ it ( 'resolveType allows resolving with type name' , ( ) => {
377
377
const PetType = new GraphQLInterfaceType ( {
378
378
name : 'Pet' ,
379
379
resolveType ( obj ) {
@@ -429,9 +429,9 @@ describe('Execute: Handles execution of abstract types', () => {
429
429
}
430
430
}` ;
431
431
432
- const result = await graphql ( schema , query ) ;
432
+ const result = graphqlSync ( schema , query ) ;
433
433
434
- expect ( result ) . to . jsonEqual ( {
434
+ expect ( result ) . to . deep . equal ( {
435
435
data : {
436
436
pets : [
437
437
{
0 commit comments