Skip to content

Commit

Permalink
test: fix WPT runner result
Browse files Browse the repository at this point in the history
This doesn't include the other tests for the result when
running a specific test in WPT.

Signed-off-by: Daeyeon Jeong [email protected]
PR-URL: #44238
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
  • Loading branch information
daeyeon authored and RafaelGSS committed Sep 5, 2022
1 parent 2ed3b30 commit 3a5fdac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ class WPTRunner {
}

process.on('exit', () => {
const total = this.specMap.size;
if (this.inProgress.size > 0) {
for (const filename of this.inProgress) {
this.fail(filename, { name: 'Unknown' }, kIncomplete);
Expand Down Expand Up @@ -506,7 +505,9 @@ class WPTRunner {
}

const unexpectedPasses = [];
for (const [key, specMap] of this.specMap) {
for (const specMap of queue) {
const key = specMap.filename;

// File has no expected failures
if (!specMap.failedTests.length) {
continue;
Expand All @@ -529,7 +530,8 @@ class WPTRunner {
}
}

const ran = total - skipped;
const ran = queue.length;
const total = ran + skipped;
const passed = ran - expectedFailures - failures.length;
console.log(`Ran ${ran}/${total} tests, ${skipped} skipped,`,
`${passed} passed, ${expectedFailures} expected failures,`,
Expand Down

0 comments on commit 3a5fdac

Please sign in to comment.