test: fix WPT URL tests that fetch JSON data

PR-URL: https://github.com/nodejs/node/pull/37624
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Michaël Zasso committed 2021-03-09 08:22:21 +01:00
1 parent 7f54dd4f07
commit 52ca115c71
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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"]
}
}