diff --git a/test/common/watch.js b/test/common/watch.js index c3d22c30f78e..477a4a74946d 100644 --- a/test/common/watch.js +++ b/test/common/watch.js @@ -59,14 +59,20 @@ async function performFileOperation(operation, useRunApi, timeout = 1000) { } } -function assertTestOutput(run, shouldCheckRecursion = false) { +function assertTestOutput(run, shouldCheckRecursion = false, expectations) { if (shouldCheckRecursion) { assert.doesNotMatch(run, /run\(\) is being called recursively/); } - assert.match(run, /tests 1/); - assert.match(run, /pass 1/); - assert.match(run, /fail 0/); - assert.match(run, /cancelled 0/); + assert.match(run, new RegExp(`\n${Object.entries({ + tests: 1, + suites: 0, + pass: 1, + fail: 0, + cancelled: 0, + skipped: 0, + todo: 0, + ...expectations, + }).map((t) => `. ${t.join(' ')}`).join('\n')}\n`)); } async function testRunnerWatch({ @@ -215,9 +221,11 @@ async function testRunnerWatch({ child.kill(); await once(child, 'exit'); - for (const run of runs) { - assertTestOutput(run, false); - } + assertTestOutput(runs[0], false); + assertTestOutput(runs[1], false, isolation === 'none' && { + tests: 2, + pass: 2, + }); }; action === 'update' && await testUpdate(); diff --git a/test/test-runner/test-runner.status b/test/test-runner/test-runner.status index 7d2d59d3540c..a568b797c2f4 100644 --- a/test/test-runner/test-runner.status +++ b/test/test-runner/test-runner.status @@ -6,10 +6,6 @@ prefix test-runner [true] # This section applies to all platforms -# https://github.com/nodejs/node/pull/54888#issuecomment-2351128116 -# TODO(pmarchini): This test is failing when isolation is set to none and must be fixed. -test-watch-create-isolation-none: SKIP - [$system==macos && $arch==x64] # https://github.com/nodejs/node/issues/54534#issuecomment-5423551021 test-run-watch-cwd-isolation-none: PASS, FLAKY