Skip to content

Commit f7e163b

Browse files
committed
test: fix watch mode test flake
1 parent 68a3618 commit f7e163b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/sequential/test-watch-mode.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ describe('watch mode', { concurrency: true, timeout: 60_0000 }, () => {
9494
const file = fixtures.path('watch-mode/failing.js');
9595
const { stderr, stdout } = await spawnWithRestarts({ file });
9696

97+
// Use match first to pretty print diff on failure
9798
assert.match(stderr, /Error: fails\r?\n/);
98-
assert.strictEqual(stderr.match(/Error: fails\r?\n/g).length, 2);
99+
assert(stderr.match(/Error: fails\r?\n/g).length >= 2);
99100
assertRestartedCorrectly({
100101
stdout,
101102
messages: { completed: `Failed running ${inspect(file)}`, restarted: `Restarting ${inspect(file)}` },

0 commit comments

Comments
 (0)