From 8a4bc9e471eb52c84ded2bdc3ef6e8bd00605757 Mon Sep 17 00:00:00 2001 From: Adrian Estrada Date: Fri, 16 Dec 2016 19:02:18 -0500 Subject: [PATCH] test: improve test-child-process-fork-and-spawn * use const instead of var for required modules * use assert.strictEqual instead of assert.equal * remove unnecessary process.nextTick --- test/parallel/test-child-process-fork-and-spawn.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-child-process-fork-and-spawn.js b/test/parallel/test-child-process-fork-and-spawn.js index 50615ecb79d0c6..5807147a1c947d 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); }