test: make tests pass when built without inspector

PR-URL: https://github.com/nodejs/node/pull/12622
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
pull/12643/head
Michaël Zasso 2017-04-24 16:13:21 +02:00
parent d1d9ecfe6e
commit c8c5a528da
3 changed files with 7 additions and 5 deletions

View File

@ -646,8 +646,8 @@ exports.expectsError = function expectsError({code, type, message}) {
}; };
exports.skipIfInspectorDisabled = function skipIfInspectorDisabled() { exports.skipIfInspectorDisabled = function skipIfInspectorDisabled() {
if (!exports.hasCrypto) { if (process.config.variables.v8_enable_inspector === 0) {
exports.skip('missing ssl support so inspector is disabled'); exports.skip('V8 inspector is disabled');
process.exit(0); process.exit(0);
} }
}; };

View File

@ -1,9 +1,10 @@
'use strict'; 'use strict';
require('../common'); const common = require('../common');
common.skipIfInspectorDisabled();
const spawn = require('child_process').spawn; const spawn = require('child_process').spawn;
const proc = spawn(process.execPath, ['debug', 'foo']); const proc = spawn(process.execPath, ['inspect', 'foo']);
proc.stdout.setEncoding('utf8'); proc.stdout.setEncoding('utf8');
let output = ''; let output = '';

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
const common = require('../common'); const common = require('../common');
common.skipIfInspectorDisabled();
const path = require('path'); const path = require('path');
const spawn = require('child_process').spawn; const spawn = require('child_process').spawn;
const assert = require('assert'); const assert = require('assert');
@ -9,7 +10,7 @@ const fixture = path.join(
); );
const args = [ const args = [
'debug', 'inspect',
`--port=${common.PORT}`, `--port=${common.PORT}`,
fixture fixture
]; ];