diff options
author | Pavol Otcenas <pavol@otcenas.eu> | 2016-09-17 10:30:29 +0200 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2016-10-11 12:26:44 -0400 |
commit | fc6b4970b50f6330dc9a78dc706dcb7256ed5610 (patch) | |
tree | 4d22062049b91be4635785cb13b921e7b344e461 /test/parallel/test-child-process-detached.js | |
parent | a12ff5cc5db3bd185da0dd8017954427554e4d5c (diff) | |
download | node-new-fc6b4970b50f6330dc9a78dc706dcb7256ed5610.tar.gz |
test: modernize JS and tighten equality checking
Changed var --> const and let.
Changed assert.equal !== --> assert.notStrictEqual
Correctly aligned argument
PR-URL: https://github.com/nodejs/node/pull/8580
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-child-process-detached.js')
-rw-r--r-- | test/parallel/test-child-process-detached.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/parallel/test-child-process-detached.js b/test/parallel/test-child-process-detached.js index 97de4881eb..b4cb8f4136 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); }); |