command.js
This file
Path
test/command.js
340 lines · 11.1 KiB · JavaScript
Last changed by
Make `buffer` encoding option return `Uint8Array` instead of `Buffer` (#586)Youngbefore adoption1afeb81
History of this fileTake it
The walk stopped after 200 commits: lines older than 1ac56ea point at it.
Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
line 1why, one step back1import {inspect} from 'node:util';Rename internal variables (#379)ehmickybefore adoption1ac56ea
line 2why, one step back2import test from 'ava';Fix default value of `stdin` with `$` (#550)ehmickybefore adoption6fe7e51
line 3why, one step back3import {isStream} from 'is-stream';Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
line 4why, one step back4import {execa, execaSync, execaCommand, execaCommandSync, $} from '../index.js';Re-enable Windows in CI (#500)ehmickybefore adoption071d0a2
line 5why, one step back5import {setFixtureDir} from './helpers/fixtures-dir.js';Rename internal variables (#379)ehmickybefore adoption1ac56ea
line 6why, one step back6Re-enable Windows in CI (#500)ehmickybefore adoption071d0a2
line 7why, one step back7setFixtureDir();Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 8–9why, one step back89const command = async (t, expected, ...args) => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 10–11why, one step back10 const {command: failCommand} = await t.throwsAsync(execa('fail.js', args));11 t.is(failCommand, `fail.js${expected}`);Rename internal variables (#379)ehmickybefore adoption1ac56ea
line 12why, one step back12Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 13–14why, one step back13 const {command} = await execa('noop.js', args);14 t.is(command, `noop.js${expected}`);Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 15–22why, one step back15};1617command.title = (message, expected) => `command is: ${JSON.stringify(expected)}`;1819test(command, ' foo bar', 'foo', 'bar');20test(command, ' baz quz', 'baz', 'quz');21test(command, '');22Add `.escapedCommand` property (#466)ehmickybefore adoption712bafc
line 23why, one step back23const testEscapedCommand = async (t, expected, args) => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 24–25why, one step back24 const {escapedCommand: failEscapedCommand} = await t.throwsAsync(execa('fail.js', args));25 t.is(failEscapedCommand, `fail.js ${expected}`);Add `.escapedCommand` property (#466)ehmickybefore adoption712bafc
lines 26–27why, one step back2627 const {escapedCommand: failEscapedCommandSync} = t.throws(() => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 28why, one step back28 execaSync('fail.js', args);Add `.escapedCommand` property (#466)ehmickybefore adoption712bafc
line 29why, one step back29 });Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 30why, one step back30 t.is(failEscapedCommandSync, `fail.js ${expected}`);Add `.escapedCommand` property (#466)ehmickybefore adoption712bafc
line 31why, one step back31Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 32–33why, one step back32 const {escapedCommand} = await execa('noop.js', args);33 t.is(escapedCommand, `noop.js ${expected}`);Add `.escapedCommand` property (#466)ehmickybefore adoption712bafc
line 34why, one step back34Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 35–36why, one step back35 const {escapedCommand: escapedCommandSync} = execaSync('noop.js', args);36 t.is(escapedCommandSync, `noop.js ${expected}`);Add `.escapedCommand` property (#466)ehmickybefore adoption712bafc
lines 37–45why, one step back37};3839testEscapedCommand.title = (message, expected) => `escapedCommand is: ${JSON.stringify(expected)}`;4041test(testEscapedCommand, 'foo bar', ['foo', 'bar']);42test(testEscapedCommand, '"foo bar"', ['foo bar']);43test(testEscapedCommand, '"\\"foo\\""', ['"foo"']);44test(testEscapedCommand, '"*"', ['*']);45Rename internal variables (#379)ehmickybefore adoption1ac56ea
line 46why, one step back46test('allow commands with spaces and no array arguments', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 47why, one step back47 const {stdout} = await execa('command with space.js');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 48–51why, one step back48 t.is(stdout, '');49});5051test('allow commands with spaces and array arguments', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 52why, one step back52 const {stdout} = await execa('command with space.js', ['foo', 'bar']);Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 53–55why, one step back53 t.is(stdout, 'foo\nbar');54});55Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 56why, one step back56test('execaCommand()', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 57why, one step back57 const {stdout} = await execaCommand('echo.js foo bar');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 58–60why, one step back58 t.is(stdout, 'foo\nbar');59});60Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 61why, one step back61test('execaCommand() ignores consecutive spaces', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 62why, one step back62 const {stdout} = await execaCommand('echo.js foo bar');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 63–65why, one step back63 t.is(stdout, 'foo\nbar');64});65Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 66–67why, one step back66test('execaCommand() allows escaping spaces in commands', async t => {67 const {stdout} = await execaCommand('command\\ with\\ space.js foo bar');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 68–70why, one step back68 t.is(stdout, 'foo\nbar');69});70Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 71why, one step back71test('execaCommand() allows escaping spaces in arguments', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 72why, one step back72 const {stdout} = await execaCommand('echo.js foo\\ bar');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 73–75why, one step back73 t.is(stdout, 'foo bar');74});75Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 76why, one step back76test('execaCommand() escapes other whitespaces', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 77why, one step back77 const {stdout} = await execaCommand('echo.js foo\tbar');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 78–80why, one step back78 t.is(stdout, 'foo\tbar');79});80Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 81why, one step back81test('execaCommand() trims', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 82why, one step back82 const {stdout} = await execaCommand(' echo.js foo bar ');Rename internal variables (#379)ehmickybefore adoption1ac56ea
lines 83–85why, one step back83 t.is(stdout, 'foo\nbar');84});85Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 86why, one step back86test('execaCommandSync()', t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 87why, one step back87 const {stdout} = execaCommandSync('echo.js foo bar');Rename internal variables (#379)ehmickybefore adoption1ac56ea
line 88why, one step back88 t.is(stdout, 'foo\nbar');Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 89–91why, one step back89});9091test('$', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 92why, one step back92 const {stdout} = await $`echo.js foo bar`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 93–101why, one step back93 t.is(stdout, 'foo\nbar');94});9596test('$ accepts options', async t => {97 const {stdout} = await $({stripFinalNewline: true})`noop.js foo`;98 t.is(stdout, 'foo');99});100101test('$ allows string interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 102why, one step back102 const {stdout} = await $`echo.js foo ${'bar'}`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 103–105why, one step back103 t.is(stdout, 'foo\nbar');104});105Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
line 106why, one step back106test('$ allows number interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 107why, one step back107 const {stdout} = await $`echo.js 1 ${2}`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 108–110why, one step back108 t.is(stdout, '1\n2');109});110Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
line 111why, one step back111test('$ allows array interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 112why, one step back112 const {stdout} = await $`echo.js ${['foo', 'bar']}`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 113–115why, one step back113 t.is(stdout, 'foo\nbar');114});115Fix argument concatenation with `$` (#553)ehmickybefore adoption07585d0
lines 116–120why, one step back116test('$ allows empty array interpolation', async t => {117 const {stdout} = await $`echo.js foo ${[]} bar`;118 t.is(stdout, 'foo\nbar');119});120Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
line 121why, one step back121test('$ allows execa return value interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
lines 122–123why, one step back122 const foo = await $`echo.js foo`;123 const {stdout} = await $`echo.js ${foo} bar`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 124–127why, one step back124 t.is(stdout, 'foo\nbar');125});126127test('$ allows execa return value array interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
lines 128–129why, one step back128 const foo = await $`echo.js foo`;129 const {stdout} = await $`echo.js ${[foo, 'bar']}`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 130–133why, one step back130 t.is(stdout, 'foo\nbar');131});132133test('$ allows execa return value buffer interpolation', async t => {Make `buffer` encoding option return `Uint8Array` instead of `Buffer` (#586)Youngbefore adoption1afeb81
line 134why, one step back134 const foo = await $({encoding: 'buffer'})`echo.js foo`;Simplify tests (#552)ehmickybefore adoption5fa61d8
line 135why, one step back135 const {stdout} = await $`echo.js ${foo} bar`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 136–139why, one step back136 t.is(stdout, 'foo\nbar');137});138139test('$ allows execa return value buffer array interpolation', async t => {Make `buffer` encoding option return `Uint8Array` instead of `Buffer` (#586)Youngbefore adoption1afeb81
line 140why, one step back140 const foo = await $({encoding: 'buffer'})`echo.js foo`;Simplify tests (#552)ehmickybefore adoption5fa61d8
line 141why, one step back141 const {stdout} = await $`echo.js ${[foo, 'bar']}`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 142–144why, one step back142 t.is(stdout, 'foo\nbar');143});144Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
line 145why, one step back145test('$ ignores consecutive spaces', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 146why, one step back146 const {stdout} = await $`echo.js foo bar`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 147–150why, one step back147 t.is(stdout, 'foo\nbar');148});149150test('$ allows escaping spaces with interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 151why, one step back151 const {stdout} = await $`echo.js ${'foo bar'}`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 152–155why, one step back152 t.is(stdout, 'foo bar');153});154155test('$ disallows escaping spaces with backslashes', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 156why, one step back156 const {stdout} = await $`echo.js foo\\ bar`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 157–160why, one step back157 t.is(stdout, 'foo\\\nbar');158});159160test('$ allows space escaped values in array interpolation', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 161why, one step back161 const {stdout} = await $`echo.js ${['foo', 'bar baz']}`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 162–165why, one step back162 t.is(stdout, 'foo\nbar baz');163});164165test('$ passes newline escape sequence as one argument', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 166why, one step back166 const {stdout} = await $`echo.js \n`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 167–170why, one step back167 t.is(stdout, '\n');168});169170test('$ passes newline escape sequence in interpolation as one argument', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 171why, one step back171 const {stdout} = await $`echo.js ${'\n'}`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 172–175why, one step back172 t.is(stdout, '\n');173});174175test('$ handles invalid escape sequence', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 176why, one step back176 const {stdout} = await $`echo.js \u`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
line 177why, one step back177 t.is(stdout, '\\u');Fix argument concatenation with `$` (#553)ehmickybefore adoption07585d0
lines 178–217why, one step back178});179180test('$ can concatenate at the end of tokens', async t => {181 const {stdout} = await $`echo.js foo${'bar'}`;182 t.is(stdout, 'foobar');183});184185test('$ does not concatenate at the end of tokens with a space', async t => {186 const {stdout} = await $`echo.js foo ${'bar'}`;187 t.is(stdout, 'foo\nbar');188});189190test('$ can concatenate at the end of tokens followed by an array', async t => {191 const {stdout} = await $`echo.js foo${['bar', 'foo']}`;192 t.is(stdout, 'foobar\nfoo');193});194195test('$ can concatenate at the start of tokens', async t => {196 const {stdout} = await $`echo.js ${'foo'}bar`;197 t.is(stdout, 'foobar');198});199200test('$ does not concatenate at the start of tokens with a space', async t => {201 const {stdout} = await $`echo.js ${'foo'} bar`;202 t.is(stdout, 'foo\nbar');203});204205test('$ can concatenate at the start of tokens followed by an array', async t => {206 const {stdout} = await $`echo.js ${['foo', 'bar']}foo`;207 t.is(stdout, 'foo\nbarfoo');208});209210test('$ can concatenate at the start and end of tokens followed by an array', async t => {211 const {stdout} = await $`echo.js foo${['bar', 'foo']}bar`;212 t.is(stdout, 'foobar\nfoobar');213});214215test('$ can concatenate multiple tokens', async t => {216 const {stdout} = await $`echo.js ${'foo'}bar${'foo'}`;217 t.is(stdout, 'foobarfoo');Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 218–225why, one step back218});219220test('$ allows escaping spaces in commands with interpolation', async t => {221 const {stdout} = await $`${'command with space.js'} foo bar`;222 t.is(stdout, 'foo\nbar');223});224225test('$ escapes other whitespaces', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 226why, one step back226 const {stdout} = await $`echo.js foo\tbar`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 227–230why, one step back227 t.is(stdout, 'foo\tbar');228});229230test('$ trims', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 231why, one step back231 const {stdout} = await $` echo.js foo bar `;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 232–235why, one step back232 t.is(stdout, 'foo\nbar');233});234235test('$.sync', t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 236why, one step back236 const {stdout} = $.sync`echo.js foo bar`;Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 237–239why, one step back237 t.is(stdout, 'foo\nbar');238});239Add `$.s` as an alias for `$.sync` (#594)ehmickybefore adoptionb719fb0
lines 240–244why, one step back240test('$.sync can be called $.s', t => {241 const {stdout} = $.s`echo.js foo bar`;242 t.is(stdout, 'foo\nbar');243});244Add `$` tagged templates API (#510)Aaron Casanovabefore adoptioneae327c
lines 245–247why, one step back245test('$.sync accepts options', t => {246 const {stdout} = $({stripFinalNewline: true}).sync`noop.js foo`;247 t.is(stdout, 'foo');Rename internal variables (#379)ehmickybefore adoption1ac56ea
line 248why, one step back248});Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
line 249why, one step back249Improve validation of `$.sync` options binding (#551)ehmickybefore adoption881fbad
lines 250–253why, one step back250test('$.sync must be used after options binding, not before', t => {251 t.throws(() => $.sync({})`noop.js`, {message: /Please use/});252});253Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
line 254why, one step back254test('$.sync allows execa return value interpolation', t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
lines 255–256why, one step back255 const foo = $.sync`echo.js foo`;256 const {stdout} = $.sync`echo.js ${foo} bar`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 257–260why, one step back257 t.is(stdout, 'foo\nbar');258});259260test('$.sync allows execa return value array interpolation', t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
lines 261–262why, one step back261 const foo = $.sync`echo.js foo`;262 const {stdout} = $.sync`echo.js ${[foo, 'bar']}`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 263–266why, one step back263 t.is(stdout, 'foo\nbar');264});265266test('$.sync allows execa return value buffer interpolation', t => {Make `buffer` encoding option return `Uint8Array` instead of `Buffer` (#586)Youngbefore adoption1afeb81
line 267why, one step back267 const foo = $({encoding: 'buffer'}).sync`echo.js foo`;Simplify tests (#552)ehmickybefore adoption5fa61d8
line 268why, one step back268 const {stdout} = $.sync`echo.js ${foo} bar`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 269–272why, one step back269 t.is(stdout, 'foo\nbar');270});271272test('$.sync allows execa return value buffer array interpolation', t => {Make `buffer` encoding option return `Uint8Array` instead of `Buffer` (#586)Youngbefore adoption1afeb81
line 273why, one step back273 const foo = $({encoding: 'buffer'}).sync`echo.js foo`;Simplify tests (#552)ehmickybefore adoption5fa61d8
line 274why, one step back274 const {stdout} = $.sync`echo.js ${[foo, 'bar']}`;Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 275–280why, one step back275 t.is(stdout, 'foo\nbar');276});277278const invalidExpression = test.macro({279 async exec(t, input, expected) {280 await t.throwsAsync(Simplify tests (#552)ehmickybefore adoption5fa61d8
line 281why, one step back281 async () => $`echo.js ${input}`,Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 282–285why, one step back282 {instanceOf: TypeError, message: expected},283 );284285 t.throws(Simplify tests (#552)ehmickybefore adoption5fa61d8
line 286why, one step back286 () => $.sync`echo.js ${input}`,Allow `execa` return values in `$` template expressions (#528)Aaron Casanovabefore adoption58ea251
lines 287–326why, one step back287 {instanceOf: TypeError, message: expected},288 );289 },290 title(prettyInput, input, expected) {291 return `$ APIs throw on invalid '${prettyInput ?? inspect(input)}' expression with '${expected}'`;292 },293});294295test(invalidExpression, undefined, 'Unexpected "undefined" in template expression');296test(invalidExpression, [undefined], 'Unexpected "undefined" in template expression');297298test(invalidExpression, null, 'Unexpected "object" in template expression');299test(invalidExpression, [null], 'Unexpected "object" in template expression');300301test(invalidExpression, true, 'Unexpected "boolean" in template expression');302test(invalidExpression, [true], 'Unexpected "boolean" in template expression');303304test(invalidExpression, {}, 'Unexpected "object" in template expression');305test(invalidExpression, [{}], 'Unexpected "object" in template expression');306307test(invalidExpression, {foo: 'bar'}, 'Unexpected "object" in template expression');308test(invalidExpression, [{foo: 'bar'}], 'Unexpected "object" in template expression');309310test(invalidExpression, {stdout: undefined}, 'Unexpected "undefined" stdout in template expression');311test(invalidExpression, [{stdout: undefined}], 'Unexpected "undefined" stdout in template expression');312313test(invalidExpression, {stdout: 1}, 'Unexpected "number" stdout in template expression');314test(invalidExpression, [{stdout: 1}], 'Unexpected "number" stdout in template expression');315316test(invalidExpression, Promise.resolve(), 'Unexpected "object" in template expression');317test(invalidExpression, [Promise.resolve()], 'Unexpected "object" in template expression');318319test(invalidExpression, Promise.resolve({stdout: 'foo'}), 'Unexpected "object" in template expression');320test(invalidExpression, [Promise.resolve({stdout: 'foo'})], 'Unexpected "object" in template expression');321322test('$`noop.js`', invalidExpression, $`noop.js`, 'Unexpected "object" in template expression');323test('[ $`noop.js` ]', invalidExpression, [$`noop.js`], 'Unexpected "object" in template expression');324325test('$({stdio: \'inherit\'}).sync`noop.js`', invalidExpression, $({stdio: 'inherit'}).sync`noop.js`, 'Unexpected "undefined" stdout in template expression');326test('[ $({stdio: \'inherit\'}).sync`noop.js` ]', invalidExpression, [$({stdio: 'inherit'}).sync`noop.js`], 'Unexpected "undefined" stdout in template expression');Fix default value of `stdin` with `$` (#550)ehmickybefore adoption6fe7e51
lines 327–340why, one step back327328test('$ stdin defaults to "inherit"', async t => {329 const {stdout} = await $({input: 'foo'})`stdin-script.js`;330 t.is(stdout, 'foo');331});332333test('$.sync stdin defaults to "inherit"', t => {334 const {stdout} = $({input: 'foo'}).sync`stdin-script.js`;335 t.is(stdout, 'foo');336});337338test('$ stdin has no default value when stdio is set', t => {339 t.true(isStream($({stdio: 'pipe'})`noop.js`.stdin));340});