Skip to content

Commit

Permalink
test: fix watch mode test flake
Browse files Browse the repository at this point in the history
  • Loading branch information
MoLow committed Sep 21, 2022
1 parent 68a3618 commit f7e163b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/sequential/test-watch-mode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ describe('watch mode', { concurrency: true, timeout: 60_0000 }, () => {
const file = fixtures.path('watch-mode/failing.js');
const { stderr, stdout } = await spawnWithRestarts({ file });

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

0 comments on commit f7e163b

Please sign in to comment.