From c8c5a528da4cacedbbfd61bf6f81d595e1536579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 24 Apr 2017 16:13:21 +0200 Subject: [PATCH] test: make tests pass when built without inspector PR-URL: https://github.com/nodejs/node/pull/12622 Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell --- test/common.js | 4 ++-- test/parallel/test-debug-prompt.js | 5 +++-- test/sequential/test-debugger-repeat-last.js | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/common.js b/test/common.js index 3a49a53a11b..a3540cb11aa 100644 --- a/test/common.js +++ b/test/common.js @@ -646,8 +646,8 @@ exports.expectsError = function expectsError({code, type, message}) { }; exports.skipIfInspectorDisabled = function skipIfInspectorDisabled() { - if (!exports.hasCrypto) { - exports.skip('missing ssl support so inspector is disabled'); + if (process.config.variables.v8_enable_inspector === 0) { + exports.skip('V8 inspector is disabled'); process.exit(0); } }; diff --git a/test/parallel/test-debug-prompt.js b/test/parallel/test-debug-prompt.js index 82120859c7c..81e579ed1e2 100644 --- a/test/parallel/test-debug-prompt.js +++ b/test/parallel/test-debug-prompt.js @@ -1,9 +1,10 @@ 'use strict'; -require('../common'); +const common = require('../common'); +common.skipIfInspectorDisabled(); const spawn = require('child_process').spawn; -const proc = spawn(process.execPath, ['debug', 'foo']); +const proc = spawn(process.execPath, ['inspect', 'foo']); proc.stdout.setEncoding('utf8'); let output = ''; diff --git a/test/sequential/test-debugger-repeat-last.js b/test/sequential/test-debugger-repeat-last.js index 9d1dd4754d6..39572ab99b3 100644 --- a/test/sequential/test-debugger-repeat-last.js +++ b/test/sequential/test-debugger-repeat-last.js @@ -1,5 +1,6 @@ 'use strict'; const common = require('../common'); +common.skipIfInspectorDisabled(); const path = require('path'); const spawn = require('child_process').spawn; const assert = require('assert'); @@ -9,7 +10,7 @@ const fixture = path.join( ); const args = [ - 'debug', + 'inspect', `--port=${common.PORT}`, fixture ];