From f1e131283d8df132d5dfe8eb44ea579e2dcb7a75 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 3 May 2023 10:58:26 +0200 Subject: [PATCH] test: fix WPT state when process exits but workers are still running PR-URL: https://github.com/nodejs/node/pull/47826 Reviewed-By: Yagiz Nizipli Reviewed-By: Moshe Atlow --- test/common/wpt.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/common/wpt.js b/test/common/wpt.js index 4305cc3eee2e89..d43c787cab277d 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -613,10 +613,8 @@ class WPTRunner { } process.on('exit', () => { - if (this.inProgress.size > 0) { - for (const filename of this.inProgress) { - this.fail(filename, { name: 'Unknown' }, kIncomplete); - } + for (const spec of this.inProgress) { + this.fail(spec, { name: 'Unknown' }, kIncomplete); } inspect.defaultOptions.depth = Infinity; // Sorts the rules to have consistent output