mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 16:46:56 +00:00

This error was previously not covered. This commit adds coverage. PR-URL: https://github.com/nodejs/node/pull/8159 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
24 lines
629 B
JavaScript
24 lines
629 B
JavaScript
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
|
|
var options = {stdio: ['pipe']};
|
|
var child = common.spawnPwd(options);
|
|
|
|
assert.notEqual(child.stdout, null);
|
|
assert.notEqual(child.stderr, null);
|
|
|
|
options = {stdio: 'ignore'};
|
|
child = common.spawnPwd(options);
|
|
|
|
assert.equal(child.stdout, null);
|
|
assert.equal(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$/);
|