From 52ca115c71bad4f95e0ea95d465deb9a89e8d82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 6 Mar 2021 11:05:22 +0100 Subject: [PATCH] test: fix WPT URL tests that fetch JSON data PR-URL: https://github.com/nodejs/node/pull/37624 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott --- test/common/wpt.js | 2 +- test/common/wpt/worker.js | 2 +- test/wpt/status/url.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/wpt.js b/test/common/wpt.js index 87d7fcf204d..137ea59e0e6 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -366,7 +366,7 @@ class WPTRunner { const worker = new Worker(workerPath, { execArgv: this.flags, workerData: { - filename: testFileName, + testRelativePath: relativePath, wptRunner: __filename, wptPath: this.path, initScript: this.initScript, diff --git a/test/common/wpt/worker.js b/test/common/wpt/worker.js index f0faeeba9e8..afaee075f7a 100644 --- a/test/common/wpt/worker.js +++ b/test/common/wpt/worker.js @@ -18,7 +18,7 @@ global.require = require; // in Node.js, but some tests and harness depend on this to pull // resources. global.fetch = function fetch(file) { - return resource.read(workerData.filename, file, true); + return resource.read(workerData.testRelativePath, file, true); }; if (workerData.initScript) { diff --git a/test/wpt/status/url.json b/test/wpt/status/url.json index 36b3fd682b3..f70bdd5c5cf 100644 --- a/test/wpt/status/url.json +++ b/test/wpt/status/url.json @@ -20,9 +20,9 @@ "fail": "FormData is not defined" }, "url-constructor.any.js": { - "fail": "TODO: support relative fetch()" + "requires": ["small-icu"] }, "url-origin.any.js": { - "fail": "TODO: support relative fetch()" + "requires": ["small-icu"] } }