mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05: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:
1 parent
8cae573af1
commit
39cd0a8abc
1 file changed
+3
-3
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const child_process = require('child_process');
|
||||
const spawn = child_process.spawn;
|
||||
@@ -22,7 +22,7 @@ if (process.argv[2] === 'fork') {
|
||||
out += chunk;
|
||||
});
|
||||
|
||||
child.on('exit', function() {
|
||||
child.on('exit', common.mustCall(function() {
|
||||
assert.deepStrictEqual(JSON.parse(out), execArgv);
|
||||
});
|
||||
}));
|
||||
}
|
||||
Reference in new issue
Block a user