Skip to content

Commit

Permalink
Update WPT
Browse files Browse the repository at this point in the history
This now includes /common/gc.js.

Also remove /test/tests/resources/, since it wasn't actually being used.
  • Loading branch information
MattiasBuelens authored Apr 5, 2023
1 parent f420d03 commit d9c8a38
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/test/tests/resources/
/common/
/testharness/
/wpt/
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/node_modules/
/npm-debug.log
/common/
/testharness/
/test/tests/resources/
6 changes: 6 additions & 0 deletions lib/wpt-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const { AnyHtmlHandler, WindowHandler } = require("./internal/serve.js");
const testharnessPath = path.resolve(__dirname, "../testharness/testharness.js");
const idlharnessPath = path.resolve(__dirname, "../testharness/idlharness.js");
const webidl2jsPath = path.resolve(__dirname, "../testharness/webidl2/lib/webidl2.js");
const gcPath = path.resolve(__dirname, "../common/gc.js");
const testdriverDummyPath = path.resolve(__dirname, "./testdriver-dummy.js");

module.exports = (testsPath, {
Expand Down Expand Up @@ -95,6 +96,11 @@ function setupServer(testsPath, rootURL) {
break;
}

case "/common/gc.js": {
fs.createReadStream(gcPath).pipe(res);
break;
}

case "/service-workers/service-worker/resources/test-helpers.sub.js": {
res.end("window.service_worker_test = () => {};");
break;
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"files": [
"lib/",
"bin/",
"common/",
"testharness/"
],
"scripts": {
"test": "node test/runner.js",
"lint": "eslint .",
"prepare": "npm run copy-testharness",
"pretest": "npm run copy-resources",
"prepare": "npm run copy-testharness && npm run copy-common",
"copy-testharness": "copyfiles -u 2 wpt/resources/testharness.js wpt/resources/idlharness.js wpt/resources/webidl2/lib/webidl2.js testharness/",
"copy-resources": "copyfiles -u 2 wpt/resources/testharness.js test/tests/resources/"
"copy-common": "copyfiles -u 2 wpt/common/gc.js common/"
},
"engines": {
"node": ">= 16"
Expand Down
2 changes: 1 addition & 1 deletion wpt
Submodule wpt updated 18274 files

0 comments on commit d9c8a38

Please sign in to comment.