command.js
This file
Path
test/command.js
40 lines · 1.2 KiB · JavaScript
Last changed by
Split files (#791)ehmickybefore adoption932fb26
History of this fileTake it
The walk stopped after 200 commits: lines older than 2f61456 point at it.
Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
line 1why, one step back1import test from 'ava';Split files (#791)ehmickybefore adoption932fb26
line 2why, one step back2import {execaCommand, execaCommandSync} from '../index.js';Re-enable Windows in CI (#500)ehmickybefore adoption071d0a2
line 3why, one step back3import {setFixtureDir} from './helpers/fixtures-dir.js';Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
line 4why, one step back4Re-enable Windows in CI (#500)ehmickybefore adoption071d0a2
line 5why, one step back5setFixtureDir();Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
line 6why, one step back6Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 7why, one step back7test('execaCommand()', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 8why, one step back8 const {stdout} = await execaCommand('echo.js foo bar');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
lines 9–11why, one step back9 t.is(stdout, 'foo\nbar');10});11Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 12why, one step back12test('execaCommand() ignores consecutive spaces', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 13why, one step back13 const {stdout} = await execaCommand('echo.js foo bar');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
lines 14–16why, one step back14 t.is(stdout, 'foo\nbar');15});16Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
lines 17–18why, one step back17test('execaCommand() allows escaping spaces in commands', async t => {18 const {stdout} = await execaCommand('command\\ with\\ space.js foo bar');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
lines 19–21why, one step back19 t.is(stdout, 'foo\nbar');20});21Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 22why, one step back22test('execaCommand() allows escaping spaces in arguments', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 23why, one step back23 const {stdout} = await execaCommand('echo.js foo\\ bar');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
lines 24–26why, one step back24 t.is(stdout, 'foo bar');25});26Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 27why, one step back27test('execaCommand() escapes other whitespaces', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 28why, one step back28 const {stdout} = await execaCommand('echo.js foo\tbar');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
lines 29–31why, one step back29 t.is(stdout, 'foo\tbar');30});31Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 32why, one step back32test('execaCommand() trims', async t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 33why, one step back33 const {stdout} = await execaCommand(' echo.js foo bar ');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
lines 34–36why, one step back34 t.is(stdout, 'foo\nbar');35});36Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 37why, one step back37test('execaCommandSync()', t => {Simplify tests (#552)ehmickybefore adoption5fa61d8
line 38why, one step back38 const {stdout} = execaCommandSync('echo.js foo bar');Improve docs for `.command`Sindre Sorhusbefore adoption2f61456
line 39why, one step back39 t.is(stdout, 'foo\nbar');Fix default value of `stdin` with `$` (#550)ehmickybefore adoption6fe7e51
line 40why, one step back40});