test: skip test-watch-mode inspect when no inspector

The test for watch mode with inspect fails when the inspector
is not available (such as when configured with `--without-ssl`).
This commit skips the test in such cases.

PR-URL: https://github.com/nodejs/node/pull/59440
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
James M Snell 2025-08-12 20:11:14 -07:00 committed by GitHub
parent a4b4eca94c
commit ff11b59569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -671,7 +671,7 @@ console.log(values.random);
]); ]);
}); });
it('should run when `--watch --inspect`', async () => { it('should run when `--watch --inspect`', { skip: !process.features.inspector }, async () => {
const file = createTmpFile(); const file = createTmpFile();
const args = ['--watch', '--inspect', file]; const args = ['--watch', '--inspect', file];
const { stdout, stderr } = await runWriteSucceed({ file, watchedFile: file, watchFlag: null, args }); const { stdout, stderr } = await runWriteSucceed({ file, watchedFile: file, watchFlag: null, args });