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.
This commit is contained in:
Filip Skokan 2023-03-03 14:50:18 +01:00 committed by GitHub
parent 38555a6a0f
commit 1b42ab4605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -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 &&

View File

@ -98,6 +98,7 @@ export function getExpectFailForCase(
expectation: boolean | string[],
caseName: string,
): boolean {
if (noIgnore) return false;
if (typeof expectation == "boolean") {
return !expectation;
}