diff --git a/test/parallel/test-child-process-fork-and-spawn.js b/test/parallel/test-child-process-fork-and-spawn.js index 50615ecb79..5807147a1c 100644 --- a/test/parallel/test-child-process-fork-and-spawn.js +++ b/test/parallel/test-child-process-fork-and-spawn.js @@ -1,8 +1,8 @@ 'use strict'; const common = require('../common'); -var assert = require('assert'); -var spawn = require('child_process').spawn; -var fork = require('child_process').fork; +const assert = require('assert'); +const spawn = require('child_process').spawn; +const fork = require('child_process').fork; // Fork, then spawn. The spawned process should not hang. switch (process.argv[2] || '') { @@ -16,10 +16,9 @@ switch (process.argv[2] || '') { case 'spawn': break; default: - assert(0); + common.fail(); } function checkExit(statusCode) { - assert.equal(statusCode, 0); - process.nextTick(process.exit); + assert.strictEqual(statusCode, 0); }