@@ -233,6 +233,30 @@ test('host port flag should be parsed correctly', { skip: !process.features.insp
233233 strictEqual(result.code, 0);
234234});
235235
236+ test('--inspect=true should be parsed correctly', { skip: !process.features.inspector }, async () => {
237+ const result = await spawnPromisified(process.execPath, [
238+ '--no-warnings',
239+ '--experimental-config-file',
240+ fixtures.path('rc/inspect-true.json'),
241+ '-p', 'require("node:inspector").url()',
242+ ]);
243+ match(result.stderr, /^Debugger listening on (ws:\/\/[^\s]+)/);
244+ match(result.stdout, /ws:\/\/[^\s]+/);
245+ strictEqual(result.code, 0);
246+ });
247+
248+ test('--inspect=false should be parsed correctly', { skip: !process.features.inspector }, async () => {
249+ const result = await spawnPromisified(process.execPath, [
250+ '--no-warnings',
251+ '--experimental-config-file',
252+ fixtures.path('rc/inspect-false.json'),
253+ '-p', 'require("node:inspector").url()',
254+ ]);
255+ strictEqual(result.stderr, '');
256+ strictEqual(result.stdout, 'undefined\n');
257+ strictEqual(result.code, 0);
258+ });
259+
236260test('no op flag should throw', async () => {
237261 const result = await spawnPromisified(process.execPath, [
238262 '--no-warnings',
0 commit comments