use internal fetch function of node instead external node-fetch library if node version >= v18

This commit is contained in:
Karsten Hassel
2022-05-27 19:46:28 +02:00
parent cbda20f67e
commit 0023c64d59
23 changed files with 69 additions and 46 deletions

View File

@@ -1,4 +1,4 @@
const fetch = require("node-fetch");
const fetch = require("fetch");
const helpers = require("./global-setup");
describe("ipWhitelist directive configuration", function () {
@@ -6,8 +6,8 @@ describe("ipWhitelist directive configuration", function () {
beforeAll(function () {
helpers.startApplication("tests/configs/noIpWhiteList.js");
});
afterAll(function () {
helpers.stopApplication();
afterAll(async function () {
await helpers.stopApplication();
});
it("should return 403", function (done) {
@@ -22,8 +22,8 @@ describe("ipWhitelist directive configuration", function () {
beforeAll(function () {
helpers.startApplication("tests/configs/empty_ipWhiteList.js");
});
afterAll(function () {
helpers.stopApplication();
afterAll(async function () {
await helpers.stopApplication();
});
it("should return 200", function (done) {