Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make tests pass when built without inspector #12622

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/common.js
Expand Up @@ -644,8 +644,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
@@ -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
@@ -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