Skip to content
Myr

fd-options.js

This file

Path

test/arguments/fd-options.js

717 lines · 25.8 KiB · JavaScript

Last changed by

TweaksSindre Sorhusbefore adoption698a1b8

History of this file

Take it

The walk stopped after 200 commits: lines older than 9f65b86 point at it.

TweaksSindre Sorhusbefore adoption698a1b8

line 1why, one step back
1import assert from 'node:assert/strict';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 2–4why, one step back
2import {PassThrough} from 'node:stream';
3import {spawn} from 'node:child_process';4import process from 'node:process';

TweaksSindre Sorhusbefore adoption698a1b8

lines 5–6why, one step back
5import test from 'node:test';
6import {assertThrows} from '../helpers/assert.js';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 7–18why, one step back
7import {execa} from '../../index.js';
8import {setFixtureDirectory} from '../helpers/fixtures-directory.js';9import {fullStdio, getStdio} from '../helpers/stdio.js';10import {getEarlyErrorSubprocess} from '../helpers/early-error.js';11import {assertPipeError} from '../helpers/pipe.js';1213setFixtureDirectory();1415const getMessage = message => Array.isArray(message)16 ? `"${message[0]}: ${message[1]}" option is incompatible`17 : message;18

TweaksSindre Sorhusbefore adoption698a1b8

line 19why, one step back
19const testPipeError = async ({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 20–30why, one step back
20 message,
21 sourceOptions = {},22 destinationOptions = {},23 getSource = () => execa('empty.js', sourceOptions),24 getDestination = () => execa('empty.js', destinationOptions),25 isScript = false,26 from,27 to,28}) => {29 const source = getSource();30 const pipePromise = isScript ? source.pipe({from, to})`empty.js` : source.pipe(getDestination(), {from, to});

TweaksSindre Sorhusbefore adoption698a1b8

line 31why, one step back
31 await assertPipeError(pipePromise, getMessage(message));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 32–33why, one step back
32};
33

TweaksSindre Sorhusbefore adoption698a1b8

line 34why, one step back
34const testNodeStream = async ({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 35–57why, one step back
35 message,
36 sourceOptions = {},37 getSource = () => execa('empty.js', sourceOptions),38 from,39 to,40 writable = to !== undefined,41}) => {42 assertNodeStream({43 message,44 getSource,45 from,46 to,47 methodName: writable ? 'writable' : 'readable',48 });49 assertNodeStream({50 message,51 getSource,52 from,53 to,54 methodName: 'duplex',55 });56};57

TweaksSindre Sorhusbefore adoption698a1b8

lines 58–59why, one step back
58const assertNodeStream = ({message, getSource, from, to, methodName}) => {
59 const error = assertThrows(() => {

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 60–61why, one step back
60 getSource()[methodName]({from, to});
61 });

TweaksSindre Sorhusbefore adoption698a1b8

line 62why, one step back
62 assert.ok(error.message.includes(getMessage(message)));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 63–64why, one step back
63};
64

TweaksSindre Sorhusbefore adoption698a1b8

line 65why, one step back
65const testIterable = async ({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 66–70why, one step back
66 message,
67 sourceOptions = {},68 getSource = () => execa('empty.js', sourceOptions),69 from,70}) => {

TweaksSindre Sorhusbefore adoption698a1b8

line 71why, one step back
71 const error = assertThrows(() => {

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 72–73why, one step back
72 getSource().iterable({from});
73 });

TweaksSindre Sorhusbefore adoption698a1b8

line 74why, one step back
74 assert.ok(error.message.includes(getMessage(message)));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 75–76why, one step back
75};
76

TweaksSindre Sorhusbefore adoption698a1b8

line 77why, one step back
77test('Must set "all" option to "true" to use .pipe("all")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 78–79why, one step back
78 from: 'all',
79 message: '"all" option must be true',

TweaksSindre Sorhusbefore adoption698a1b8

lines 80–81why, one step back
80}));
81test('Must set "all" option to "true" to use .duplex("all")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 82–83why, one step back
82 from: 'all',
83 message: '"all" option must be true',

TweaksSindre Sorhusbefore adoption698a1b8

lines 84–85why, one step back
84}));
85test('Must set "all" option to "true" to use .iterable("all")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 86–87why, one step back
86 from: 'all',
87 message: '"all" option must be true',

TweaksSindre Sorhusbefore adoption698a1b8

lines 88–89why, one step back
88}));
89test('.pipe() cannot pipe to non-subprocesses', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 90–91why, one step back
90 getDestination: () => new PassThrough(),
91 message: 'an Execa subprocess',

TweaksSindre Sorhusbefore adoption698a1b8

lines 92–93why, one step back
92}));
93test('.pipe() cannot pipe to non-Execa subprocesses', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 94–95why, one step back
94 getDestination: () => spawn('node', ['--version']),
95 message: 'an Execa subprocess',

TweaksSindre Sorhusbefore adoption698a1b8

lines 96–97why, one step back
96}));
97test('.pipe() "from" option cannot be "stdin"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 98–99why, one step back
98 from: 'stdin',
99 message: '"from" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 100–101why, one step back
100}));
101test('.duplex() "from" option cannot be "stdin"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 102–103why, one step back
102 from: 'stdin',
103 message: '"from" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 104–105why, one step back
104}));
105test('.iterable() "from" option cannot be "stdin"', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 106–107why, one step back
106 from: 'stdin',
107 message: '"from" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 108–109why, one step back
108}));
109test('$.pipe() "from" option cannot be "stdin"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 110–112why, one step back
110 from: 'stdin',
111 isScript: true,112 message: '"from" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 113–114why, one step back
113}));
114test('.pipe() "to" option cannot be "stdout"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 115–116why, one step back
115 to: 'stdout',
116 message: '"to" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 117–118why, one step back
117}));
118test('.duplex() "to" option cannot be "stdout"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 119–120why, one step back
119 to: 'stdout',
120 message: '"to" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 121–122why, one step back
121}));
122test('$.pipe() "to" option cannot be "stdout"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 123–125why, one step back
123 to: 'stdout',
124 isScript: true,125 message: '"to" must not be',

TweaksSindre Sorhusbefore adoption698a1b8

lines 126–127why, one step back
126}));
127test('.pipe() "from" option cannot be any string', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 128–129why, one step back
128 from: 'other',
129 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 130–131why, one step back
130}));
131test('.duplex() "from" option cannot be any string', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 132–133why, one step back
132 from: 'other',
133 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 134–135why, one step back
134}));
135test('.iterable() "from" option cannot be any string', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 136–137why, one step back
136 from: 'other',
137 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 138–139why, one step back
138}));
139test('.pipe() "to" option cannot be any string', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 140–141why, one step back
140 to: 'other',
141 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 142–143why, one step back
142}));
143test('.duplex() "to" option cannot be any string', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 144–145why, one step back
144 to: 'other',
145 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 146–147why, one step back
146}));
147test('.pipe() "from" option cannot be a number without "fd"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 148–149why, one step back
148 from: '1',
149 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 150–151why, one step back
150}));
151test('.duplex() "from" option cannot be a number without "fd"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 152–153why, one step back
152 from: '1',
153 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 154–155why, one step back
154}));
155test('.iterable() "from" option cannot be a number without "fd"', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 156–157why, one step back
156 from: '1',
157 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 158–159why, one step back
158}));
159test('.pipe() "to" option cannot be a number without "fd"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 160–161why, one step back
160 to: '0',
161 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 162–163why, one step back
162}));
163test('.duplex() "to" option cannot be a number without "fd"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 164–165why, one step back
164 to: '0',
165 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 166–167why, one step back
166}));
167test('.pipe() "from" option cannot be just "fd"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 168–169why, one step back
168 from: 'fd',
169 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 170–171why, one step back
170}));
171test('.duplex() "from" option cannot be just "fd"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 172–173why, one step back
172 from: 'fd',
173 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 174–175why, one step back
174}));
175test('.iterable() "from" option cannot be just "fd"', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 176–177why, one step back
176 from: 'fd',
177 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 178–179why, one step back
178}));
179test('.pipe() "to" option cannot be just "fd"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 180–181why, one step back
180 to: 'fd',
181 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 182–183why, one step back
182}));
183test('.duplex() "to" option cannot be just "fd"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 184–185why, one step back
184 to: 'fd',
185 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 186–187why, one step back
186}));
187test('.pipe() "from" option cannot be a float', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 188–189why, one step back
188 from: 'fd1.5',
189 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 190–191why, one step back
190}));
191test('.duplex() "from" option cannot be a float', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 192–193why, one step back
192 from: 'fd1.5',
193 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 194–195why, one step back
194}));
195test('.iterable() "from" option cannot be a float', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 196–197why, one step back
196 from: 'fd1.5',
197 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 198–199why, one step back
198}));
199test('.pipe() "to" option cannot be a float', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 200–201why, one step back
200 to: 'fd1.5',
201 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 202–203why, one step back
202}));
203test('.duplex() "to" option cannot be a float', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 204–205why, one step back
204 to: 'fd1.5',
205 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 206–207why, one step back
206}));
207test('.pipe() "from" option cannot be a negative number', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 208–209why, one step back
208 from: 'fd-1',
209 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 210–211why, one step back
210}));
211test('.duplex() "from" option cannot be a negative number', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 212–213why, one step back
212 from: 'fd-1',
213 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 214–215why, one step back
214}));
215test('.iterable() "from" option cannot be a negative number', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 216–217why, one step back
216 from: 'fd-1',
217 message: 'must be "stdout", "stderr", "all"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 218–219why, one step back
218}));
219test('.pipe() "to" option cannot be a negative number', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 220–221why, one step back
220 to: 'fd-1',
221 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 222–223why, one step back
222}));
223test('.duplex() "to" option cannot be a negative number', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 224–225why, one step back
224 to: 'fd-1',
225 message: 'must be "stdin"',

TweaksSindre Sorhusbefore adoption698a1b8

lines 226–227why, one step back
226}));
227test('.pipe() "from" option cannot be a non-existing file descriptor', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 228–229why, one step back
228 from: 'fd3',
229 message: 'file descriptor does not exist',

TweaksSindre Sorhusbefore adoption698a1b8

lines 230–231why, one step back
230}));
231test('.duplex() "from" cannot be a non-existing file descriptor', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 232–233why, one step back
232 from: 'fd3',
233 message: 'file descriptor does not exist',

TweaksSindre Sorhusbefore adoption698a1b8

lines 234–235why, one step back
234}));
235test('.iterable() "from" cannot be a non-existing file descriptor', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 236–237why, one step back
236 from: 'fd3',
237 message: 'file descriptor does not exist',

TweaksSindre Sorhusbefore adoption698a1b8

lines 238–239why, one step back
238}));
239test('.pipe() "to" option cannot be a non-existing file descriptor', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 240–241why, one step back
240 to: 'fd3',
241 message: 'file descriptor does not exist',

TweaksSindre Sorhusbefore adoption698a1b8

lines 242–243why, one step back
242}));
243test('.duplex() "to" cannot be a non-existing file descriptor', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 244–245why, one step back
244 to: 'fd3',
245 message: 'file descriptor does not exist',

TweaksSindre Sorhusbefore adoption698a1b8

lines 246–247why, one step back
246}));
247test('.pipe() "from" option cannot be an input file descriptor', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 248–250why, one step back
248 sourceOptions: getStdio(3, new Uint8Array()),
249 from: 'fd3',250 message: 'must be a readable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 251–252why, one step back
251}));
252test('.duplex() "from" option cannot be an input file descriptor', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 253–255why, one step back
253 sourceOptions: getStdio(3, new Uint8Array()),
254 from: 'fd3',255 message: 'must be a readable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 256–257why, one step back
256}));
257test('.iterable() "from" option cannot be an input file descriptor', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 258–260why, one step back
258 sourceOptions: getStdio(3, new Uint8Array()),
259 from: 'fd3',260 message: 'must be a readable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 261–262why, one step back
261}));
262test('.pipe() "to" option cannot be an output file descriptor', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 263–265why, one step back
263 destinationOptions: fullStdio,
264 to: 'fd3',265 message: 'must be a writable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 266–267why, one step back
266}));
267test('.duplex() "to" option cannot be an output file descriptor', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 268–270why, one step back
268 sourceOptions: fullStdio,
269 to: 'fd3',270 message: 'must be a writable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 271–272why, one step back
271}));
272test('.duplex() "to" option on an output file descriptor suggests the input-pipe syntax', () => testNodeStream({

Add `{value: 'pipe', input: true}` to use an additional file descriptor as input (#1246)Sindre Sorhusbefore adoption487a3a4

lines 273–275why, one step back
273 sourceOptions: fullStdio,
274 to: 'fd3',275 message: '{value: \'pipe\', input: true}',

TweaksSindre Sorhusbefore adoption698a1b8

lines 276–277why, one step back
276}));
277test('.pipe() "to" option cannot be "all"', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 278–280why, one step back
278 destinationOptions: fullStdio,
279 to: 'all',280 message: 'must be a writable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 281–282why, one step back
281}));
282test('.duplex() "to" option cannot be "all"', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 283–285why, one step back
283 sourceOptions: fullStdio,
284 to: 'all',285 message: 'must be a writable stream',

TweaksSindre Sorhusbefore adoption698a1b8

lines 286–287why, one step back
286}));
287test('Cannot set "stdout" option to "ignore" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 288–289why, one step back
288 sourceOptions: {stdout: 'ignore'},
289 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 290–291why, one step back
290}));
291test('Cannot set "stdout" option to "ignore" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 292–293why, one step back
292 sourceOptions: {stdout: 'ignore'},
293 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 294–295why, one step back
294}));
295test('Cannot set "stdout" option to "ignore" to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 296–297why, one step back
296 sourceOptions: {stdout: 'ignore'},
297 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 298–299why, one step back
298}));
299test('Cannot set "stdin" option to "ignore" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 300–301why, one step back
300 destinationOptions: {stdin: 'ignore'},
301 message: ['stdin', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 302–303why, one step back
302}));
303test('Cannot set "stdin" option to "ignore" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 304–306why, one step back
304 sourceOptions: {stdin: 'ignore'},
305 message: ['stdin', '\'ignore\''],306 writable: true,

TweaksSindre Sorhusbefore adoption698a1b8

lines 307–308why, one step back
307}));
308test('Cannot set "stdout" option to "ignore" to use .pipe(1)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 309–311why, one step back
309 sourceOptions: {stdout: 'ignore'},
310 from: 'fd1',311 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 312–313why, one step back
312}));
313test('Cannot set "stdout" option to "ignore" to use .duplex(1)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 314–316why, one step back
314 sourceOptions: {stdout: 'ignore'},
315 from: 'fd1',316 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 317–318why, one step back
317}));
318test('Cannot set "stdout" option to "ignore" to use .iterable(1)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 319–321why, one step back
319 sourceOptions: {stdout: 'ignore'},
320 from: 'fd1',321 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 322–323why, one step back
322}));
323test('Cannot set "stdin" option to "ignore" to use .pipe(0)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 324–326why, one step back
324 destinationOptions: {stdin: 'ignore'},
325 message: ['stdin', '\'ignore\''],326 to: 'fd0',

TweaksSindre Sorhusbefore adoption698a1b8

lines 327–328why, one step back
327}));
328test('Cannot set "stdin" option to "ignore" to use .duplex(0)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 329–331why, one step back
329 sourceOptions: {stdin: 'ignore'},
330 message: ['stdin', '\'ignore\''],331 to: 'fd0',

TweaksSindre Sorhusbefore adoption698a1b8

lines 332–333why, one step back
332}));
333test('Cannot set "stdout" option to "ignore" to use .pipe("stdout")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 334–336why, one step back
334 sourceOptions: {stdout: 'ignore'},
335 from: 'stdout',336 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 337–338why, one step back
337}));
338test('Cannot set "stdout" option to "ignore" to use .duplex("stdout")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 339–341why, one step back
339 sourceOptions: {stdout: 'ignore'},
340 from: 'stdout',341 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 342–343why, one step back
342}));
343test('Cannot set "stdout" option to "ignore" to use .iterable("stdout")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 344–346why, one step back
344 sourceOptions: {stdout: 'ignore'},
345 from: 'stdout',346 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 347–348why, one step back
347}));
348test('Cannot set "stdin" option to "ignore" to use .pipe("stdin")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 349–351why, one step back
349 destinationOptions: {stdin: 'ignore'},
350 message: ['stdin', '\'ignore\''],351 to: 'stdin',

TweaksSindre Sorhusbefore adoption698a1b8

lines 352–353why, one step back
352}));
353test('Cannot set "stdin" option to "ignore" to use .duplex("stdin")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 354–356why, one step back
354 sourceOptions: {stdin: 'ignore'},
355 message: ['stdin', '\'ignore\''],356 to: 'stdin',

TweaksSindre Sorhusbefore adoption698a1b8

lines 357–358why, one step back
357}));
358test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 359–360why, one step back
359 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
360 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 361–362why, one step back
361}));
362test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 363–364why, one step back
363 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
364 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 365–366why, one step back
365}));
366test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 367–368why, one step back
367 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
368 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 369–370why, one step back
369}));
370test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe(1)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 371–373why, one step back
371 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
372 from: 'fd1',373 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 374–375why, one step back
374}));
375test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex(1)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 376–378why, one step back
376 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
377 from: 'fd1',378 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 379–380why, one step back
379}));
380test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable(1)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 381–383why, one step back
381 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
382 from: 'fd1',383 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 384–385why, one step back
384}));
385test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe("stdout")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 386–388why, one step back
386 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
387 from: 'stdout',388 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 389–390why, one step back
389}));
390test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex("stdout")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 391–393why, one step back
391 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
392 from: 'stdout',393 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 394–395why, one step back
394}));
395test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable("stdout")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 396–398why, one step back
396 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
397 from: 'stdout',398 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 399–400why, one step back
399}));
400test('Cannot set "stdio[1]" option to "ignore" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 401–402why, one step back
401 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
402 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 403–404why, one step back
403}));
404test('Cannot set "stdio[1]" option to "ignore" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 405–406why, one step back
405 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
406 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 407–408why, one step back
407}));
408test('Cannot set "stdio[1]" option to "ignore" to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 409–410why, one step back
409 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
410 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 411–412why, one step back
411}));
412test('Cannot set "stdio[0]" option to "ignore" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 413–414why, one step back
413 destinationOptions: {stdio: ['ignore', 'pipe', 'pipe']},
414 message: ['stdio[0]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 415–416why, one step back
415}));
416test('Cannot set "stdio[0]" option to "ignore" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 417–419why, one step back
417 sourceOptions: {stdio: ['ignore', 'pipe', 'pipe']},
418 message: ['stdio[0]', '\'ignore\''],419 writable: true,

TweaksSindre Sorhusbefore adoption698a1b8

lines 420–421why, one step back
420}));
421test('Cannot set "stdio[1]" option to "ignore" to use .pipe(1)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 422–424why, one step back
422 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
423 from: 'fd1',424 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 425–426why, one step back
425}));
426test('Cannot set "stdio[1]" option to "ignore" to use .duplex(1)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 427–429why, one step back
427 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
428 from: 'fd1',429 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 430–431why, one step back
430}));
431test('Cannot set "stdio[1]" option to "ignore" to use .iterable(1)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 432–434why, one step back
432 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
433 from: 'fd1',434 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 435–436why, one step back
435}));
436test('Cannot set "stdio[0]" option to "ignore" to use .pipe(0)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 437–439why, one step back
437 destinationOptions: {stdio: ['ignore', 'pipe', 'pipe']},
438 message: ['stdio[0]', '\'ignore\''],439 to: 'fd0',

TweaksSindre Sorhusbefore adoption698a1b8

lines 440–441why, one step back
440}));
441test('Cannot set "stdio[0]" option to "ignore" to use .duplex(0)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 442–444why, one step back
442 sourceOptions: {stdio: ['ignore', 'pipe', 'pipe']},
443 message: ['stdio[0]', '\'ignore\''],444 to: 'fd0',

TweaksSindre Sorhusbefore adoption698a1b8

lines 445–446why, one step back
445}));
446test('Cannot set "stdio[1]" option to "ignore" to use .pipe("stdout")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 447–449why, one step back
447 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
448 from: 'stdout',449 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 450–451why, one step back
450}));
451test('Cannot set "stdio[1]" option to "ignore" to use .duplex("stdout")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 452–454why, one step back
452 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
453 from: 'stdout',454 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 455–456why, one step back
455}));
456test('Cannot set "stdio[1]" option to "ignore" to use .iterable("stdout")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 457–459why, one step back
457 sourceOptions: {stdio: ['pipe', 'ignore', 'pipe']},
458 from: 'stdout',459 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 460–461why, one step back
460}));
461test('Cannot set "stdio[0]" option to "ignore" to use .pipe("stdin")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 462–464why, one step back
462 destinationOptions: {stdio: ['ignore', 'pipe', 'pipe']},
463 message: ['stdio[0]', '\'ignore\''],464 to: 'stdin',

TweaksSindre Sorhusbefore adoption698a1b8

lines 465–466why, one step back
465}));
466test('Cannot set "stdio[0]" option to "ignore" to use .duplex("stdin")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 467–469why, one step back
467 sourceOptions: {stdio: ['ignore', 'pipe', 'pipe']},
468 message: ['stdio[0]', '\'ignore\''],469 to: 'stdin',

TweaksSindre Sorhusbefore adoption698a1b8

lines 470–471why, one step back
470}));
471test('Cannot set "stderr" option to "ignore" to use .pipe(2)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 472–474why, one step back
472 sourceOptions: {stderr: 'ignore'},
473 from: 'fd2',474 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 475–476why, one step back
475}));
476test('Cannot set "stderr" option to "ignore" to use .duplex(2)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 477–479why, one step back
477 sourceOptions: {stderr: 'ignore'},
478 from: 'fd2',479 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 480–481why, one step back
480}));
481test('Cannot set "stderr" option to "ignore" to use .iterable(2)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 482–484why, one step back
482 sourceOptions: {stderr: 'ignore'},
483 from: 'fd2',484 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 485–486why, one step back
485}));
486test('Cannot set "stderr" option to "ignore" to use .pipe("stderr")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 487–489why, one step back
487 sourceOptions: {stderr: 'ignore'},
488 from: 'stderr',489 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 490–491why, one step back
490}));
491test('Cannot set "stderr" option to "ignore" to use .duplex("stderr")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 492–494why, one step back
492 sourceOptions: {stderr: 'ignore'},
493 from: 'stderr',494 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 495–496why, one step back
495}));
496test('Cannot set "stderr" option to "ignore" to use .iterable("stderr")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 497–499why, one step back
497 sourceOptions: {stderr: 'ignore'},
498 from: 'stderr',499 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 500–501why, one step back
500}));
501test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe(2)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 502–504why, one step back
502 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
503 from: 'fd2',504 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 505–506why, one step back
505}));
506test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex(2)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 507–509why, one step back
507 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
508 from: 'fd2',509 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 510–511why, one step back
510}));
511test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable(2)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 512–514why, one step back
512 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
513 from: 'fd2',514 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 515–516why, one step back
515}));
516test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe("stderr")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 517–519why, one step back
517 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
518 from: 'stderr',519 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 520–521why, one step back
520}));
521test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex("stderr")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 522–524why, one step back
522 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
523 from: 'stderr',524 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 525–526why, one step back
525}));
526test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable("stderr")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 527–529why, one step back
527 sourceOptions: {stdout: 'ignore', stderr: 'ignore'},
528 from: 'stderr',529 message: ['stderr', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 530–531why, one step back
530}));
531test('Cannot set "stdio[2]" option to "ignore" to use .pipe(2)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 532–534why, one step back
532 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},
533 from: 'fd2',534 message: ['stdio[2]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 535–536why, one step back
535}));
536test('Cannot set "stdio[2]" option to "ignore" to use .duplex(2)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 537–539why, one step back
537 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},
538 from: 'fd2',539 message: ['stdio[2]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 540–541why, one step back
540}));
541test('Cannot set "stdio[2]" option to "ignore" to use .iterable(2)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 542–544why, one step back
542 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},
543 from: 'fd2',544 message: ['stdio[2]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 545–546why, one step back
545}));
546test('Cannot set "stdio[2]" option to "ignore" to use .pipe("stderr")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 547–549why, one step back
547 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},
548 from: 'stderr',549 message: ['stdio[2]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 550–551why, one step back
550}));
551test('Cannot set "stdio[2]" option to "ignore" to use .duplex("stderr")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 552–554why, one step back
552 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},
553 from: 'stderr',554 message: ['stdio[2]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 555–556why, one step back
555}));
556test('Cannot set "stdio[2]" option to "ignore" to use .iterable("stderr")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 557–559why, one step back
557 sourceOptions: {stdio: ['pipe', 'pipe', 'ignore']},
558 from: 'stderr',559 message: ['stdio[2]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 560–561why, one step back
560}));
561test('Cannot set "stdio[3]" option to "ignore" to use .pipe(3)', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 562–564why, one step back
562 sourceOptions: getStdio(3, 'ignore'),
563 from: 'fd3',564 message: ['stdio[3]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 565–566why, one step back
565}));
566test('Cannot set "stdio[3]" option to "ignore" to use .duplex(3)', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 567–569why, one step back
567 sourceOptions: getStdio(3, 'ignore'),
568 from: 'fd3',569 message: ['stdio[3]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 570–571why, one step back
570}));
571test('Cannot set "stdio[3]" option to "ignore" to use .iterable(3)', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 572–574why, one step back
572 sourceOptions: getStdio(3, 'ignore'),
573 from: 'fd3',574 message: ['stdio[3]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 575–576why, one step back
575}));
576test('Cannot set "stdout" + "stderr" option to "ignore" to use .pipe("all")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 577–579why, one step back
577 sourceOptions: {stdout: 'ignore', stderr: 'ignore', all: true},
578 from: 'all',579 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 580–581why, one step back
580}));
581test('Cannot set "stdout" + "stderr" option to "ignore" to use .duplex("all")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 582–584why, one step back
582 sourceOptions: {stdout: 'ignore', stderr: 'ignore', all: true},
583 from: 'all',584 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 585–586why, one step back
585}));
586test('Cannot set "stdout" + "stderr" option to "ignore" to use .iterable("all")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 587–589why, one step back
587 sourceOptions: {stdout: 'ignore', stderr: 'ignore', all: true},
588 from: 'all',589 message: ['stdout', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 590–591why, one step back
590}));
591test('Cannot set "stdio[1]" + "stdio[2]" option to "ignore" to use .pipe("all")', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 592–594why, one step back
592 sourceOptions: {stdio: ['pipe', 'ignore', 'ignore'], all: true},
593 from: 'all',594 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 595–596why, one step back
595}));
596test('Cannot set "stdio[1]" + "stdio[2]" option to "ignore" to use .duplex("all")', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 597–599why, one step back
597 sourceOptions: {stdio: ['pipe', 'ignore', 'ignore'], all: true},
598 from: 'all',599 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 600–601why, one step back
600}));
601test('Cannot set "stdio[1]" + "stdio[2]" option to "ignore" to use .iterable("all")', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 602–604why, one step back
602 sourceOptions: {stdio: ['pipe', 'ignore', 'ignore'], all: true},
603 from: 'all',604 message: ['stdio[1]', '\'ignore\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 605–606why, one step back
605}));
606test('Cannot set "stdout" option to "inherit" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 607–608why, one step back
607 sourceOptions: {stdout: 'inherit'},
608 message: ['stdout', '\'inherit\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 609–610why, one step back
609}));
610test('Cannot set "stdout" option to "inherit" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 611–612why, one step back
611 sourceOptions: {stdout: 'inherit'},
612 message: ['stdout', '\'inherit\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 613–614why, one step back
613}));
614test('Cannot set "stdout" option to "inherit" to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 615–616why, one step back
615 sourceOptions: {stdout: 'inherit'},
616 message: ['stdout', '\'inherit\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 617–618why, one step back
617}));
618test('Cannot set "stdin" option to "inherit" to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 619–620why, one step back
619 destinationOptions: {stdin: 'inherit'},
620 message: ['stdin', '\'inherit\''],

TweaksSindre Sorhusbefore adoption698a1b8

lines 621–622why, one step back
621}));
622test('Cannot set "stdin" option to "inherit" to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 623–625why, one step back
623 sourceOptions: {stdin: 'inherit'},
624 message: ['stdin', '\'inherit\''],625 writable: true,

TweaksSindre Sorhusbefore adoption698a1b8

lines 626–627why, one step back
626}));
627test('Cannot set "stdout" option to file descriptors to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 628–629why, one step back
628 sourceOptions: {stdout: 1},
629 message: ['stdout', '1'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 630–631why, one step back
630}));
631test('Cannot set "stdout" option to file descriptors to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 632–633why, one step back
632 sourceOptions: {stdout: 1},
633 message: ['stdout', '1'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 634–635why, one step back
634}));
635test('Cannot set "stdout" option to file descriptors to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 636–637why, one step back
636 sourceOptions: {stdout: 1},
637 message: ['stdout', '1'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 638–639why, one step back
638}));
639test('Cannot set "stdin" option to file descriptors to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 640–641why, one step back
640 destinationOptions: {stdin: 0},
641 message: ['stdin', '0'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 642–643why, one step back
642}));
643test('Cannot set "stdin" option to file descriptors to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 644–646why, one step back
644 sourceOptions: {stdin: 0},
645 message: ['stdin', '0'],646 writable: true,

TweaksSindre Sorhusbefore adoption698a1b8

lines 647–648why, one step back
647}));
648test('Cannot set "stdout" option to Node.js streams to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 649–650why, one step back
649 sourceOptions: {stdout: process.stdout},
650 message: ['stdout', 'Stream'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 651–652why, one step back
651}));
652test('Cannot set "stdout" option to Node.js streams to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 653–654why, one step back
653 sourceOptions: {stdout: process.stdout},
654 message: ['stdout', 'Stream'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 655–656why, one step back
655}));
656test('Cannot set "stdout" option to Node.js streams to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 657–658why, one step back
657 sourceOptions: {stdout: process.stdout},
658 message: ['stdout', 'Stream'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 659–660why, one step back
659}));
660test('Cannot set "stdin" option to Node.js streams to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 661–662why, one step back
661 destinationOptions: {stdin: process.stdin},
662 message: ['stdin', 'Stream'],

TweaksSindre Sorhusbefore adoption698a1b8

lines 663–664why, one step back
663}));
664test('Cannot set "stdin" option to Node.js streams to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 665–667why, one step back
665 sourceOptions: {stdin: process.stdin},
666 message: ['stdin', 'Stream'],667 writable: true,

TweaksSindre Sorhusbefore adoption698a1b8

lines 668–669why, one step back
668}));
669test('Cannot set "stdio[3]" option to Node.js Writable streams to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 670–672why, one step back
670 sourceOptions: getStdio(3, process.stdout),
671 message: ['stdio[3]', 'Stream'],672 from: 'fd3',

TweaksSindre Sorhusbefore adoption698a1b8

lines 673–674why, one step back
673}));
674test('Cannot set "stdio[3]" option to Node.js Writable streams to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 675–677why, one step back
675 sourceOptions: getStdio(3, process.stdout),
676 message: ['stdio[3]', 'Stream'],677 from: 'fd3',

TweaksSindre Sorhusbefore adoption698a1b8

lines 678–679why, one step back
678}));
679test('Cannot set "stdio[3]" option to Node.js Writable streams to use .iterable()', () => testIterable({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 680–682why, one step back
680 sourceOptions: getStdio(3, process.stdout),
681 message: ['stdio[3]', 'Stream'],682 from: 'fd3',

TweaksSindre Sorhusbefore adoption698a1b8

lines 683–684why, one step back
683}));
684test('Cannot set "stdio[3]" option to Node.js Readable streams to use .pipe()', () => testPipeError({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 685–687why, one step back
685 destinationOptions: getStdio(3, process.stdin),
686 message: ['stdio[3]', 'Stream'],687 to: 'fd3',

TweaksSindre Sorhusbefore adoption698a1b8

lines 688–689why, one step back
688}));
689test('Cannot set "stdio[3]" option to Node.js Readable streams to use .duplex()', () => testNodeStream({

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 690–692why, one step back
690 sourceOptions: getStdio(3, process.stdin),
691 message: ['stdio[3]', 'Stream'],692 to: 'fd3',

TweaksSindre Sorhusbefore adoption698a1b8

line 693why, one step back
693}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 694why, one step back
694

TweaksSindre Sorhusbefore adoption698a1b8

lines 695–699why, one step back
695test('Sets the right error message when the "all" option is incompatible - execa.$', async () => {
696 await assertPipeError(execa('empty.js')697 .pipe({all: false})`stdin.js`698 .pipe(execa('empty.js'), {from: 'all'}),699 '"all" option must be true',

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 700–702why, one step back
700 );
701});702

TweaksSindre Sorhusbefore adoption698a1b8

lines 703–707why, one step back
703test('Sets the right error message when the "all" option is incompatible - execa.execa', async () => {
704 await assertPipeError(execa('empty.js')705 .pipe(execa('stdin.js', {all: false}))706 .pipe(execa('empty.js'), {from: 'all'}),707 '"all" option must be true',

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 708–710why, one step back
708 );
709});710

TweaksSindre Sorhusbefore adoption698a1b8

lines 711–715why, one step back
711test('Sets the right error message when the "all" option is incompatible - early error', async () => {
712 await assertPipeError(getEarlyErrorSubprocess()713 .pipe(execa('stdin.js', {all: false}))714 .pipe(execa('empty.js'), {from: 'all'}),715 '"all" option must be true',

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 716–717why, one step back
716 );
717});