test: refactor test-child-process-constructor
Change all assert.equal() to use assert.strictEqual(). PR-URL: https://github.com/nodejs/node/pull/10060 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
This commit is contained in:
parent
4f3c761ac0
commit
3e387cd46e
@ -4,7 +4,7 @@ require('../common');
|
|||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var child_process = require('child_process');
|
var child_process = require('child_process');
|
||||||
var ChildProcess = child_process.ChildProcess;
|
var ChildProcess = child_process.ChildProcess;
|
||||||
assert.equal(typeof ChildProcess, 'function');
|
assert.strictEqual(typeof ChildProcess, 'function');
|
||||||
|
|
||||||
// test that we can call spawn
|
// test that we can call spawn
|
||||||
var child = new ChildProcess();
|
var child = new ChildProcess();
|
||||||
@ -15,11 +15,11 @@ child.spawn({
|
|||||||
stdio: 'pipe'
|
stdio: 'pipe'
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.equal(child.hasOwnProperty('pid'), true);
|
assert.strictEqual(child.hasOwnProperty('pid'), true);
|
||||||
|
|
||||||
// try killing with invalid signal
|
// try killing with invalid signal
|
||||||
assert.throws(function() {
|
assert.throws(function() {
|
||||||
child.kill('foo');
|
child.kill('foo');
|
||||||
}, /Unknown signal: foo/);
|
}, /Unknown signal: foo/);
|
||||||
|
|
||||||
assert.equal(child.kill(), true);
|
assert.strictEqual(child.kill(), true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user