Skip to content

Commit

Permalink
test: utilize common.mustCall() on child exit
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
sreepurnajasti authored and MylesBorins committed Dec 11, 2017
1 parent 883281b commit 23c98fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-child-process-fork-exec-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
});
}));
}

0 comments on commit 23c98fa

Please sign in to comment.