diff --git a/spec/ParseGraphQLServer.spec.js b/spec/ParseGraphQLServer.spec.js index 7ed1714d3c..3802f9e9be 100644 --- a/spec/ParseGraphQLServer.spec.js +++ b/spec/ParseGraphQLServer.spec.js @@ -36,6 +36,8 @@ const { ParseGraphQLServer } = require('../lib/GraphQL/ParseGraphQLServer'); const { ReadPreference, Collection } = require('mongodb'); const { v4: uuidv4 } = require('uuid'); +const testAgent = new http.Agent(); + function handleError(e) { if (e && e.networkError && e.networkError.result && e.networkError.result.errors) { fail(e.networkError.result.errors); @@ -6872,6 +6874,7 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, + agent: testAgent, }); expect(res.status).toEqual(200); @@ -9335,6 +9338,7 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, + agent: testAgent, }); expect(res.status).toEqual(200); @@ -9447,6 +9451,7 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body: body2, + agent: testAgent, }); expect(res.status).toEqual(200); const result2 = JSON.parse(await res.text()); @@ -9639,6 +9644,7 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, + agent: testAgent, }); expect(res.status).toEqual(200); const result = await res.json(); @@ -9692,6 +9698,7 @@ describe('ParseGraphQLServer', () => { method: 'POST', headers, body, + agent: testAgent, }); const result = JSON.parse(await res.text());