From 542b1ea3a865a282d8f1cd862e5d186bdb471f42 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Fri, 11 Aug 2023 10:06:18 -0300 Subject: [PATCH] solving appveyor issue --- tools/tests/apps/dynamic-import/tests.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/tests/apps/dynamic-import/tests.js b/tools/tests/apps/dynamic-import/tests.js index 3dd68d24ee..7280cf5ed7 100644 --- a/tools/tests/apps/dynamic-import/tests.js +++ b/tools/tests/apps/dynamic-import/tests.js @@ -15,7 +15,14 @@ describe("dynamic import(...)", function () { maybeClearDynamicImportCache(); it("ignores bad __meteor__/dynamic-import/fetch requests (#10147)", function () { - return fetch(Meteor.absoluteUrl("/__meteor__/dynamic-import/fetch"), { + // using localhost gives an issue on Windows + // https://github.com/node-fetch/node-fetch/issues/1624 + // will replace with localhost once the issue is resolved + // workaround is to use 127.0.0.1 instead of localhost + const localhost = Meteor.absoluteUrl("/__meteor__/dynamic-import/fetch", { + replaceLocalhost: true // https://docs.meteor.com/api/core.html#Meteor-absoluteUrl + }); + return fetch(localhost, { // POST request with empty body. method: "POST" }).then(async (res) => {