mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
3e387cd46e
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>
26 lines
596 B
JavaScript
26 lines
596 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
var assert = require('assert');
|
|
var child_process = require('child_process');
|
|
var ChildProcess = child_process.ChildProcess;
|
|
assert.strictEqual(typeof ChildProcess, 'function');
|
|
|
|
// test that we can call spawn
|
|
var child = new ChildProcess();
|
|
child.spawn({
|
|
file: process.execPath,
|
|
args: ['--interactive'],
|
|
cwd: process.cwd(),
|
|
stdio: 'pipe'
|
|
});
|
|
|
|
assert.strictEqual(child.hasOwnProperty('pid'), true);
|
|
|
|
// try killing with invalid signal
|
|
assert.throws(function() {
|
|
child.kill('foo');
|
|
}, /Unknown signal: foo/);
|
|
|
|
assert.strictEqual(child.kill(), true);
|