mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix flaky test-watch-mode-inspect
PR-URL: https://github.com/nodejs/node/pull/47403 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user