Skip to content

Commit

Permalink
test: make tests pass when built without inspector
Browse files Browse the repository at this point in the history
PR-URL: #12622
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
targos committed Apr 26, 2017
1 parent d1d9ecf commit c8c5a52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-debug-prompt.js
Original file line number Diff line number Diff line change
@@ -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 = '';
Expand Down
3 changes: 2 additions & 1 deletion test/sequential/test-debugger-repeat-last.js
Original file line number Diff line number Diff line change
@@ -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');
Expand All @@ -9,7 +10,7 @@ const fixture = path.join(
);

const args = [
'debug',
'inspect',
`--port=${common.PORT}`,
fixture
];
Expand Down

0 comments on commit c8c5a52

Please sign in to comment.