mirror of
https://github.com/parse-community/parse-server
synced 2026-08-09 13:03:18 +00:00
test: Fix socket hang up in node-fetch 3.3.2 fails tests (#10443)
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
const http = require('http');
|
||||
const express = require('express');
|
||||
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
|
||||
const fetch = (...args) =>
|
||||
import('node-fetch').then(({ default: fetch }) => {
|
||||
const [url, options = {}] = args;
|
||||
return fetch(url, { agent: new http.Agent({ keepAlive: false }), ...options });
|
||||
});
|
||||
require('./helper');
|
||||
const { ParseGraphQLServer } = require('../lib/GraphQL/ParseGraphQLServer');
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
const http = require('http');
|
||||
const express = require('express');
|
||||
const req = require('../lib/request');
|
||||
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
|
||||
const fetch = (...args) =>
|
||||
import('node-fetch').then(({ default: fetch }) => {
|
||||
const [url, options = {}] = args;
|
||||
return fetch(url, { agent: new http.Agent({ keepAlive: false }), ...options });
|
||||
});
|
||||
const FormData = require('form-data');
|
||||
require('./helper');
|
||||
const { updateCLP } = require('./support/dev');
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
const http = require('http');
|
||||
const express = require('express');
|
||||
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
|
||||
const fetch = (...args) =>
|
||||
import('node-fetch').then(({ default: fetch }) => {
|
||||
const [url, options = {}] = args;
|
||||
return fetch(url, { agent: new http.Agent({ keepAlive: false }), ...options });
|
||||
});
|
||||
const ws = require('ws');
|
||||
const request = require('../lib/request');
|
||||
const Config = require('../lib/Config');
|
||||
|
||||
Reference in New Issue
Block a user