Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions test/common/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 0 additions & 4 deletions test/test-runner/test-runner.status
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ prefix test-runner

[true] # This section applies to all platforms
Comment thread
aduh95 marked this conversation as resolved.

# 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
Expand Down
Loading