diff options
author | Filip Skokan <panva.ip@gmail.com> | 2023-03-03 14:50:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 14:50:18 +0100 |
commit | 1b42ab46058c299c5ad219d836958e97e30577dd (patch) | |
tree | 31989efa7d33032bcd658503d7d0631d76e38d6f /tools | |
parent | 38555a6a0fe9a7235776afe0ebfb2a24dc518391 (diff) |
wpt: unlock nightly with --no-ignore (#17998)
When I was testing the code in #17892 I had updated expectations and
didn't catch this.
This PR fixes the the expectation file format to not be checked when
--no-ignore is passed during
[nightly](https://github.com/denoland/deno/actions/runs/4319520368/jobs/7538796572#step:9:46)
runs.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/wpt.ts | 14 | ||||
-rw-r--r-- | tools/wpt/utils.ts | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tools/wpt.ts b/tools/wpt.ts index 2b61682be..a216e84b0 100755 --- a/tools/wpt.ts +++ b/tools/wpt.ts @@ -249,8 +249,10 @@ async function generateWptReport( if (!case_.passed) { if (typeof test.expectation === "boolean") { expected = test.expectation ? "PASS" : "FAIL"; - } else { + } else if (Array.isArray(test.expectation)) { expected = test.expectation.includes(case_.name) ? "FAIL" : "PASS"; + } else { + expected = "PASS"; } } @@ -708,10 +710,12 @@ function discoverTestsToRun( } } - assert( - Array.isArray(expectation) || typeof expectation == "boolean", - "test entry must not have a folder expectation", - ); + if (!noIgnore) { + assert( + Array.isArray(expectation) || typeof expectation == "boolean", + "test entry must not have a folder expectation", + ); + } if ( filter && diff --git a/tools/wpt/utils.ts b/tools/wpt/utils.ts index 1752dab04..8aa27a664 100644 --- a/tools/wpt/utils.ts +++ b/tools/wpt/utils.ts @@ -98,6 +98,7 @@ export function getExpectFailForCase( expectation: boolean | string[], caseName: string, ): boolean { + if (noIgnore) return false; if (typeof expectation == "boolean") { return !expectation; } |