mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
978629ca12
* remove inspector directory artifacts PR-URL: https://github.com/nodejs/node/pull/16197 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
27 lines
640 B
JavaScript
27 lines
640 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const script = `
|
|
const assert = require('assert');
|
|
const inspector = process.binding('inspector');
|
|
|
|
assert(
|
|
!!inspector.isEnabled(),
|
|
'inspector.isEnabled() should be true when run with --inspect');
|
|
|
|
process._debugEnd();
|
|
|
|
assert(
|
|
!inspector.isEnabled(),
|
|
'inspector.isEnabled() should be false after _debugEnd()');
|
|
`;
|
|
|
|
const args = ['--inspect', '-e', script];
|
|
const child = spawn(process.execPath, args, { stdio: 'inherit' });
|
|
child.on('exit', (code, signal) => {
|
|
process.exit(code || signal);
|
|
});
|