0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/parallel/test-regress-GH-node-9326.js
Rich Trott 02fe8215f0 test: load common.js to test for global leaks
common.js contains code that checks for variables leaking into the
global namespace. Load common.js in all tests that do not
intentionally leak variables.

PR-URL: https://github.com/nodejs/node/pull/3095
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-01 20:16:35 -07:00

15 lines
313 B
JavaScript

'use strict';
require('../common');
var assert = require('assert');
var child_process = require('child_process');
// NOTE: Was crashing on FreeBSD
var cp = child_process.spawn(process.execPath, [
'-e',
'process.kill(process.pid, "SIGINT")'
]);
cp.on('exit', function(code) {
assert.notEqual(code, 0);
});