diff --git a/test/parallel/test-child-process-detached.js b/test/parallel/test-child-process-detached.js index 97de4881eb691a..b4cb8f41360092 100644 --- a/test/parallel/test-child-process-detached.js +++ b/test/parallel/test-child-process-detached.js @@ -1,21 +1,21 @@ 'use strict'; -var common = require('../common'); -var assert = require('assert'); -var path = require('path'); +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); -var spawn = require('child_process').spawn; -var childPath = path.join(common.fixturesDir, - 'parent-process-nonpersistent.js'); -var persistentPid = -1; +const spawn = require('child_process').spawn; +const childPath = path.join(common.fixturesDir, + 'parent-process-nonpersistent.js'); +let persistentPid = -1; -var child = spawn(process.execPath, [ childPath ]); +const child = spawn(process.execPath, [ childPath ]); child.stdout.on('data', function(data) { persistentPid = parseInt(data, 10); }); process.on('exit', function() { - assert(persistentPid !== -1); + assert.notStrictEqual(persistentPid, -1); assert.throws(function() { process.kill(child.pid); });