Browse Source

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>
v6
Michaël Zasso 8 years ago
parent
commit
c8c5a528da
  1. 4
      test/common.js
  2. 5
      test/parallel/test-debug-prompt.js
  3. 3
      test/sequential/test-debugger-repeat-last.js

4
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);
}
};

5
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 = '';

3
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
];

Loading…
Cancel
Save