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>
This commit is contained in:
parent
fe69d0d0a4
commit
d59074c1cb
@ -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);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user