pipe-arguments.js
This file
Path
test/pipe/pipe-arguments.js
285 lines · 10.2 KiB · JavaScript
Last changed by
TweaksSindre Sorhusbefore adoption698a1b8
History of this fileTake it
The walk stopped after 200 commits: lines older than 9f65b86 point at it.
TweaksSindre Sorhusbefore adoption698a1b8
line 1why, one step back1import assert from 'node:assert/strict';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 2–3why, one step back2import {spawn} from 'node:child_process';3import {pathToFileURL} from 'node:url';TweaksSindre Sorhusbefore adoption698a1b8
lines 4–5why, one step back4import test from 'node:test';5import {assertRejects} from '../helpers/assert.js';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 6–8why, one step back6import {$, execa} from '../../index.js';7import {setFixtureDirectory, FIXTURES_DIRECTORY} from '../helpers/fixtures-directory.js';8import {foobarString} from '../helpers/input.js';Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
line 9why, one step back9import {getDenoNodePath} from '../helpers/file-path.js';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 10–12why, one step back1011setFixtureDirectory();12TweaksSindre Sorhusbefore adoption698a1b8
line 13why, one step back13test('$.pipe(subprocess)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 14why, one step back14 const {stdout} = await $`noop.js ${foobarString}`.pipe($({stdin: 'pipe'})`stdin.js`);TweaksSindre Sorhusbefore adoption698a1b8
line 15why, one step back15 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 16–17why, one step back16});17TweaksSindre Sorhusbefore adoption698a1b8
line 18why, one step back18test('execa.$.pipe(subprocess)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 19why, one step back19 const {stdout} = await execa('noop.js', [foobarString]).pipe($({stdin: 'pipe'})`stdin.js`);TweaksSindre Sorhusbefore adoption698a1b8
line 20why, one step back20 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 21–22why, one step back21});22TweaksSindre Sorhusbefore adoption698a1b8
line 23why, one step back23test('$.pipe.pipe(subprocess)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 24–26why, one step back24 const {stdout} = await $`noop.js ${foobarString}`25 .pipe($({stdin: 'pipe'})`stdin.js`)26 .pipe($({stdin: 'pipe'})`stdin.js`);TweaksSindre Sorhusbefore adoption698a1b8
line 27why, one step back27 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 28–29why, one step back28});29TweaksSindre Sorhusbefore adoption698a1b8
line 30why, one step back30test('$.pipe`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 31why, one step back31 const {stdout} = await $`noop.js ${foobarString}`.pipe`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 32why, one step back32 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 33–34why, one step back33});34TweaksSindre Sorhusbefore adoption698a1b8
line 35why, one step back35test('execa.$.pipe`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 36why, one step back36 const {stdout} = await execa('noop.js', [foobarString]).pipe`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 37why, one step back37 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 38–39why, one step back38});39TweaksSindre Sorhusbefore adoption698a1b8
line 40why, one step back40test('$.pipe.pipe`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 41–43why, one step back41 const {stdout} = await $`noop.js ${foobarString}`42 .pipe`stdin.js`43 .pipe`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 44why, one step back44 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 45–46why, one step back45});46TweaksSindre Sorhusbefore adoption698a1b8
line 47why, one step back47test('$.pipe("file")', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 48why, one step back48 const {stdout} = await $`noop.js ${foobarString}`.pipe('stdin.js');TweaksSindre Sorhusbefore adoption698a1b8
line 49why, one step back49 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 50–51why, one step back50});51TweaksSindre Sorhusbefore adoption698a1b8
line 52why, one step back52test('execa.$.pipe("file")`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 53why, one step back53 const {stdout} = await execa('noop.js', [foobarString]).pipe('stdin.js');TweaksSindre Sorhusbefore adoption698a1b8
line 54why, one step back54 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 55–56why, one step back55});56TweaksSindre Sorhusbefore adoption698a1b8
line 57why, one step back57test('$.pipe.pipe("file")', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 58–60why, one step back58 const {stdout} = await $`noop.js ${foobarString}`59 .pipe`stdin.js`60 .pipe('stdin.js');TweaksSindre Sorhusbefore adoption698a1b8
line 61why, one step back61 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 62–63why, one step back62});63TweaksSindre Sorhusbefore adoption698a1b8
line 64why, one step back64test('execa.$.pipe(fileUrl)`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 65why, one step back65 const {stdout} = await execa('noop.js', [foobarString]).pipe(pathToFileURL(`${FIXTURES_DIRECTORY}/stdin.js`));TweaksSindre Sorhusbefore adoption698a1b8
line 66why, one step back66 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 67–68why, one step back67});68TweaksSindre Sorhusbefore adoption698a1b8
line 69why, one step back69test('$.pipe("file", commandArguments, options)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 70why, one step back70 const {stdout} = await $`noop.js ${foobarString}`.pipe('node', ['stdin.js'], {cwd: FIXTURES_DIRECTORY});TweaksSindre Sorhusbefore adoption698a1b8
line 71why, one step back71 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 72–73why, one step back72});73TweaksSindre Sorhusbefore adoption698a1b8
line 74why, one step back74test('execa.$.pipe("file", commandArguments, options)`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 75why, one step back75 const {stdout} = await execa('noop.js', [foobarString]).pipe('node', ['stdin.js'], {cwd: FIXTURES_DIRECTORY});TweaksSindre Sorhusbefore adoption698a1b8
line 76why, one step back76 assert.equal(stdout, foobarString);Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
lines 77–78why, one step back77});78TweaksSindre Sorhusbefore adoption698a1b8
line 79why, one step back79test('execa.$.pipe("file", commandArguments, options with denoNodePath)`', async () => {Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
line 80why, one step back80 const {stdout} = await execa('noop.js', [foobarString]).pipe('node', ['stdin.js'], {cwd: FIXTURES_DIRECTORY, nodePath: getDenoNodePath()});TweaksSindre Sorhusbefore adoption698a1b8
line 81why, one step back81 assert.equal(stdout, foobarString);Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
lines 82–83why, one step back82});83TweaksSindre Sorhusbefore adoption698a1b8
line 84why, one step back84test('execa.$.pipe("file", commandArguments, denoNodePath)`', async () => {Fix deno node:process execPath compatibility (#1160)CJbefore adoptionf3a1bf3
line 85why, one step back85 const {stdout} = await execa('noop.js', [foobarString]).pipe(getDenoNodePath(), ['stdin.js'], {cwd: FIXTURES_DIRECTORY});TweaksSindre Sorhusbefore adoption698a1b8
line 86why, one step back86 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 87–88why, one step back87});88TweaksSindre Sorhusbefore adoption698a1b8
line 89why, one step back89test('$.pipe.pipe("file", commandArguments, options)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 90–92why, one step back90 const {stdout} = await $`noop.js ${foobarString}`91 .pipe`stdin.js`92 .pipe('node', ['stdin.js'], {cwd: FIXTURES_DIRECTORY});TweaksSindre Sorhusbefore adoption698a1b8
line 93why, one step back93 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 94–95why, one step back94});95TweaksSindre Sorhusbefore adoption698a1b8
line 96why, one step back96test('$.pipe(subprocess, pipeOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 97why, one step back97 const {stdout} = await $`noop-fd.js 2 ${foobarString}`.pipe($({stdin: 'pipe'})`stdin.js`, {from: 'stderr'});TweaksSindre Sorhusbefore adoption698a1b8
line 98why, one step back98 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 99–100why, one step back99});100TweaksSindre Sorhusbefore adoption698a1b8
line 101why, one step back101test('execa.$.pipe(subprocess, pipeOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 102why, one step back102 const {stdout} = await execa('noop-fd.js', ['2', foobarString]).pipe($({stdin: 'pipe'})`stdin.js`, {from: 'stderr'});TweaksSindre Sorhusbefore adoption698a1b8
line 103why, one step back103 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 104–105why, one step back104});105TweaksSindre Sorhusbefore adoption698a1b8
line 106why, one step back106test('$.pipe.pipe(subprocess, pipeOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 107–109why, one step back107 const {stdout} = await $`noop-fd.js 2 ${foobarString}`108 .pipe($({stdin: 'pipe'})`noop-stdin-fd.js 2`, {from: 'stderr'})109 .pipe($({stdin: 'pipe'})`stdin.js`, {from: 'stderr'});TweaksSindre Sorhusbefore adoption698a1b8
line 110why, one step back110 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 111–112why, one step back111});112TweaksSindre Sorhusbefore adoption698a1b8
line 113why, one step back113test('$.pipe(pipeOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 114why, one step back114 const {stdout} = await $`noop-fd.js 2 ${foobarString}`.pipe({from: 'stderr'})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 115why, one step back115 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 116–117why, one step back116});117TweaksSindre Sorhusbefore adoption698a1b8
line 118why, one step back118test('execa.$.pipe(pipeOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 119why, one step back119 const {stdout} = await execa('noop-fd.js', ['2', foobarString]).pipe({from: 'stderr'})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 120why, one step back120 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 121–122why, one step back121});122TweaksSindre Sorhusbefore adoption698a1b8
line 123why, one step back123test('$.pipe.pipe(pipeOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 124–126why, one step back124 const {stdout} = await $`noop-fd.js 2 ${foobarString}`125 .pipe({from: 'stderr'})`noop-stdin-fd.js 2`126 .pipe({from: 'stderr'})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 127why, one step back127 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 128–129why, one step back128});129TweaksSindre Sorhusbefore adoption698a1b8
line 130why, one step back130test('$.pipe("file", pipeOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 131why, one step back131 const {stdout} = await $`noop-fd.js 2 ${foobarString}`.pipe('stdin.js', {from: 'stderr'});TweaksSindre Sorhusbefore adoption698a1b8
line 132why, one step back132 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 133–134why, one step back133});134TweaksSindre Sorhusbefore adoption698a1b8
line 135why, one step back135test('execa.$.pipe("file", pipeOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 136why, one step back136 const {stdout} = await execa('noop-fd.js', ['2', foobarString]).pipe('stdin.js', {from: 'stderr'});TweaksSindre Sorhusbefore adoption698a1b8
line 137why, one step back137 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 138–139why, one step back138});139TweaksSindre Sorhusbefore adoption698a1b8
line 140why, one step back140test('$.pipe.pipe("file", pipeOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 141–143why, one step back141 const {stdout} = await $`noop-fd.js 2 ${foobarString}`142 .pipe({from: 'stderr'})`noop-stdin-fd.js 2`143 .pipe('stdin.js', {from: 'stderr'});TweaksSindre Sorhusbefore adoption698a1b8
line 144why, one step back144 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 145–146why, one step back145});146TweaksSindre Sorhusbefore adoption698a1b8
line 147why, one step back147test('$.pipe(options)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 148why, one step back148 const {stdout} = await $`noop.js ${foobarString}`.pipe({stripFinalNewline: false})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 149why, one step back149 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 150–151why, one step back150});151TweaksSindre Sorhusbefore adoption698a1b8
line 152why, one step back152test('execa.$.pipe(options)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 153why, one step back153 const {stdout} = await execa('noop.js', [foobarString]).pipe({stripFinalNewline: false})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 154why, one step back154 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 155–156why, one step back155});156TweaksSindre Sorhusbefore adoption698a1b8
line 157why, one step back157test('$.pipe.pipe(options)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 158–160why, one step back158 const {stdout} = await $`noop.js ${foobarString}`159 .pipe({})`stdin.js`160 .pipe({stripFinalNewline: false})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 161why, one step back161 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 162–163why, one step back162});163TweaksSindre Sorhusbefore adoption698a1b8
line 164why, one step back164test('$.pipe("file", options)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 165why, one step back165 const {stdout} = await $`noop.js ${foobarString}`.pipe('stdin.js', {stripFinalNewline: false});TweaksSindre Sorhusbefore adoption698a1b8
line 166why, one step back166 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 167–168why, one step back167});168TweaksSindre Sorhusbefore adoption698a1b8
line 169why, one step back169test('execa.$.pipe("file", options)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 170why, one step back170 const {stdout} = await execa('noop.js', [foobarString]).pipe('stdin.js', {stripFinalNewline: false});TweaksSindre Sorhusbefore adoption698a1b8
line 171why, one step back171 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 172–173why, one step back172});173TweaksSindre Sorhusbefore adoption698a1b8
line 174why, one step back174test('$.pipe.pipe("file", options)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 175–177why, one step back175 const {stdout} = await $`noop.js ${foobarString}`176 .pipe({})`stdin.js`177 .pipe('stdin.js', {stripFinalNewline: false});TweaksSindre Sorhusbefore adoption698a1b8
line 178why, one step back178 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 179–180why, one step back179});180TweaksSindre Sorhusbefore adoption698a1b8
line 181why, one step back181test('$.pipe(pipeAndSubprocessOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 182why, one step back182 const {stdout} = await $`noop-fd.js 2 ${foobarString}\n`.pipe({from: 'stderr', stripFinalNewline: false})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 183why, one step back183 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 184–185why, one step back184});185TweaksSindre Sorhusbefore adoption698a1b8
line 186why, one step back186test('execa.$.pipe(pipeAndSubprocessOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 187why, one step back187 const {stdout} = await execa('noop-fd.js', ['2', `${foobarString}\n`]).pipe({from: 'stderr', stripFinalNewline: false})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 188why, one step back188 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 189–190why, one step back189});190TweaksSindre Sorhusbefore adoption698a1b8
line 191why, one step back191test('$.pipe.pipe(pipeAndSubprocessOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 192–194why, one step back192 const {stdout} = await $`noop-fd.js 2 ${foobarString}\n`193 .pipe({from: 'stderr'})`noop-stdin-fd.js 2`194 .pipe({from: 'stderr', stripFinalNewline: false})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 195why, one step back195 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 196–197why, one step back196});197TweaksSindre Sorhusbefore adoption698a1b8
line 198why, one step back198test('$.pipe("file", pipeAndSubprocessOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 199why, one step back199 const {stdout} = await $`noop-fd.js 2 ${foobarString}\n`.pipe('stdin.js', {from: 'stderr', stripFinalNewline: false});TweaksSindre Sorhusbefore adoption698a1b8
line 200why, one step back200 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 201–202why, one step back201});202TweaksSindre Sorhusbefore adoption698a1b8
line 203why, one step back203test('execa.$.pipe("file", pipeAndSubprocessOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 204why, one step back204 const {stdout} = await execa('noop-fd.js', ['2', `${foobarString}\n`]).pipe('stdin.js', {from: 'stderr', stripFinalNewline: false});TweaksSindre Sorhusbefore adoption698a1b8
line 205why, one step back205 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 206–207why, one step back206});207TweaksSindre Sorhusbefore adoption698a1b8
line 208why, one step back208test('$.pipe.pipe("file", pipeAndSubprocessOptions)', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 209–211why, one step back209 const {stdout} = await $`noop-fd.js 2 ${foobarString}\n`210 .pipe({from: 'stderr'})`noop-stdin-fd.js 2`211 .pipe('stdin.js', {from: 'stderr', stripFinalNewline: false});TweaksSindre Sorhusbefore adoption698a1b8
line 212why, one step back212 assert.equal(stdout, `${foobarString}\n`);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 213–214why, one step back213});214TweaksSindre Sorhusbefore adoption698a1b8
line 215why, one step back215test('$.pipe(options)(secondOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 216why, one step back216 const {stdout} = await $`noop.js ${foobarString}`.pipe({stripFinalNewline: false})({stripFinalNewline: true})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 217why, one step back217 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 218–219why, one step back218});219TweaksSindre Sorhusbefore adoption698a1b8
line 220why, one step back220test('execa.$.pipe(options)(secondOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 221why, one step back221 const {stdout} = await execa('noop.js', [foobarString]).pipe({stripFinalNewline: false})({stripFinalNewline: true})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 222why, one step back222 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 223–224why, one step back223});224TweaksSindre Sorhusbefore adoption698a1b8
line 225why, one step back225test('$.pipe.pipe(options)(secondOptions)`command`', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 226–228why, one step back226 const {stdout} = await $`noop.js ${foobarString}`227 .pipe({})({})`stdin.js`228 .pipe({stripFinalNewline: false})({stripFinalNewline: true})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 229why, one step back229 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 230–231why, one step back230});231TweaksSindre Sorhusbefore adoption698a1b8
line 232why, one step back232test('$.pipe`command` forces "stdin: pipe"', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 233why, one step back233 const {stdout} = await $`noop.js ${foobarString}`.pipe({stdin: 'ignore'})`stdin.js`;TweaksSindre Sorhusbefore adoption698a1b8
line 234why, one step back234 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 235–236why, one step back235});236TweaksSindre Sorhusbefore adoption698a1b8
line 237why, one step back237test('execa.pipe("file") forces "stdin: "pipe"', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 238why, one step back238 const {stdout} = await execa('noop.js', [foobarString]).pipe('stdin.js', {stdin: 'ignore'});TweaksSindre Sorhusbefore adoption698a1b8
line 239why, one step back239 assert.equal(stdout, foobarString);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 240–241why, one step back240});241TweaksSindre Sorhusbefore adoption698a1b8
lines 242–243why, one step back242test('execa.pipe(subprocess) does not force "stdin: pipe"', async () => {243 await assertRejects(100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 244–248why, one step back244 execa('noop.js', [foobarString]).pipe(execa('stdin.js', {stdin: 'ignore'})),245 {message: /"stdin: 'ignore'" option is incompatible/},246 );247});248TweaksSindre Sorhusbefore adoption698a1b8
lines 249–250why, one step back249test('$.pipe(options)(subprocess) fails', async () => {250 await assertRejects(100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 251–255why, one step back251 $`empty.js`.pipe({stdout: 'pipe'})($`empty.js`),252 {message: /Please use \.pipe/},253 );254});255TweaksSindre Sorhusbefore adoption698a1b8
lines 256–257why, one step back256test('execa.$.pipe(options)(subprocess) fails', async () => {257 await assertRejects(100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 258–262why, one step back258 execa('empty.js').pipe({stdout: 'pipe'})($`empty.js`),259 {message: /Please use \.pipe/},260 );261});262TweaksSindre Sorhusbefore adoption698a1b8
lines 263–264why, one step back263test('$.pipe(options)("file") fails', async () => {264 await assertRejects(100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 265–269why, one step back265 $`empty.js`.pipe({stdout: 'pipe'})('empty.js'),266 {message: /Please use \.pipe/},267 );268});269TweaksSindre Sorhusbefore adoption698a1b8
lines 270–271why, one step back270test('execa.$.pipe(options)("file") fails', async () => {271 await assertRejects(100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 272–276why, one step back272 execa('empty.js').pipe({stdout: 'pipe'})('empty.js'),273 {message: /Please use \.pipe/},274 );275});276TweaksSindre Sorhusbefore adoption698a1b8
lines 277–278why, one step back277const testInvalidPipe = async (...pipeArguments) => {278 await assertRejects(100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 279–283why, one step back279 $`empty.js`.pipe(...pipeArguments),280 {message: /must be a template string/},281 );282};283TweaksSindre Sorhusbefore adoption698a1b8
lines 284–285why, one step back284test('$.pipe(nonExecaSubprocess) fails', () => testInvalidPipe(spawn('node', ['--version'])));285test('$.pipe(false) fails', () => testInvalidPipe(false));