node/test/sequential/test-inspector-has-inspector-false.js
Joyee Cheung c2359bdad6
process: expose process.features.inspector
Instead of using process.config.variables.v8_enable_inspector
to detect whether inspector is enabled in the build.

PR-URL: https://github.com/nodejs/node/pull/25819
Refs: https://github.com/nodejs/node/issues/25343
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-02 05:41:45 +08:00

16 lines
338 B
JavaScript

// Flags: --expose-internals
'use strict';
const common = require('../common');
if (process.features.inspector) {
common.skip('V8 inspector is enabled');
}
const inspector = require('internal/util/inspector');
inspector.sendInspectorCommand(
common.mustNotCall('Inspector callback should not be called'),
common.mustCall(1),
);