blob: 92a7a215941ac9cce4d395dc5f4f36c646356abd [file] [edit]
// This tests that probe launch failures fail fast instead of timing out.
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const assert = require('assert');
const fixtures = require('../common/fixtures');
const { spawnSyncAndExit } = require('../common/child_process');
const cwd = fixtures.path('debugger');
spawnSyncAndExit(process.execPath, [
'inspect',
'--probe', 'probe.js:12',
'--expr', 'finalValue',
'--',
'--not-a-real-node-flag',
'probe.js',
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
signal: null,
status: 1,
stderr(output) {
assert.match(output, /bad option: --not-a-real-node-flag/);
assert.match(output, /Target exited before the inspector was ready \(code 9\)/);
},
trim: true,
});