mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 12:42:09 +00:00

common.js needs to be loaded in all tests so that there is checking for variable leaks and possibly other things. However, it does not need to be assigned to a variable if nothing in common.js is referred to elsewhere in the test. PR-URL: https://github.com/nodejs/node/pull/4408 Reviewed-By: James M Snell <jasnell@gmail.com>
21 lines
378 B
JavaScript
21 lines
378 B
JavaScript
'use strict';
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var ch = require('child_process');
|
|
|
|
var SIZE = 100000;
|
|
var childGone = false;
|
|
|
|
var cp = ch.spawn('python', ['-c', 'print ' + SIZE + ' * "C"'], {
|
|
stdio: 'inherit'
|
|
});
|
|
|
|
cp.on('exit', function(code) {
|
|
childGone = true;
|
|
assert.equal(0, code);
|
|
});
|
|
|
|
process.on('exit', function() {
|
|
assert.ok(childGone);
|
|
});
|