Skip to content

Commit ae1c0e4

Browse files
authored
tools: improve output for unexpected passes in WTP tests
PR-URL: #62587 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 78efdf7 commit ae1c0e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/common/wpt.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,13 +806,14 @@ class WPTRunner {
806806
}
807807

808808
// Full check: every expected to fail test is present
809-
if (specs.failedTests.some((expectedToFail) => {
809+
const _unexpectedPasses = specs.failedTests.filter((expectedToFail) => {
810810
if (specs.flakyTests.includes(expectedToFail)) {
811811
return false;
812812
}
813813
return this.results[key]?.fail?.expected?.includes(expectedToFail) !== true;
814-
})) {
815-
unexpectedPasses.push(key);
814+
});
815+
if (_unexpectedPasses.length) {
816+
unexpectedPasses.push(..._unexpectedPasses.map((name) => `${key}:${name}`));
816817
continue;
817818
}
818819
}

0 commit comments

Comments
 (0)