Skip to content

Commit

Permalink
Roll tests
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Dec 4, 2024
1 parent 8c0f670 commit 30dbc98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/get-latest-platform-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const path = require("path");
// 1. Go to https://github.com/web-platform-tests/wpt/tree/master/url
// 2. Press "y" on your keyboard to get a permalink
// 3. Copy the commit hash
const commitHash = "48178346fe87222856812842fb7af7b01baa1530";
const commitHash = "a9fe2e77b64b0ce9aefb2ed4331c52bfa44fced4";

const urlPrefix = `https://raw.githubusercontent.com/web-platform-tests/wpt/${commitHash}/url/`;
const targetDir = path.resolve(__dirname, "..", "test", "web-platform-tests");
Expand All @@ -24,6 +24,7 @@ const resources = [
"resources/setters_tests.json",
"resources/toascii.json",
"resources/urltestdata.json",
"resources/urltestdata-javascript-only.json",
"resources/IdnaTestV2.json"
];

Expand Down
3 changes: 3 additions & 0 deletions test/web-platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const { URL, URLSearchParams } = require("..");

const idnaTestV2Data = require("./web-platform-tests/resources/IdnaTestV2.json");
const urlTestData = require("./web-platform-tests/resources/urltestdata.json");
const urlTestDataJavaScriptOnly = require("./web-platform-tests/resources/urltestdata-javascript-only.json");
const settersData = require("./web-platform-tests/resources/setters_tests.json");
const percentEncodingData = require("./web-platform-tests/resources/percent-encoding.json");
const toASCIIData = require("./web-platform-tests/resources/toascii.json");
Expand Down Expand Up @@ -42,10 +43,12 @@ describe("Data file-based web platform tests", () => {

runWPT("url-constructor.any.js", sandbox => {
sandbox.runURLTests(urlTestData);
sandbox.runURLTests(urlTestDataJavaScriptOnly);
});

runWPT("url-origin.any.js", sandbox => {
sandbox.runURLTests(urlTestData);
sandbox.runURLTests(urlTestDataJavaScriptOnly);
});

runWPT("url-setters.any.js", sandbox => {
Expand Down

0 comments on commit 30dbc98

Please sign in to comment.