From 39cd0a8abc06d72428f3908c3bba73b0fe768794 Mon Sep 17 00:00:00 2001 From: sreepurnajasti Date: Mon, 13 Nov 2017 21:24:52 +0530 Subject: [PATCH] test: utilize common.mustCall() on child exit PR-URL: https://github.com/nodejs/node/pull/16996 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen --- test/parallel/test-child-process-fork-exec-argv.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-child-process-fork-exec-argv.js b/test/parallel/test-child-process-fork-exec-argv.js index 97d1e21a2f6d7a..e051908b11699d 100644 --- a/test/parallel/test-child-process-fork-exec-argv.js +++ b/test/parallel/test-child-process-fork-exec-argv.js @@ -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); - }); + })); }