From c2359bdad62b83d40976d91e91097684c23a7ae3 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 30 Jan 2019 23:19:45 +0800 Subject: 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 Reviewed-By: Gus Caplan Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- test/sequential/test-async-wrap-getasyncid.js | 3 +-- test/sequential/test-inspector-has-inspector-false.js | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'test/sequential') diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js index 6a6bf1b407..a5e2bf64d8 100644 --- a/test/sequential/test-async-wrap-getasyncid.js +++ b/test/sequential/test-async-wrap-getasyncid.js @@ -289,8 +289,7 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check testInitialized(req, 'SendWrap'); } -if (process.config.variables.v8_enable_inspector !== 0 && - common.isMainThread) { +if (process.features.inspector && common.isMainThread) { const binding = internalBinding('inspector'); const handle = new binding.Connection(() => {}); testInitialized(handle, 'Connection'); diff --git a/test/sequential/test-inspector-has-inspector-false.js b/test/sequential/test-inspector-has-inspector-false.js index cdb7ca9e19..56a50408bb 100644 --- a/test/sequential/test-inspector-has-inspector-false.js +++ b/test/sequential/test-inspector-has-inspector-false.js @@ -3,10 +3,10 @@ const common = require('../common'); -// This is to ensure that the sendInspectorCommand function calls the error -// function if its called with the v8_enable_inspector is disabled +if (process.features.inspector) { + common.skip('V8 inspector is enabled'); +} -process.config.variables.v8_enable_inspector = 0; const inspector = require('internal/util/inspector'); inspector.sendInspectorCommand( -- cgit v1.2.3