From 23c98fa7969eb53c8cd10e0998361d26b9b269a5 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 433f83b35e0649..f1e3bbbc58ec66 100644 --- a/test/parallel/test-child-process-fork-exec-argv.js +++ b/test/parallel/test-child-process-fork-exec-argv.js @@ -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); - }); + })); }