mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
366495d4e2
Replaced var keyword with const and let in the tests for child process stdin and stdio. PR-URL: https://github.com/nodejs/node/pull/8617 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
24 lines
633 B
JavaScript
24 lines
633 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
let options = {stdio: ['pipe']};
|
|
let 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$/);
|