Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 16f85cc

Browse filesBrowse files
MoLowRafaelGSS
authored andcommitted
test: fix watch mode test flake
PR-URL: #44739 Fixes: #44735 Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 7ed8753 commit 16f85cc
Copy full SHA for 16f85cc

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎test/sequential/test-watch-mode.mjs‎

Copy file name to clipboardExpand all lines: test/sequential/test-watch-mode.mjs
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ 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+
// Test that failures happen once per restart
100+
assert(stderr.match(/Error: fails\r?\n/g).length >= 2);
99101
assertRestartedCorrectly({
100102
stdout,
101103
messages: { completed: `Failed running ${inspect(file)}`, restarted: `Restarting ${inspect(file)}` },

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.