Skip to content
Permalink
Browse files

test: make tests pass when built without inspector

PR-URL: #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>
  • Loading branch information...
targos committed Apr 24, 2017
1 parent d1d9ecf commit c8c5a528da4cacedbbfd61bf6f81d595e1536579
Showing with 7 additions and 5 deletions.
  1. +2 −2 test/common.js
  2. +3 −2 test/parallel/test-debug-prompt.js
  3. +2 −1 test/sequential/test-debugger-repeat-last.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);
}
};
@@ -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 = '';
@@ -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
];

0 comments on commit c8c5a52

Please sign in to comment.
You can’t perform that action at this time.