mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
test: unskip test-watch-create-isolation-none
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66041 Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
2 files changed
+16
-12
No files matched your search
+16
-8
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user