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 6d736a5

Browse filesBrowse files
MoLowrichardlau
authored andcommitted
test: fix watch mode test flake
PR-URL: #44739 Backport-PR-URL: #44976 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 543d3d2 commit 6d736a5
Copy full SHA for 6d736a5

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
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
+6-2Lines changed: 6 additions & 2 deletions
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)}` },
@@ -206,7 +208,9 @@ describe('watch mode', { concurrency: true, timeout: 60_0000 }, () => {
206208
});
207209
});
208210

209-
it('should not load --import modules in main process', async () => {
211+
it('should not load --import modules in main process', {
212+
skip: 'enable once --import is backported',
213+
}, async () => {
210214
const file = createTmpFile('');
211215
const imported = fixtures.fileURL('watch-mode/process_exit.js');
212216
const args = ['--import', imported, file];

0 commit comments

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