Skip to content

Commit 2202703

Browse files
authored
Fix failing WPTs calculation
1 parent 21c7671 commit 2202703

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/web-platform-tests/run-wpts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ describe("web-platform-tests", () => {
9494
let failCount = 0;
9595
if (data) {
9696
failCount = Object.values(data)
97-
.filter(innerReason => resolveReason(innerReason) === "expect-fail").length;
97+
.filter(([innerReason]) => resolveReason(innerReason) === "expect-fail").length;
9898
}
9999

100100
let prefix = "";
101101
if (failCount > 0) {
102-
prefix = `[expected ${failCount} failures] `;
102+
prefix = `[expected ${failCount} failure${failCount > 1 ? "s" : ""}] `;
103103
}
104104

105105
runSingleWPT(testFilePath, `${prefix}${testFile}`, data || false);

0 commit comments

Comments
 (0)