0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

test: utilize common.mustCall() on child exit

PR-URL: https://github.com/nodejs/node/pull/16996
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
sreepurnajasti 2017-11-13 21:24:52 +05:30 committed by Anna Henningsen
parent 6244070c48
commit 95d9a58cbc
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');
const child_process = require('child_process');
const spawn = child_process.spawn;
@ -43,7 +43,7 @@ if (process.argv[2] === 'fork') {
out += chunk;
});
child.on('exit', function() {
child.on('exit', common.mustCall(function() {
assert.deepStrictEqual(JSON.parse(out), execArgv);
});
}));
}