Skip to content
Myr

wait.js

This file

Path

test/stream/wait.js

211 lines · 19.2 KiB · JavaScript

Last changed by

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

History of this file

Take it

Split files (#837)ehmickybefore adoption672c2d7

lines 1–4why, one step back
1import {setImmediate} from 'node:timers/promises';
2import test from 'ava';3import {execa} from '../../index.js';4import {setFixtureDir} from '../helpers/fixtures-dir.js';

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

line 5why, one step back
5import {getStdio, prematureClose, assertEpipe} from '../helpers/stdio.js';

Split files (#837)ehmickybefore adoption672c2d7

lines 6–21why, one step back
6import {foobarString} from '../helpers/input.js';
7import {noopGenerator} from '../helpers/generator.js';8import {noopReadable, noopWritable, noopDuplex} from '../helpers/stream.js';910setFixtureDir();1112const noop = () => {};1314const endOptionStream = ({stream}) => {15 stream.end();16};1718const destroyOptionStream = ({stream, error}) => {19 stream.destroy(error);20};21

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

lines 22–23why, one step back
22const destroySubprocessStream = ({subprocess, fdNumber, error}) => {
23 subprocess.stdio[fdNumber].destroy(error);

Split files (#837)ehmickybefore adoption672c2d7

lines 24–25why, one step back
24};
25

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 26why, one step back
26const getStreamStdio = (fdNumber, stream, useTransform) => getStdio(fdNumber, [stream, useTransform ? noopGenerator(false) : 'pipe']);

Split files (#837)ehmickybefore adoption672c2d7

lines 27–28why, one step back
27
28// eslint-disable-next-line max-params

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 29why, one step back
29const testStreamAbortWait = async (t, streamMethod, stream, fdNumber, useTransform) => {

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

lines 30–32why, one step back
30 const subprocess = execa('noop-stdin-fd.js', [`${fdNumber}`], getStreamStdio(fdNumber, stream, useTransform));
31 streamMethod({stream, subprocess, fdNumber});32 subprocess.stdin.end();

Split files (#837)ehmickybefore adoption672c2d7

lines 33–35why, one step back
33 await setImmediate();
34 stream.destroy();35

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

line 36why, one step back
36 const {stdout} = await subprocess;

Split files (#837)ehmickybefore adoption672c2d7

lines 37–40why, one step back
37 t.is(stdout, '');
38 t.true(stream.destroyed);39};40

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

lines 41–46why, one step back
41test('Keeps running when stdin option is used and subprocess.stdin ends', testStreamAbortWait, noop, noopReadable(), 0, false);
42test('Keeps running when stdin option is used and subprocess.stdin Duplex ends', testStreamAbortWait, noop, noopDuplex(), 0, false);43test('Keeps running when input stdio[*] option is used and input subprocess.stdio[*] ends', testStreamAbortWait, noop, noopReadable(), 3, false);44test('Keeps running when stdin option is used and subprocess.stdin ends, with a transform', testStreamAbortWait, noop, noopReadable(), 0, true);45test('Keeps running when stdin option is used and subprocess.stdin Duplex ends, with a transform', testStreamAbortWait, noop, noopDuplex(), 0, true);46test('Keeps running when input stdio[*] option is used and input subprocess.stdio[*] ends, with a transform', testStreamAbortWait, noop, noopReadable(), 3, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 47–48why, one step back
47
48// eslint-disable-next-line max-params

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 49why, one step back
49const testStreamAbortSuccess = async (t, streamMethod, stream, fdNumber, useTransform) => {

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

lines 50–52why, one step back
50 const subprocess = execa('noop-stdin-fd.js', [`${fdNumber}`], getStreamStdio(fdNumber, stream, useTransform));
51 streamMethod({stream, subprocess, fdNumber});52 subprocess.stdin.end();

Split files (#837)ehmickybefore adoption672c2d7

line 53why, one step back
53

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

line 54why, one step back
54 const {stdout} = await subprocess;

Split files (#837)ehmickybefore adoption672c2d7

lines 55–64why, one step back
55 t.is(stdout, '');
56 t.true(stream.destroyed);57};5859test('Passes when stdin option aborts', testStreamAbortSuccess, destroyOptionStream, noopReadable(), 0, false);60test('Passes when stdin option Duplex aborts', testStreamAbortSuccess, destroyOptionStream, noopDuplex(), 0, false);61test('Passes when input stdio[*] option aborts', testStreamAbortSuccess, destroyOptionStream, noopReadable(), 3, false);62test('Passes when stdout option ends with no more writes', testStreamAbortSuccess, endOptionStream, noopWritable(), 1, false);63test('Passes when stderr option ends with no more writes', testStreamAbortSuccess, endOptionStream, noopWritable(), 2, false);64test('Passes when output stdio[*] option ends with no more writes', testStreamAbortSuccess, endOptionStream, noopWritable(), 3, false);

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

lines 65–70why, one step back
65test('Passes when subprocess.stdout aborts with no more writes', testStreamAbortSuccess, destroySubprocessStream, noopWritable(), 1, false);
66test('Passes when subprocess.stdout Duplex aborts with no more writes', testStreamAbortSuccess, destroySubprocessStream, noopDuplex(), 1, false);67test('Passes when subprocess.stderr aborts with no more writes', testStreamAbortSuccess, destroySubprocessStream, noopWritable(), 2, false);68test('Passes when subprocess.stderr Duplex aborts with no more writes', testStreamAbortSuccess, destroySubprocessStream, noopDuplex(), 2, false);69test('Passes when output subprocess.stdio[*] aborts with no more writes', testStreamAbortSuccess, destroySubprocessStream, noopWritable(), 3, false);70test('Passes when output subprocess.stdio[*] Duplex aborts with no more writes', testStreamAbortSuccess, destroySubprocessStream, noopDuplex(), 3, false);

Split files (#837)ehmickybefore adoption672c2d7

lines 71–76why, one step back
71test('Passes when stdin option aborts, with a transform', testStreamAbortSuccess, destroyOptionStream, noopReadable(), 0, true);
72test('Passes when stdin option Duplex aborts, with a transform', testStreamAbortSuccess, destroyOptionStream, noopDuplex(), 0, true);73test('Passes when input stdio[*] option aborts, with a transform', testStreamAbortSuccess, destroyOptionStream, noopReadable(), 3, true);74test('Passes when stdout option ends with no more writes, with a transform', testStreamAbortSuccess, endOptionStream, noopWritable(), 1, true);75test('Passes when stderr option ends with no more writes, with a transform', testStreamAbortSuccess, endOptionStream, noopWritable(), 2, true);76test('Passes when output stdio[*] option ends with no more writes, with a transform', testStreamAbortSuccess, endOptionStream, noopWritable(), 3, true);

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

lines 77–82why, one step back
77test('Passes when subprocess.stdout aborts with no more writes, with a transform', testStreamAbortSuccess, destroySubprocessStream, noopWritable(), 1, true);
78test('Passes when subprocess.stdout Duplex aborts with no more writes, with a transform', testStreamAbortSuccess, destroySubprocessStream, noopDuplex(), 1, true);79test('Passes when subprocess.stderr aborts with no more writes, with a transform', testStreamAbortSuccess, destroySubprocessStream, noopWritable(), 2, true);80test('Passes when subprocess.stderr Duplex aborts with no more writes, with a transform', testStreamAbortSuccess, destroySubprocessStream, noopDuplex(), 2, true);81test('Passes when output subprocess.stdio[*] aborts with no more writes, with a transform', testStreamAbortSuccess, destroySubprocessStream, noopWritable(), 3, true);82test('Passes when output subprocess.stdio[*] Duplex aborts with no more writes, with a transform', testStreamAbortSuccess, destroySubprocessStream, noopDuplex(), 3, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 83–84why, one step back
83
84// eslint-disable-next-line max-params

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 85why, one step back
85const testStreamAbortFail = async (t, streamMethod, stream, fdNumber, useTransform) => {

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

lines 86–87why, one step back
86 const subprocess = execa('noop-stdin-fd.js', [`${fdNumber}`], getStreamStdio(fdNumber, stream, useTransform));
87 streamMethod({stream, subprocess, fdNumber});

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 88why, one step back
88 if (fdNumber !== 0) {

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

line 89why, one step back
89 subprocess.stdin.end();

Split files (#837)ehmickybefore adoption672c2d7

lines 90–91why, one step back
90 }
91

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

line 92why, one step back
92 const error = await t.throwsAsync(subprocess);

Split files (#837)ehmickybefore adoption672c2d7

lines 93–96why, one step back
93 t.like(error, {...prematureClose, exitCode: 0});
94 t.true(stream.destroyed);95};96

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

lines 97–99why, one step back
97test('Throws abort error when subprocess.stdin aborts', testStreamAbortFail, destroySubprocessStream, noopReadable(), 0, false);
98test('Throws abort error when subprocess.stdin Duplex aborts', testStreamAbortFail, destroySubprocessStream, noopDuplex(), 0, false);99test('Throws abort error when input subprocess.stdio[*] aborts', testStreamAbortFail, destroySubprocessStream, noopReadable(), 3, false);

Split files (#837)ehmickybefore adoption672c2d7

lines 100–105why, one step back
100test('Throws abort error when stdout option aborts with no more writes', testStreamAbortFail, destroyOptionStream, noopWritable(), 1, false);
101test('Throws abort error when stdout option Duplex aborts with no more writes', testStreamAbortFail, destroyOptionStream, noopDuplex(), 1, false);102test('Throws abort error when stderr option aborts with no more writes', testStreamAbortFail, destroyOptionStream, noopWritable(), 2, false);103test('Throws abort error when stderr option Duplex aborts with no more writes', testStreamAbortFail, destroyOptionStream, noopDuplex(), 2, false);104test('Throws abort error when output stdio[*] option aborts with no more writes', testStreamAbortFail, destroyOptionStream, noopWritable(), 3, false);105test('Throws abort error when output stdio[*] Duplex option aborts with no more writes', testStreamAbortFail, destroyOptionStream, noopDuplex(), 3, false);

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

lines 106–108why, one step back
106test('Throws abort error when subprocess.stdin aborts, with a transform', testStreamAbortFail, destroySubprocessStream, noopReadable(), 0, true);
107test('Throws abort error when subprocess.stdin Duplex aborts, with a transform', testStreamAbortFail, destroySubprocessStream, noopDuplex(), 0, true);108test('Throws abort error when input subprocess.stdio[*] aborts, with a transform', testStreamAbortFail, destroySubprocessStream, noopReadable(), 3, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 109–116why, one step back
109test('Throws abort error when stdout option aborts with no more writes, with a transform', testStreamAbortFail, destroyOptionStream, noopWritable(), 1, true);
110test('Throws abort error when stdout option Duplex aborts with no more writes, with a transform', testStreamAbortFail, destroyOptionStream, noopDuplex(), 1, true);111test('Throws abort error when stderr option aborts with no more writes, with a transform', testStreamAbortFail, destroyOptionStream, noopWritable(), 2, true);112test('Throws abort error when stderr option Duplex aborts with no more writes, with a transform', testStreamAbortFail, destroyOptionStream, noopDuplex(), 2, true);113test('Throws abort error when output stdio[*] option aborts with no more writes, with a transform', testStreamAbortFail, destroyOptionStream, noopWritable(), 3, true);114test('Throws abort error when output stdio[*] Duplex option aborts with no more writes, with a transform', testStreamAbortFail, destroyOptionStream, noopDuplex(), 3, true);115116// eslint-disable-next-line max-params

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 117why, one step back
117const testStreamEpipeFail = async (t, streamMethod, stream, fdNumber, useTransform) => {

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

lines 118–119why, one step back
118 const subprocess = execa('noop-stdin-fd.js', [`${fdNumber}`], getStreamStdio(fdNumber, stream, useTransform));
119 streamMethod({stream, subprocess, fdNumber});

Split files (#837)ehmickybefore adoption672c2d7

line 120why, one step back
120 await setImmediate();

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

line 121why, one step back
121 subprocess.stdin.end(foobarString);

Split files (#837)ehmickybefore adoption672c2d7

line 122why, one step back
122

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

line 123why, one step back
123 const {exitCode, stdio, stderr} = await t.throwsAsync(subprocess);

Split files (#837)ehmickybefore adoption672c2d7

line 124why, one step back
124 t.is(exitCode, 1);

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 125why, one step back
125 t.is(stdio[fdNumber], '');

Split files (#837)ehmickybefore adoption672c2d7

line 126why, one step back
126 t.true(stream.destroyed);

Make subprocess async iterable (#923)ehmickybefore adoption2e8e8c9

line 127why, one step back
127 assertEpipe(t, stderr, fdNumber);

Split files (#837)ehmickybefore adoption672c2d7

lines 128–129why, one step back
128};
129

Improve streams pipe logic (#885)ehmickybefore adoption5abc429

line 130why, one step back
130test('Throws EPIPE when stdout option ends with more writes', testStreamEpipeFail, endOptionStream, noopWritable(), 1, false);

Split files (#837)ehmickybefore adoption672c2d7

lines 131–132why, one step back
131test('Throws EPIPE when stdout option aborts with more writes', testStreamEpipeFail, destroyOptionStream, noopWritable(), 1, false);
132test('Throws EPIPE when stdout option Duplex aborts with more writes', testStreamEpipeFail, destroyOptionStream, noopDuplex(), 1, false);

Improve streams pipe logic (#885)ehmickybefore adoption5abc429

line 133why, one step back
133test('Throws EPIPE when stderr option ends with more writes', testStreamEpipeFail, endOptionStream, noopWritable(), 2, false);

Split files (#837)ehmickybefore adoption672c2d7

lines 134–135why, one step back
134test('Throws EPIPE when stderr option aborts with more writes', testStreamEpipeFail, destroyOptionStream, noopWritable(), 2, false);
135test('Throws EPIPE when stderr option Duplex aborts with more writes', testStreamEpipeFail, destroyOptionStream, noopDuplex(), 2, false);

Improve streams pipe logic (#885)ehmickybefore adoption5abc429

line 136why, one step back
136test('Throws EPIPE when output stdio[*] option ends with more writes', testStreamEpipeFail, endOptionStream, noopWritable(), 3, false);

Split files (#837)ehmickybefore adoption672c2d7

lines 137–138why, one step back
137test('Throws EPIPE when output stdio[*] option aborts with more writes', testStreamEpipeFail, destroyOptionStream, noopWritable(), 3, false);
138test('Throws EPIPE when output stdio[*] option Duplex aborts with more writes', testStreamEpipeFail, destroyOptionStream, noopDuplex(), 3, false);

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

lines 139–144why, one step back
139test('Throws EPIPE when subprocess.stdout aborts with more writes', testStreamEpipeFail, destroySubprocessStream, noopWritable(), 1, false);
140test('Throws EPIPE when subprocess.stdout Duplex aborts with more writes', testStreamEpipeFail, destroySubprocessStream, noopDuplex(), 1, false);141test('Throws EPIPE when subprocess.stderr aborts with more writes', testStreamEpipeFail, destroySubprocessStream, noopWritable(), 2, false);142test('Throws EPIPE when subprocess.stderr Duplex aborts with more writes', testStreamEpipeFail, destroySubprocessStream, noopDuplex(), 2, false);143test('Throws EPIPE when output subprocess.stdio[*] aborts with more writes', testStreamEpipeFail, destroySubprocessStream, noopWritable(), 3, false);144test('Throws EPIPE when output subprocess.stdio[*] Duplex aborts with more writes', testStreamEpipeFail, destroySubprocessStream, noopDuplex(), 3, false);

Improve streams pipe logic (#885)ehmickybefore adoption5abc429

line 145why, one step back
145test('Throws EPIPE when stdout option ends with more writes, with a transform', testStreamEpipeFail, endOptionStream, noopWritable(), 1, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 146–147why, one step back
146test('Throws EPIPE when stdout option aborts with more writes, with a transform', testStreamEpipeFail, destroyOptionStream, noopWritable(), 1, true);
147test('Throws EPIPE when stdout option Duplex aborts with more writes, with a transform', testStreamEpipeFail, destroyOptionStream, noopDuplex(), 1, true);

Improve streams pipe logic (#885)ehmickybefore adoption5abc429

line 148why, one step back
148test('Throws EPIPE when stderr option ends with more writes, with a transform', testStreamEpipeFail, endOptionStream, noopWritable(), 2, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 149–150why, one step back
149test('Throws EPIPE when stderr option aborts with more writes, with a transform', testStreamEpipeFail, destroyOptionStream, noopWritable(), 2, true);
150test('Throws EPIPE when stderr option Duplex aborts with more writes, with a transform', testStreamEpipeFail, destroyOptionStream, noopDuplex(), 2, true);

Improve streams pipe logic (#885)ehmickybefore adoption5abc429

line 151why, one step back
151test('Throws EPIPE when output stdio[*] option ends with more writes, with a transform', testStreamEpipeFail, endOptionStream, noopWritable(), 3, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 152–153why, one step back
152test('Throws EPIPE when output stdio[*] option aborts with more writes, with a transform', testStreamEpipeFail, destroyOptionStream, noopWritable(), 3, true);
153test('Throws EPIPE when output stdio[*] option Duplex aborts with more writes, with a transform', testStreamEpipeFail, destroyOptionStream, noopDuplex(), 3, true);

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

lines 154–159why, one step back
154test('Throws EPIPE when subprocess.stdout aborts with more writes, with a transform', testStreamEpipeFail, destroySubprocessStream, noopWritable(), 1, true);
155test('Throws EPIPE when subprocess.stdout Duplex aborts with more writes, with a transform', testStreamEpipeFail, destroySubprocessStream, noopDuplex(), 1, true);156test('Throws EPIPE when subprocess.stderr aborts with more writes, with a transform', testStreamEpipeFail, destroySubprocessStream, noopWritable(), 2, true);157test('Throws EPIPE when subprocess.stderr Duplex aborts with more writes, with a transform', testStreamEpipeFail, destroySubprocessStream, noopDuplex(), 2, true);158test('Throws EPIPE when output subprocess.stdio[*] aborts with more writes, with a transform', testStreamEpipeFail, destroySubprocessStream, noopWritable(), 3, true);159test('Throws EPIPE when output subprocess.stdio[*] Duplex aborts with more writes, with a transform', testStreamEpipeFail, destroySubprocessStream, noopDuplex(), 3, true);

Split files (#837)ehmickybefore adoption672c2d7

lines 160–161why, one step back
160
161// eslint-disable-next-line max-params

Rename `index` to `fdNumber` (#862)ehmickybefore adoption295ef40

line 162why, one step back
162const testStreamError = async (t, streamMethod, stream, fdNumber, useTransform) => {

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

line 163why, one step back
163 const subprocess = execa('empty.js', getStreamStdio(fdNumber, stream, useTransform));

Add `ExecaError` and `ExecaSyncError` classes (#911)ehmickybefore adoptionfc01815

lines 164–165why, one step back
164 const cause = new Error('test');
165 streamMethod({stream, subprocess, fdNumber, error: cause});

Split files (#837)ehmickybefore adoption672c2d7

line 166why, one step back
166

Add `ExecaError` and `ExecaSyncError` classes (#911)ehmickybefore adoptionfc01815

lines 167–172why, one step back
167 const error = await t.throwsAsync(subprocess);
168 t.is(error.cause, cause);169 t.is(error.exitCode, 0);170 t.is(error.signal, undefined);171 t.false(error.isTerminated);172 t.true(error.failed);

Split files (#837)ehmickybefore adoption672c2d7

lines 173–184why, one step back
173 t.true(stream.destroyed);
174};175176test('Throws stream error when stdin option errors', testStreamError, destroyOptionStream, noopReadable(), 0, false);177test('Throws stream error when stdin option Duplex errors', testStreamError, destroyOptionStream, noopDuplex(), 0, false);178test('Throws stream error when stdout option errors', testStreamError, destroyOptionStream, noopWritable(), 1, false);179test('Throws stream error when stdout option Duplex errors', testStreamError, destroyOptionStream, noopDuplex(), 1, false);180test('Throws stream error when stderr option errors', testStreamError, destroyOptionStream, noopWritable(), 2, false);181test('Throws stream error when stderr option Duplex errors', testStreamError, destroyOptionStream, noopDuplex(), 2, false);182test('Throws stream error when output stdio[*] option errors', testStreamError, destroyOptionStream, noopWritable(), 3, false);183test('Throws stream error when output stdio[*] Duplex option errors', testStreamError, destroyOptionStream, noopDuplex(), 3, false);184test('Throws stream error when input stdio[*] option errors', testStreamError, destroyOptionStream, noopReadable(), 3, false);

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

lines 185–193why, one step back
185test('Throws stream error when subprocess.stdin errors', testStreamError, destroySubprocessStream, noopReadable(), 0, false);
186test('Throws stream error when subprocess.stdin Duplex errors', testStreamError, destroySubprocessStream, noopDuplex(), 0, false);187test('Throws stream error when subprocess.stdout errors', testStreamError, destroySubprocessStream, noopWritable(), 1, false);188test('Throws stream error when subprocess.stdout Duplex errors', testStreamError, destroySubprocessStream, noopDuplex(), 1, false);189test('Throws stream error when subprocess.stderr errors', testStreamError, destroySubprocessStream, noopWritable(), 2, false);190test('Throws stream error when subprocess.stderr Duplex errors', testStreamError, destroySubprocessStream, noopDuplex(), 2, false);191test('Throws stream error when output subprocess.stdio[*] errors', testStreamError, destroySubprocessStream, noopWritable(), 3, false);192test('Throws stream error when output subprocess.stdio[*] Duplex errors', testStreamError, destroySubprocessStream, noopDuplex(), 3, false);193test('Throws stream error when input subprocess.stdio[*] errors', testStreamError, destroySubprocessStream, noopReadable(), 3, false);

Split files (#837)ehmickybefore adoption672c2d7

lines 194–202why, one step back
194test('Throws stream error when stdin option errors, with a transform', testStreamError, destroyOptionStream, noopReadable(), 0, true);
195test('Throws stream error when stdin option Duplex errors, with a transform', testStreamError, destroyOptionStream, noopDuplex(), 0, true);196test('Throws stream error when stdout option errors, with a transform', testStreamError, destroyOptionStream, noopWritable(), 1, true);197test('Throws stream error when stdout option Duplex errors, with a transform', testStreamError, destroyOptionStream, noopDuplex(), 1, true);198test('Throws stream error when stderr option errors, with a transform', testStreamError, destroyOptionStream, noopWritable(), 2, true);199test('Throws stream error when stderr option Duplex errors, with a transform', testStreamError, destroyOptionStream, noopDuplex(), 2, true);200test('Throws stream error when output stdio[*] option errors, with a transform', testStreamError, destroyOptionStream, noopWritable(), 3, true);201test('Throws stream error when output stdio[*] Duplex option errors, with a transform', testStreamError, destroyOptionStream, noopDuplex(), 3, true);202test('Throws stream error when input stdio[*] option errors, with a transform', testStreamError, destroyOptionStream, noopReadable(), 3, true);

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

lines 203–211why, one step back
203test('Throws stream error when subprocess.stdin errors, with a transform', testStreamError, destroySubprocessStream, noopReadable(), 0, true);
204test('Throws stream error when subprocess.stdin Duplex errors, with a transform', testStreamError, destroySubprocessStream, noopDuplex(), 0, true);205test('Throws stream error when subprocess.stdout errors, with a transform', testStreamError, destroySubprocessStream, noopWritable(), 1, true);206test('Throws stream error when subprocess.stdout Duplex errors, with a transform', testStreamError, destroySubprocessStream, noopDuplex(), 1, true);207test('Throws stream error when subprocess.stderr errors, with a transform', testStreamError, destroySubprocessStream, noopWritable(), 2, true);208test('Throws stream error when subprocess.stderr Duplex errors, with a transform', testStreamError, destroySubprocessStream, noopDuplex(), 2, true);209test('Throws stream error when output subprocess.stdio[*] errors, with a transform', testStreamError, destroySubprocessStream, noopWritable(), 3, true);210test('Throws stream error when output subprocess.stdio[*] Duplex errors, with a transform', testStreamError, destroySubprocessStream, noopDuplex(), 3, true);211test('Throws stream error when input subprocess.stdio[*] errors, with a transform', testStreamError, destroySubprocessStream, noopReadable(), 3, true);