0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 08:19:38 +01:00
nodejs/test/simple/test-child-process-exit-code.js

11 lines
310 B
JavaScript
Raw Normal View History

require("../common");
var spawn = require('child_process').spawn
, path = require('path')
, sub = path.join(fixturesDir, 'exit.js')
, child = spawn(process.argv[0], [sub, 23])
;
child.addListener('exit', function(code, signal) {
assert.strictEqual(code, 23);
assert.strictEqual(signal, null);
});