diff options
Diffstat (limited to 'tools/wpt.ts')
| -rwxr-xr-x | tools/wpt.ts | 14 |
1 files changed, 9 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 && |
