mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
078bf68d94
Refs: nodejs/code-and-learn#56(comment) Replace the equal assetion with strictEqual. Replace the notEqual assertion with strictNotEqual. PR-URL: https://github.com/nodejs/node/pull/8584 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
24 lines
657 B
JavaScript
24 lines
657 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
let options = {stdio: ['pipe']};
|
|
let child = common.spawnPwd(options);
|
|
|
|
assert.notStrictEqual(child.stdout, null);
|
|
assert.notStrictEqual(child.stderr, null);
|
|
|
|
options = {stdio: 'ignore'};
|
|
child = common.spawnPwd(options);
|
|
|
|
assert.strictEqual(child.stdout, null);
|
|
assert.strictEqual(child.stderr, null);
|
|
|
|
options = {stdio: 'ignore'};
|
|
child = common.spawnSyncCat(options);
|
|
assert.deepStrictEqual(options, {stdio: 'ignore'});
|
|
|
|
assert.throws(() => {
|
|
common.spawnPwd({stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'ipc']});
|
|
}, /^Error: Child process can have only one IPC pipe$/);
|