Skip to content

Commit

Permalink
test: fix flaky test-watch-mode-inspect
Browse files Browse the repository at this point in the history
PR-URL: #47403
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
MoLow committed Jul 6, 2023
1 parent 0fbfb28 commit a779261
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/sequential/test-watch-mode-inspect.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ describe('watch mode - inspect', () => {

// There should be a process per restart and one per parent process.
// Message about Debugger should appear once per restart.
// On some systems restart can happen multiple times.
const restarts = stdout.filter((line) => line === 'safe to debug now').length;
assert.strictEqual(stderr.match(/Debugger listening on ws:\/\//g).length, restarts);
assert.strictEqual(new Set(pids).size, restarts + 1);
assert.ok(stderr.match(/Debugger listening on ws:\/\//g).length >= restarts);
assert.ok(new Set(pids).size >= restarts + 1);
});

it('should prevent attaching debugger with SIGUSR1 to outer process', { skip: common.isWindows }, async () => {
Expand Down

0 comments on commit a779261

Please sign in to comment.