Skip to content

Commit 3a5fdac

Browse files
daeyeonRafaelGSS
authored andcommitted
test: fix WPT runner result
This doesn't include the other tests for the result when running a specific test in WPT. Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: #44238 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
1 parent 2ed3b30 commit 3a5fdac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/common/wpt.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ class WPTRunner {
474474
}
475475

476476
process.on('exit', () => {
477-
const total = this.specMap.size;
478477
if (this.inProgress.size > 0) {
479478
for (const filename of this.inProgress) {
480479
this.fail(filename, { name: 'Unknown' }, kIncomplete);
@@ -506,7 +505,9 @@ class WPTRunner {
506505
}
507506

508507
const unexpectedPasses = [];
509-
for (const [key, specMap] of this.specMap) {
508+
for (const specMap of queue) {
509+
const key = specMap.filename;
510+
510511
// File has no expected failures
511512
if (!specMap.failedTests.length) {
512513
continue;
@@ -529,7 +530,8 @@ class WPTRunner {
529530
}
530531
}
531532

532-
const ran = total - skipped;
533+
const ran = queue.length;
534+
const total = ran + skipped;
533535
const passed = ran - expectedFailures - failures.length;
534536
console.log(`Ran ${ran}/${total} tests, ${skipped} skipped,`,
535537
`${passed} passed, ${expectedFailures} expected failures,`,

0 commit comments

Comments
 (0)