@@ -36,6 +36,8 @@ const { ParseGraphQLServer } = require('../lib/GraphQL/ParseGraphQLServer');
36
36
const { ReadPreference, Collection } = require ( 'mongodb' ) ;
37
37
const { v4 : uuidv4 } = require ( 'uuid' ) ;
38
38
39
+ const testAgent = new http . Agent ( ) ;
40
+
39
41
function handleError ( e ) {
40
42
if ( e && e . networkError && e . networkError . result && e . networkError . result . errors ) {
41
43
fail ( e . networkError . result . errors ) ;
@@ -6872,6 +6874,7 @@ describe('ParseGraphQLServer', () => {
6872
6874
method : 'POST' ,
6873
6875
headers,
6874
6876
body,
6877
+ agent : testAgent ,
6875
6878
} ) ;
6876
6879
6877
6880
expect ( res . status ) . toEqual ( 200 ) ;
@@ -9335,6 +9338,7 @@ describe('ParseGraphQLServer', () => {
9335
9338
method : 'POST' ,
9336
9339
headers,
9337
9340
body,
9341
+ agent : testAgent ,
9338
9342
} ) ;
9339
9343
9340
9344
expect ( res . status ) . toEqual ( 200 ) ;
@@ -9447,6 +9451,7 @@ describe('ParseGraphQLServer', () => {
9447
9451
method : 'POST' ,
9448
9452
headers,
9449
9453
body : body2 ,
9454
+ agent : testAgent ,
9450
9455
} ) ;
9451
9456
expect ( res . status ) . toEqual ( 200 ) ;
9452
9457
const result2 = JSON . parse ( await res . text ( ) ) ;
@@ -9639,6 +9644,7 @@ describe('ParseGraphQLServer', () => {
9639
9644
method : 'POST' ,
9640
9645
headers,
9641
9646
body,
9647
+ agent : testAgent ,
9642
9648
} ) ;
9643
9649
expect ( res . status ) . toEqual ( 200 ) ;
9644
9650
const result = await res . json ( ) ;
@@ -9692,6 +9698,7 @@ describe('ParseGraphQLServer', () => {
9692
9698
method : 'POST' ,
9693
9699
headers,
9694
9700
body,
9701
+ agent : testAgent ,
9695
9702
} ) ;
9696
9703
9697
9704
const result = JSON . parse ( await res . text ( ) ) ;
0 commit comments