mirror of
https://github.com/nodejs/node.git
synced 2025-05-20 02:55:51 +00:00

The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
28 lines
602 B
JavaScript
28 lines
602 B
JavaScript
var common = require('../common');
|
|
var assert = require('assert');
|
|
var spawn = require('child_process').spawn;
|
|
|
|
var script = common.fixturesDir + '/empty.js';
|
|
|
|
function fail() {
|
|
assert(0); // `node --debug-brk script.js` should not quit
|
|
}
|
|
|
|
function test(arg) {
|
|
var 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');
|