Skip to content
Myr

validate.js

This file

Path

test/pipe/validate.js

783 lines · 27.5 KiB · JavaScript

Last changed by

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

History of this file

Take it

Improve piping processes (#834)ehmickybefore adoption1a47ea2

lines 1–7why, one step back
1import {PassThrough} from 'node:stream';
2import {spawn} from 'node:child_process';3import process from 'node:process';4import test from 'ava';5import {execa} from '../../index.js';6import {setFixtureDir} from '../helpers/fixtures-dir.js';7import {foobarString} from '../helpers/input.js';

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 8why, one step back
8import {fullStdio, getStdio} from '../helpers/stdio.js';

Rename `spawned` and `child process` to `subprocess` (#897)ehmickybefore adoption8fe2343

line 9why, one step back
9import {getEarlyErrorSubprocess} from '../helpers/early-error.js';

Improve piping processes (#834)ehmickybefore adoption1a47ea2

lines 10–39why, one step back
10
11setFixtureDir();1213const assertPipeError = async (t, pipePromise, message) => {14 const error = await t.throwsAsync(pipePromise);1516 t.is(error.command, 'source.pipe(destination)');17 t.is(error.escapedCommand, error.command);1819 t.is(typeof error.cwd, 'string');20 t.true(error.failed);21 t.false(error.timedOut);22 t.false(error.isCanceled);23 t.false(error.isTerminated);24 t.is(error.exitCode, undefined);25 t.is(error.signal, undefined);26 t.is(error.signalDescription, undefined);27 t.is(error.stdout, undefined);28 t.is(error.stderr, undefined);29 t.is(error.all, undefined);30 t.deepEqual(error.stdio, Array.from({length: error.stdio.length}));31 t.deepEqual(error.pipedFrom, []);3233 t.true(error.shortMessage.includes(`Command failed: ${error.command}`));34 t.true(error.shortMessage.includes(error.originalMessage));35 t.true(error.message.includes(error.shortMessage));3637 t.true(error.originalMessage.includes(message));38};39

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 40–42why, one step back
40const getMessage = message => Array.isArray(message)
41 ? `"${message[0]}: ${message[1]}" option is incompatible`42 : message;

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 43why, one step back
43

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 44–56why, one step back
44const testPipeError = async (t, {
45 message,46 sourceOptions = {},47 destinationOptions = {},48 getSource = () => execa('empty.js', sourceOptions),49 getDestination = () => execa('empty.js', destinationOptions),50 isScript = false,51 from,52 to,53}) => {54 const source = getSource();55 const pipePromise = isScript ? source.pipe({from, to})`empty.js` : source.pipe(getDestination(), {from, to});56 await assertPipeError(t, pipePromise, getMessage(message));

Improve piping processes (#834)ehmickybefore adoption1a47ea2

lines 57–58why, one step back
57};
58

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 59–77why, one step back
59const testNodeStream = async (t, {
60 message,61 sourceOptions = {},62 getSource = () => execa('empty.js', sourceOptions),63 from,64 to,65 writable = to !== undefined,66}) => {67 assertNodeStream({t, message, getSource, from, to, methodName: writable ? 'writable' : 'readable'});68 assertNodeStream({t, message, getSource, from, to, methodName: 'duplex'});69};7071const assertNodeStream = ({t, message, getSource, from, to, methodName}) => {72 const error = t.throws(() => {73 getSource()[methodName]({from, to});74 });75 t.true(error.message.includes(getMessage(message)));76};77

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 78–89why, one step back
78const testIterable = async (t, {
79 message,80 sourceOptions = {},81 getSource = () => execa('empty.js', sourceOptions),82 from,83}) => {84 const error = t.throws(() => {85 getSource().iterable({from});86 });87 t.true(error.message.includes(getMessage(message)));88};89

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 90–92why, one step back
90test('Must set "all" option to "true" to use .pipe("all")', testPipeError, {
91 from: 'all',92 message: '"all" option must be true',

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 93why, one step back
93});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 94–97why, one step back
94test('Must set "all" option to "true" to use .duplex("all")', testNodeStream, {
95 from: 'all',96 message: '"all" option must be true',97});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 98–101why, one step back
98test('Must set "all" option to "true" to use .iterable("all")', testIterable, {
99 from: 'all',100 message: '"all" option must be true',101});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 102–104why, one step back
102test('.pipe() cannot pipe to non-subprocesses', testPipeError, {
103 getDestination: () => new PassThrough(),104 message: 'an Execa subprocess',

Improve `.pipe()` method (#859)ehmickybefore adoption2ef9e86

line 105why, one step back
105});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 106–108why, one step back
106test('.pipe() cannot pipe to non-Execa subprocesses', testPipeError, {
107 getDestination: () => spawn('node', ['--version']),108 message: 'an Execa subprocess',

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 109why, one step back
109});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 110–112why, one step back
110test('.pipe() "from" option cannot be "stdin"', testPipeError, {
111 from: 'stdin',112 message: '"from" must not be',

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 113why, one step back
113});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 114–117why, one step back
114test('.duplex() "from" option cannot be "stdin"', testNodeStream, {
115 from: 'stdin',116 message: '"from" must not be',117});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 118–121why, one step back
118test('.iterable() "from" option cannot be "stdin"', testIterable, {
119 from: 'stdin',120 message: '"from" must not be',121});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 122–125why, one step back
122test('$.pipe() "from" option cannot be "stdin"', testPipeError, {
123 from: 'stdin',124 isScript: true,125 message: '"from" must not be',

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 126why, one step back
126});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 127–130why, one step back
127test('.pipe() "to" option cannot be "stdout"', testPipeError, {
128 to: 'stdout',129 message: '"to" must not be',130});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 131–134why, one step back
131test('.duplex() "to" option cannot be "stdout"', testNodeStream, {
132 to: 'stdout',133 message: '"to" must not be',134});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 135–143why, one step back
135test('$.pipe() "to" option cannot be "stdout"', testPipeError, {
136 to: 'stdout',137 isScript: true,138 message: '"to" must not be',139});140test('.pipe() "from" option cannot be any string', testPipeError, {141 from: 'other',142 message: 'must be "stdout", "stderr", "all"',143});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 144–147why, one step back
144test('.duplex() "from" option cannot be any string', testNodeStream, {
145 from: 'other',146 message: 'must be "stdout", "stderr", "all"',147});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 148–151why, one step back
148test('.iterable() "from" option cannot be any string', testIterable, {
149 from: 'other',150 message: 'must be "stdout", "stderr", "all"',151});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 152–155why, one step back
152test('.pipe() "to" option cannot be any string', testPipeError, {
153 to: 'other',154 message: 'must be "stdin"',155});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 156–159why, one step back
156test('.duplex() "to" option cannot be any string', testNodeStream, {
157 to: 'other',158 message: 'must be "stdin"',159});

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

lines 160–167why, one step back
160test('.pipe() "from" option cannot be a number without "fd"', testPipeError, {
161 from: '1',162 message: 'must be "stdout", "stderr", "all"',163});164test('.duplex() "from" option cannot be a number without "fd"', testNodeStream, {165 from: '1',166 message: 'must be "stdout", "stderr", "all"',167});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 168–171why, one step back
168test('.iterable() "from" option cannot be a number without "fd"', testIterable, {
169 from: '1',170 message: 'must be "stdout", "stderr", "all"',171});

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

lines 172–187why, one step back
172test('.pipe() "to" option cannot be a number without "fd"', testPipeError, {
173 to: '0',174 message: 'must be "stdin"',175});176test('.duplex() "to" option cannot be a number without "fd"', testNodeStream, {177 to: '0',178 message: 'must be "stdin"',179});180test('.pipe() "from" option cannot be just "fd"', testPipeError, {181 from: 'fd',182 message: 'must be "stdout", "stderr", "all"',183});184test('.duplex() "from" option cannot be just "fd"', testNodeStream, {185 from: 'fd',186 message: 'must be "stdout", "stderr", "all"',187});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 188–191why, one step back
188test('.iterable() "from" option cannot be just "fd"', testIterable, {
189 from: 'fd',190 message: 'must be "stdout", "stderr", "all"',191});

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

lines 192–199why, one step back
192test('.pipe() "to" option cannot be just "fd"', testPipeError, {
193 to: 'fd',194 message: 'must be "stdin"',195});196test('.duplex() "to" option cannot be just "fd"', testNodeStream, {197 to: 'fd',198 message: 'must be "stdin"',199});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 200why, one step back
200test('.pipe() "from" option cannot be a float', testPipeError, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 201why, one step back
201 from: 'fd1.5',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 202–203why, one step back
202 message: 'must be "stdout", "stderr", "all"',
203});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 204why, one step back
204test('.duplex() "from" option cannot be a float', testNodeStream, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 205why, one step back
205 from: 'fd1.5',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 206–207why, one step back
206 message: 'must be "stdout", "stderr", "all"',
207});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 208–211why, one step back
208test('.iterable() "from" option cannot be a float', testIterable, {
209 from: 'fd1.5',210 message: 'must be "stdout", "stderr", "all"',211});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 212why, one step back
212test('.pipe() "to" option cannot be a float', testPipeError, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 213why, one step back
213 to: 'fd1.5',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 214–215why, one step back
214 message: 'must be "stdin"',
215});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 216why, one step back
216test('.duplex() "to" option cannot be a float', testNodeStream, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 217why, one step back
217 to: 'fd1.5',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 218–219why, one step back
218 message: 'must be "stdin"',
219});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 220why, one step back
220test('.pipe() "from" option cannot be a negative number', testPipeError, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 221why, one step back
221 from: 'fd-1',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 222–223why, one step back
222 message: 'must be "stdout", "stderr", "all"',
223});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 224why, one step back
224test('.duplex() "from" option cannot be a negative number', testNodeStream, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 225why, one step back
225 from: 'fd-1',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 226–227why, one step back
226 message: 'must be "stdout", "stderr", "all"',
227});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 228–231why, one step back
228test('.iterable() "from" option cannot be a negative number', testIterable, {
229 from: 'fd-1',230 message: 'must be "stdout", "stderr", "all"',231});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 232why, one step back
232test('.pipe() "to" option cannot be a negative number', testPipeError, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 233why, one step back
233 to: 'fd-1',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 234–235why, one step back
234 message: 'must be "stdin"',
235});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 236why, one step back
236test('.duplex() "to" option cannot be a negative number', testNodeStream, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 237why, one step back
237 to: 'fd-1',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 238–239why, one step back
238 message: 'must be "stdin"',
239});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 240why, one step back
240test('.pipe() "from" option cannot be a non-existing file descriptor', testPipeError, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 241why, one step back
241 from: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 242–243why, one step back
242 message: 'file descriptor does not exist',
243});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 244why, one step back
244test('.duplex() "from" cannot be a non-existing file descriptor', testNodeStream, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 245why, one step back
245 from: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 246–247why, one step back
246 message: 'file descriptor does not exist',
247});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 248–251why, one step back
248test('.iterable() "from" cannot be a non-existing file descriptor', testIterable, {
249 from: 'fd3',250 message: 'file descriptor does not exist',251});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 252why, one step back
252test('.pipe() "to" option cannot be a non-existing file descriptor', testPipeError, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 253why, one step back
253 to: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 254–255why, one step back
254 message: 'file descriptor does not exist',
255});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 256why, one step back
256test('.duplex() "to" cannot be a non-existing file descriptor', testNodeStream, {

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 257why, one step back
257 to: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 258–259why, one step back
258 message: 'file descriptor does not exist',
259});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 260–261why, one step back
260test('.pipe() "from" option cannot be an input file descriptor', testPipeError, {
261 sourceOptions: getStdio(3, new Uint8Array()),

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 262why, one step back
262 from: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 263–264why, one step back
263 message: 'must be a readable stream',
264});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 265–266why, one step back
265test('.duplex() "from" option cannot be an input file descriptor', testNodeStream, {
266 sourceOptions: getStdio(3, new Uint8Array()),

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 267why, one step back
267 from: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 268–269why, one step back
268 message: 'must be a readable stream',
269});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 270–274why, one step back
270test('.iterable() "from" option cannot be an input file descriptor', testIterable, {
271 sourceOptions: getStdio(3, new Uint8Array()),272 from: 'fd3',273 message: 'must be a readable stream',274});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 275–276why, one step back
275test('.pipe() "to" option cannot be an output file descriptor', testPipeError, {
276 destinationOptions: fullStdio,

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 277why, one step back
277 to: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 278–279why, one step back
278 message: 'must be a writable stream',
279});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 280–281why, one step back
280test('.duplex() "to" option cannot be an output file descriptor', testNodeStream, {
281 sourceOptions: fullStdio,

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 282why, one step back
282 to: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 283–284why, one step back
283 message: 'must be a writable stream',
284});

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

lines 285–294why, one step back
285test('.pipe() "to" option cannot be "all"', testPipeError, {
286 destinationOptions: fullStdio,287 to: 'all',288 message: 'must be a writable stream',289});290test('.duplex() "to" option cannot be "all"', testNodeStream, {291 sourceOptions: fullStdio,292 to: 'all',293 message: 'must be a writable stream',294});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 295–298why, one step back
295test('Cannot set "stdout" option to "ignore" to use .pipe()', testPipeError, {
296 sourceOptions: {stdout: 'ignore'},297 message: ['stdout', '\'ignore\''],298});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 299–302why, one step back
299test('Cannot set "stdout" option to "ignore" to use .duplex()', testNodeStream, {
300 sourceOptions: {stdout: 'ignore'},301 message: ['stdout', '\'ignore\''],302});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 303–306why, one step back
303test('Cannot set "stdout" option to "ignore" to use .iterable()', testIterable, {
304 sourceOptions: {stdout: 'ignore'},305 message: ['stdout', '\'ignore\''],306});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 307–310why, one step back
307test('Cannot set "stdin" option to "ignore" to use .pipe()', testPipeError, {
308 destinationOptions: {stdin: 'ignore'},309 message: ['stdin', '\'ignore\''],310});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 311–315why, one step back
311test('Cannot set "stdin" option to "ignore" to use .duplex()', testNodeStream, {
312 sourceOptions: {stdin: 'ignore'},313 message: ['stdin', '\'ignore\''],314 writable: true,315});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 316–317why, one step back
316test('Cannot set "stdout" option to "ignore" to use .pipe(1)', testPipeError, {
317 sourceOptions: {stdout: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 318why, one step back
318 from: 'fd1',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 319–320why, one step back
319 message: ['stdout', '\'ignore\''],
320});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 321–322why, one step back
321test('Cannot set "stdout" option to "ignore" to use .duplex(1)', testNodeStream, {
322 sourceOptions: {stdout: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 323why, one step back
323 from: 'fd1',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 324–325why, one step back
324 message: ['stdout', '\'ignore\''],
325});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 326–330why, one step back
326test('Cannot set "stdout" option to "ignore" to use .iterable(1)', testIterable, {
327 sourceOptions: {stdout: 'ignore'},328 from: 'fd1',329 message: ['stdout', '\'ignore\''],330});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 331–333why, one step back
331test('Cannot set "stdin" option to "ignore" to use .pipe(0)', testPipeError, {
332 destinationOptions: {stdin: 'ignore'},333 message: ['stdin', '\'ignore\''],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 334why, one step back
334 to: 'fd0',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 335why, one step back
335});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 336–338why, one step back
336test('Cannot set "stdin" option to "ignore" to use .duplex(0)', testNodeStream, {
337 sourceOptions: {stdin: 'ignore'},338 message: ['stdin', '\'ignore\''],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 339why, one step back
339 to: 'fd0',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 340why, one step back
340});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 341–345why, one step back
341test('Cannot set "stdout" option to "ignore" to use .pipe("stdout")', testPipeError, {
342 sourceOptions: {stdout: 'ignore'},343 from: 'stdout',344 message: ['stdout', '\'ignore\''],345});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 346–350why, one step back
346test('Cannot set "stdout" option to "ignore" to use .duplex("stdout")', testNodeStream, {
347 sourceOptions: {stdout: 'ignore'},348 from: 'stdout',349 message: ['stdout', '\'ignore\''],350});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 351–355why, one step back
351test('Cannot set "stdout" option to "ignore" to use .iterable("stdout")', testIterable, {
352 sourceOptions: {stdout: 'ignore'},353 from: 'stdout',354 message: ['stdout', '\'ignore\''],355});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 356–360why, one step back
356test('Cannot set "stdin" option to "ignore" to use .pipe("stdin")', testPipeError, {
357 destinationOptions: {stdin: 'ignore'},358 message: ['stdin', '\'ignore\''],359 to: 'stdin',360});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 361–365why, one step back
361test('Cannot set "stdin" option to "ignore" to use .duplex("stdin")', testNodeStream, {
362 sourceOptions: {stdin: 'ignore'},363 message: ['stdin', '\'ignore\''],364 to: 'stdin',365});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 366–369why, one step back
366test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe()', testPipeError, {
367 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},368 message: ['stdout', '\'ignore\''],369});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 370–373why, one step back
370test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex()', testNodeStream, {
371 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},372 message: ['stdout', '\'ignore\''],373});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 374–377why, one step back
374test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable()', testIterable, {
375 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},376 message: ['stdout', '\'ignore\''],377});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 378–379why, one step back
378test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe(1)', testPipeError, {
379 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 380why, one step back
380 from: 'fd1',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 381–382why, one step back
381 message: ['stdout', '\'ignore\''],
382});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 383–384why, one step back
383test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex(1)', testNodeStream, {
384 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 385why, one step back
385 from: 'fd1',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 386–387why, one step back
386 message: ['stdout', '\'ignore\''],
387});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 388–392why, one step back
388test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable(1)', testIterable, {
389 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},390 from: 'fd1',391 message: ['stdout', '\'ignore\''],392});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 393–397why, one step back
393test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe("stdout")', testPipeError, {
394 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},395 from: 'stdout',396 message: ['stdout', '\'ignore\''],397});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 398–402why, one step back
398test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex("stdout")', testNodeStream, {
399 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},400 from: 'stdout',401 message: ['stdout', '\'ignore\''],402});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 403–407why, one step back
403test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable("stdout")', testIterable, {
404 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},405 from: 'stdout',406 message: ['stdout', '\'ignore\''],407});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 408–411why, one step back
408test('Cannot set "stdio[1]" option to "ignore" to use .pipe()', testPipeError, {
409 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},410 message: ['stdio[1]', '\'ignore\''],411});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 412–415why, one step back
412test('Cannot set "stdio[1]" option to "ignore" to use .duplex()', testNodeStream, {
413 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},414 message: ['stdio[1]', '\'ignore\''],415});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 416–419why, one step back
416test('Cannot set "stdio[1]" option to "ignore" to use .iterable()', testIterable, {
417 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},418 message: ['stdio[1]', '\'ignore\''],419});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 420–423why, one step back
420test('Cannot set "stdio[0]" option to "ignore" to use .pipe()', testPipeError, {
421 destinationOptions: {stdio: ['ignore', 'pipe', 'pipe']},422 message: ['stdio[0]', '\'ignore\''],423});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 424–428why, one step back
424test('Cannot set "stdio[0]" option to "ignore" to use .duplex()', testNodeStream, {
425 sourceOptions: {stdio: ['ignore', 'pipe', 'pipe']},426 message: ['stdio[0]', '\'ignore\''],427 writable: true,428});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 429–430why, one step back
429test('Cannot set "stdio[1]" option to "ignore" to use .pipe(1)', testPipeError, {
430 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 431why, one step back
431 from: 'fd1',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 432–433why, one step back
432 message: ['stdio[1]', '\'ignore\''],
433});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 434–435why, one step back
434test('Cannot set "stdio[1]" option to "ignore" to use .duplex(1)', testNodeStream, {
435 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 436why, one step back
436 from: 'fd1',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 437–438why, one step back
437 message: ['stdio[1]', '\'ignore\''],
438});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 439–443why, one step back
439test('Cannot set "stdio[1]" option to "ignore" to use .iterable(1)', testIterable, {
440 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},441 from: 'fd1',442 message: ['stdio[1]', '\'ignore\''],443});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 444–446why, one step back
444test('Cannot set "stdio[0]" option to "ignore" to use .pipe(0)', testPipeError, {
445 destinationOptions: {stdio: ['ignore', 'pipe', 'pipe']},446 message: ['stdio[0]', '\'ignore\''],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 447why, one step back
447 to: 'fd0',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 448why, one step back
448});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 449–451why, one step back
449test('Cannot set "stdio[0]" option to "ignore" to use .duplex(0)', testNodeStream, {
450 sourceOptions: {stdio: ['ignore', 'pipe', 'pipe']},451 message: ['stdio[0]', '\'ignore\''],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 452why, one step back
452 to: 'fd0',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 453why, one step back
453});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 454–458why, one step back
454test('Cannot set "stdio[1]" option to "ignore" to use .pipe("stdout")', testPipeError, {
455 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},456 from: 'stdout',457 message: ['stdio[1]', '\'ignore\''],458});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 459–463why, one step back
459test('Cannot set "stdio[1]" option to "ignore" to use .duplex("stdout")', testNodeStream, {
460 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},461 from: 'stdout',462 message: ['stdio[1]', '\'ignore\''],463});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 464–468why, one step back
464test('Cannot set "stdio[1]" option to "ignore" to use .iterable("stdout")', testIterable, {
465 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},466 from: 'stdout',467 message: ['stdio[1]', '\'ignore\''],468});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 469–473why, one step back
469test('Cannot set "stdio[0]" option to "ignore" to use .pipe("stdin")', testPipeError, {
470 destinationOptions: {stdio: ['ignore', 'pipe', 'pipe']},471 message: ['stdio[0]', '\'ignore\''],472 to: 'stdin',473});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 474–478why, one step back
474test('Cannot set "stdio[0]" option to "ignore" to use .duplex("stdin")', testNodeStream, {
475 sourceOptions: {stdio: ['ignore', 'pipe', 'pipe']},476 message: ['stdio[0]', '\'ignore\''],477 to: 'stdin',478});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 479–480why, one step back
479test('Cannot set "stderr" option to "ignore" to use .pipe(2)', testPipeError, {
480 sourceOptions: {stderr: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 481why, one step back
481 from: 'fd2',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 482–483why, one step back
482 message: ['stderr', '\'ignore\''],
483});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 484–485why, one step back
484test('Cannot set "stderr" option to "ignore" to use .duplex(2)', testNodeStream, {
485 sourceOptions: {stderr: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 486why, one step back
486 from: 'fd2',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 487–488why, one step back
487 message: ['stderr', '\'ignore\''],
488});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 489–493why, one step back
489test('Cannot set "stderr" option to "ignore" to use .iterable(2)', testIterable, {
490 sourceOptions: {stderr: 'ignore'},491 from: 'fd2',492 message: ['stderr', '\'ignore\''],493});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 494–498why, one step back
494test('Cannot set "stderr" option to "ignore" to use .pipe("stderr")', testPipeError, {
495 sourceOptions: {stderr: 'ignore'},496 from: 'stderr',497 message: ['stderr', '\'ignore\''],498});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 499–503why, one step back
499test('Cannot set "stderr" option to "ignore" to use .duplex("stderr")', testNodeStream, {
500 sourceOptions: {stderr: 'ignore'},501 from: 'stderr',502 message: ['stderr', '\'ignore\''],503});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 504–508why, one step back
504test('Cannot set "stderr" option to "ignore" to use .iterable("stderr")', testIterable, {
505 sourceOptions: {stderr: 'ignore'},506 from: 'stderr',507 message: ['stderr', '\'ignore\''],508});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 509–510why, one step back
509test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe(2)', testPipeError, {
510 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 511why, one step back
511 from: 'fd2',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 512–513why, one step back
512 message: ['stderr', '\'ignore\''],
513});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 514–515why, one step back
514test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex(2)', testNodeStream, {
515 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 516why, one step back
516 from: 'fd2',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 517–518why, one step back
517 message: ['stderr', '\'ignore\''],
518});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 519–523why, one step back
519test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable(2)', testIterable, {
520 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},521 from: 'fd2',522 message: ['stderr', '\'ignore\''],523});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 524–528why, one step back
524test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe("stderr")', testPipeError, {
525 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},526 from: 'stderr',527 message: ['stderr', '\'ignore\''],528});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 529–533why, one step back
529test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex("stderr")', testNodeStream, {
530 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},531 from: 'stderr',532 message: ['stderr', '\'ignore\''],533});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 534–538why, one step back
534test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable("stderr")', testIterable, {
535 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},536 from: 'stderr',537 message: ['stderr', '\'ignore\''],538});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 539–540why, one step back
539test('Cannot set "stdio[2]" option to "ignore" to use .pipe(2)', testPipeError, {
540 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 541why, one step back
541 from: 'fd2',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 542–543why, one step back
542 message: ['stdio[2]', '\'ignore\''],
543});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 544–545why, one step back
544test('Cannot set "stdio[2]" option to "ignore" to use .duplex(2)', testNodeStream, {
545 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 546why, one step back
546 from: 'fd2',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 547–548why, one step back
547 message: ['stdio[2]', '\'ignore\''],
548});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 549–553why, one step back
549test('Cannot set "stdio[2]" option to "ignore" to use .iterable(2)', testIterable, {
550 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},551 from: 'fd2',552 message: ['stdio[2]', '\'ignore\''],553});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 554–558why, one step back
554test('Cannot set "stdio[2]" option to "ignore" to use .pipe("stderr")', testPipeError, {
555 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},556 from: 'stderr',557 message: ['stdio[2]', '\'ignore\''],558});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 559–563why, one step back
559test('Cannot set "stdio[2]" option to "ignore" to use .duplex("stderr")', testNodeStream, {
560 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},561 from: 'stderr',562 message: ['stdio[2]', '\'ignore\''],563});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 564–568why, one step back
564test('Cannot set "stdio[2]" option to "ignore" to use .iterable("stderr")', testIterable, {
565 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},566 from: 'stderr',567 message: ['stdio[2]', '\'ignore\''],568});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 569–570why, one step back
569test('Cannot set "stdio[3]" option to "ignore" to use .pipe(3)', testPipeError, {
570 sourceOptions: getStdio(3, 'ignore'),

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 571why, one step back
571 from: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 572–573why, one step back
572 message: ['stdio[3]', '\'ignore\''],
573});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 574–575why, one step back
574test('Cannot set "stdio[3]" option to "ignore" to use .duplex(3)', testNodeStream, {
575 sourceOptions: getStdio(3, 'ignore'),

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 576why, one step back
576 from: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 577–578why, one step back
577 message: ['stdio[3]', '\'ignore\''],
578});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 579–583why, one step back
579test('Cannot set "stdio[3]" option to "ignore" to use .iterable(3)', testIterable, {
580 sourceOptions: getStdio(3, 'ignore'),581 from: 'fd3',582 message: ['stdio[3]', '\'ignore\''],583});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 584–588why, one step back
584test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe("all")', testPipeError, {
585 sourceOptions: {stdout: 'ignore', stderr: 'ignore', all: true},586 from: 'all',587 message: ['stdout', '\'ignore\''],588});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 589–593why, one step back
589test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex("all")', testNodeStream, {
590 sourceOptions: {stdout: 'ignore', stderr: 'ignore', all: true},591 from: 'all',592 message: ['stdout', '\'ignore\''],593});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 594–598why, one step back
594test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable("all")', testIterable, {
595 sourceOptions: {stdout: 'ignore', stderr: 'ignore', all: true},596 from: 'all',597 message: ['stdout', '\'ignore\''],598});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 599–603why, one step back
599test('Cannot set "stdio[1]" + "stdio[2]" option to "ignore" to use .pipe("all")', testPipeError, {
600 sourceOptions: {stdio: ['pipe', 'ignore', 'ignore'], all: true},601 from: 'all',602 message: ['stdio[1]', '\'ignore\''],603});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 604–608why, one step back
604test('Cannot set "stdio[1]" + "stdio[2]" option to "ignore" to use .duplex("all")', testNodeStream, {
605 sourceOptions: {stdio: ['pipe', 'ignore', 'ignore'], all: true},606 from: 'all',607 message: ['stdio[1]', '\'ignore\''],608});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 609–613why, one step back
609test('Cannot set "stdio[1]" + "stdio[2]" option to "ignore" to use .iterable("all")', testIterable, {
610 sourceOptions: {stdio: ['pipe', 'ignore', 'ignore'], all: true},611 from: 'all',612 message: ['stdio[1]', '\'ignore\''],613});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 614–617why, one step back
614test('Cannot set "stdout" option to "inherit" to use .pipe()', testPipeError, {
615 sourceOptions: {stdout: 'inherit'},616 message: ['stdout', '\'inherit\''],617});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 618–621why, one step back
618test('Cannot set "stdout" option to "inherit" to use .duplex()', testNodeStream, {
619 sourceOptions: {stdout: 'inherit'},620 message: ['stdout', '\'inherit\''],621});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 622–625why, one step back
622test('Cannot set "stdout" option to "inherit" to use .iterable()', testIterable, {
623 sourceOptions: {stdout: 'inherit'},624 message: ['stdout', '\'inherit\''],625});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 626–629why, one step back
626test('Cannot set "stdin" option to "inherit" to use .pipe()', testPipeError, {
627 destinationOptions: {stdin: 'inherit'},628 message: ['stdin', '\'inherit\''],629});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 630–634why, one step back
630test('Cannot set "stdin" option to "inherit" to use .duplex()', testNodeStream, {
631 sourceOptions: {stdin: 'inherit'},632 message: ['stdin', '\'inherit\''],633 writable: true,634});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 635–638why, one step back
635test('Cannot set "stdout" option to "ipc" to use .pipe()', testPipeError, {
636 sourceOptions: {stdout: 'ipc'},637 message: ['stdout', '\'ipc\''],638});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 639–642why, one step back
639test('Cannot set "stdout" option to "ipc" to use .duplex()', testNodeStream, {
640 sourceOptions: {stdout: 'ipc'},641 message: ['stdout', '\'ipc\''],642});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 643–646why, one step back
643test('Cannot set "stdout" option to "ipc" to use .iterable()', testIterable, {
644 sourceOptions: {stdout: 'ipc'},645 message: ['stdout', '\'ipc\''],646});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 647–650why, one step back
647test('Cannot set "stdin" option to "ipc" to use .pipe()', testPipeError, {
648 destinationOptions: {stdin: 'ipc'},649 message: ['stdin', '\'ipc\''],650});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 651–655why, one step back
651test('Cannot set "stdin" option to "ipc" to use .duplex()', testNodeStream, {
652 sourceOptions: {stdin: 'ipc'},653 message: ['stdin', '\'ipc\''],654 writable: true,655});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 656–659why, one step back
656test('Cannot set "stdout" option to file descriptors to use .pipe()', testPipeError, {
657 sourceOptions: {stdout: 1},658 message: ['stdout', '1'],659});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 660–663why, one step back
660test('Cannot set "stdout" option to file descriptors to use .duplex()', testNodeStream, {
661 sourceOptions: {stdout: 1},662 message: ['stdout', '1'],663});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 664–667why, one step back
664test('Cannot set "stdout" option to file descriptors to use .iterable()', testIterable, {
665 sourceOptions: {stdout: 1},666 message: ['stdout', '1'],667});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 668–671why, one step back
668test('Cannot set "stdin" option to file descriptors to use .pipe()', testPipeError, {
669 destinationOptions: {stdin: 0},670 message: ['stdin', '0'],671});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 672–676why, one step back
672test('Cannot set "stdin" option to file descriptors to use .duplex()', testNodeStream, {
673 sourceOptions: {stdin: 0},674 message: ['stdin', '0'],675 writable: true,676});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 677–680why, one step back
677test('Cannot set "stdout" option to Node.js streams to use .pipe()', testPipeError, {
678 sourceOptions: {stdout: process.stdout},679 message: ['stdout', 'Stream'],680});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 681–684why, one step back
681test('Cannot set "stdout" option to Node.js streams to use .duplex()', testNodeStream, {
682 sourceOptions: {stdout: process.stdout},683 message: ['stdout', 'Stream'],684});

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 685–688why, one step back
685test('Cannot set "stdout" option to Node.js streams to use .iterable()', testIterable, {
686 sourceOptions: {stdout: process.stdout},687 message: ['stdout', 'Stream'],688});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 689–692why, one step back
689test('Cannot set "stdin" option to Node.js streams to use .pipe()', testPipeError, {
690 destinationOptions: {stdin: process.stdin},691 message: ['stdin', 'Stream'],692});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 693–697why, one step back
693test('Cannot set "stdin" option to Node.js streams to use .duplex()', testNodeStream, {
694 sourceOptions: {stdin: process.stdin},695 message: ['stdin', 'Stream'],696 writable: true,697});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 698–700why, one step back
698test('Cannot set "stdio[3]" option to Node.js Writable streams to use .pipe()', testPipeError, {
699 sourceOptions: getStdio(3, process.stdout),700 message: ['stdio[3]', 'Stream'],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 701why, one step back
701 from: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 702why, one step back
702});

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 703why, one step back
703test('Cannot set "stdio[3]" option to Node.js Writable streams to use .duplex()', testNodeStream, {

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

lines 704–708why, one step back
704 sourceOptions: getStdio(3, process.stdout),
705 message: ['stdio[3]', 'Stream'],706 from: 'fd3',707});708test('Cannot set "stdio[3]" option to Node.js Writable streams to use .iterable()', testIterable, {

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 709–710why, one step back
709 sourceOptions: getStdio(3, process.stdout),
710 message: ['stdio[3]', 'Stream'],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 711why, one step back
711 from: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 712why, one step back
712});

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

lines 713–714why, one step back
713test('Cannot set "stdio[3]" option to Node.js Readable streams to use .pipe()', testPipeError, {
714 destinationOptions: getStdio(3, process.stdin),

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

line 715why, one step back
715 message: ['stdio[3]', 'Stream'],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 716why, one step back
716 to: 'fd3',

Add `.readable()`, `.writable()` and `.duplex()` methods (#912)ehmickybefore adoption666f7f9

lines 717–719why, one step back
717});
718test('Cannot set "stdio[3]" option to Node.js Readable streams to use .duplex()', testNodeStream, {719 sourceOptions: getStdio(3, process.stdin),

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 720why, one step back
720 message: ['stdio[3]', 'Stream'],

Rename `from|to: 3` to `from|to: 'fd3'` (#920)ehmickybefore adoption8dfdd91

line 721why, one step back
721 to: 'fd3',

Allow piping process to any file descriptor (#903)ehmickybefore adoption6642cd2

line 722why, one step back
722});

Improve piping processes (#834)ehmickybefore adoption1a47ea2

lines 723–733why, one step back
723
724test('Destination stream is ended when first argument is invalid', async t => {725 const source = execa('empty.js', {stdout: 'ignore'});726 const destination = execa('stdin.js');727 const pipePromise = source.pipe(destination);728729 await assertPipeError(t, pipePromise, 'option is incompatible');730 await source;731 t.like(await destination, {stdout: ''});732});733

Improve `.pipe()` method (#859)ehmickybefore adoption2ef9e86

lines 734–738why, one step back
734test('Destination stream is ended when first argument is invalid - $', async t => {
735 const pipePromise = execa('empty.js', {stdout: 'ignore'}).pipe`stdin.js`;736 await assertPipeError(t, pipePromise, 'option is incompatible');737});738

Improve piping processes (#834)ehmickybefore adoption1a47ea2

lines 739–740why, one step back
739test('Source stream is aborted when second argument is invalid', async t => {
740 const source = execa('noop.js', [foobarString]);

Add `.pipe(command, args, options)` shortcut (#864)ehmickybefore adoption08f8e5d

line 741why, one step back
741 const pipePromise = source.pipe(false);

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 742why, one step back
742

Rename `spawned` and `child process` to `subprocess` (#897)ehmickybefore adoption8fe2343

line 743why, one step back
743 await assertPipeError(t, pipePromise, 'an Execa subprocess');

Improve piping processes (#834)ehmickybefore adoption1a47ea2

lines 744–748why, one step back
744 t.like(await source, {stdout: ''});
745});746747test('Both arguments might be invalid', async t => {748 const source = execa('empty.js', {stdout: 'ignore'});

Add `.pipe(command, args, options)` shortcut (#864)ehmickybefore adoption08f8e5d

line 749why, one step back
749 const pipePromise = source.pipe(false);

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 750why, one step back
750

Rename `spawned` and `child process` to `subprocess` (#897)ehmickybefore adoption8fe2343

line 751why, one step back
751 await assertPipeError(t, pipePromise, 'an Execa subprocess');

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 752why, one step back
752 t.like(await source, {stdout: undefined});

Improve `.pipe()` method (#859)ehmickybefore adoption2ef9e86

lines 753–762why, one step back
753});
754755test('Sets the right error message when the "all" option is incompatible - execa.$', async t => {756 await assertPipeError(757 t,758 execa('empty.js')759 .pipe({all: false})`stdin.js`760 .pipe(execa('empty.js'), {from: 'all'}),761 '"all" option must be true',762 );

Improve piping processes (#834)ehmickybefore adoption1a47ea2

line 763why, one step back
763});

Fix errors thrown by `.pipe()` (#854)ehmickybefore adoption46ba4b4

lines 764–777why, one step back
764
765test('Sets the right error message when the "all" option is incompatible - execa.execa', async t => {766 await assertPipeError(767 t,768 execa('empty.js')769 .pipe(execa('stdin.js', {all: false}))770 .pipe(execa('empty.js'), {from: 'all'}),771 '"all" option must be true',772 );773});774775test('Sets the right error message when the "all" option is incompatible - early error', async t => {776 await assertPipeError(777 t,

Rename `spawned` and `child process` to `subprocess` (#897)ehmickybefore adoption8fe2343

line 778why, one step back
778 getEarlyErrorSubprocess()

Fix errors thrown by `.pipe()` (#854)ehmickybefore adoption46ba4b4

lines 779–783why, one step back
779 .pipe(execa('stdin.js', {all: false}))
780 .pipe(execa('empty.js'), {from: 'all'}),781 '"all" option must be true',782 );783});