mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 17:03:34 +00:00

Currently when node is build --without-ssl and the test are run, there are a number of failing test due to tests expecting crypto support to be available. This commit fixes fixes the failure and instead skips the tests that expect crypto to be available. PR-URL: https://github.com/nodejs/node/pull/11631 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
32 lines
711 B
JavaScript
32 lines
711 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
const assert = require('assert');
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const script = common.fixturesDir + '/empty.js';
|
|
|
|
function fail() {
|
|
assert(0); // `node --debug-brk script.js` should not quit
|
|
}
|
|
|
|
function test(arg) {
|
|
const child = spawn(process.execPath, [arg, script]);
|
|
child.on('exit', fail);
|
|
|
|
// give node time to start up the debugger
|
|
setTimeout(function() {
|
|
child.removeListener('exit', fail);
|
|
child.kill();
|
|
}, 2000);
|
|
|
|
process.on('exit', function() {
|
|
assert(child.killed);
|
|
});
|
|
}
|
|
|
|
test('--debug-brk');
|
|
test('--debug-brk=5959');
|
|
test('--inspect-brk');
|
|
test('--inspect-brk=9230');
|