summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-fork.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-child-process-fork.js')
-rw-r--r--test/parallel/test-child-process-fork.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/test/parallel/test-child-process-fork.js b/test/parallel/test-child-process-fork.js
index ab253d04c2..5ae231ef03 100644
--- a/test/parallel/test-child-process-fork.js
+++ b/test/parallel/test-child-process-fork.js
@@ -1,6 +1,6 @@
'use strict';
+const common = require('../common');
var assert = require('assert');
-var common = require('../common');
var fork = require('child_process').fork;
var args = ['foo', 'bar'];
@@ -19,11 +19,6 @@ assert.throws(function() { n.send(); }, TypeError);
n.send({ hello: 'world' });
-var childExitCode = -1;
-n.on('exit', function(c) {
- childExitCode = c;
-});
-
-process.on('exit', function() {
- assert.ok(childExitCode == 0);
-});
+n.on('exit', common.mustCall(function(c) {
+ assert.strictEqual(c, 0);
+}));