mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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:
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user