error.js
This file
Path
test/error.js
294 lines · 10.9 KiB · JavaScript
Last changed by
Fix `reject` option with early spawning errors (#734)ehmickybefore adoption8a18881
History of this fileTake it
The walk stopped after 200 commits: lines older than 0e4da68 point at it.
Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 1why, one step back1import process from 'node:process';Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 2why, one step back2import test from 'ava';Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 3why, one step back3import {execa, execaSync} from '../index.js';Add `cwd` error property (#565)homersimpsonsbefore adoptionf57fdec
line 4why, one step back4import {FIXTURES_DIR, setFixtureDir} from './helpers/fixtures-dir.js';Improve `error.message` (#705)ehmickybefore adoption67b476b
line 5why, one step back5import {fullStdio, getStdio} from './helpers/stdio.js';Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce
line 6why, one step back6import {noopGenerator, outputObjectGenerator} from './helpers/generator.js';Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 7why, one step back7Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
line 8why, one step back8const isWindows = process.platform === 'win32';Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 9why, one step back9Re-enable Windows in CI (#500)ehmickybefore adoption071d0a2
line 10why, one step back10setFixtureDir();Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 11why, one step back11Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 12–13why, one step back12const TIMEOUT_REGEXP = /timed out after/;13Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 14–16why, one step back14const testEmptyErrorStdio = async (t, execaMethod) => {15 const {failed, stdout, stderr, stdio} = await execaMethod('fail.js', {reject: false});16 t.true(failed);Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
lines 17–18why, one step back17 t.is(stdout, '');18 t.is(stderr, '');Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 19–20why, one step back19 t.deepEqual(stdio, [undefined, '', '']);20};Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 21why, one step back21Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 22–23why, one step back22test('empty error.stdout/stderr/stdio', testEmptyErrorStdio, execa);23test('empty error.stdout/stderr/stdio - sync', testEmptyErrorStdio, execaSync);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 24why, one step back24Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 25–30why, one step back25const testUndefinedErrorStdio = async (t, execaMethod) => {26 const {stdout, stderr, stdio} = await execaMethod('empty.js', {stdio: 'ignore'});27 t.is(stdout, undefined);28 t.is(stderr, undefined);29 t.deepEqual(stdio, [undefined, undefined, undefined]);30};Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 31why, one step back31Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 32–43why, one step back32test('undefined error.stdout/stderr/stdio', testUndefinedErrorStdio, execa);33test('undefined error.stdout/stderr/stdio - sync', testUndefinedErrorStdio, execaSync);3435const testEmptyAll = async (t, options, expectedValue) => {36 const {all} = await t.throwsAsync(execa('fail.js', options));37 t.is(all, expectedValue);38};3940test('empty error.all', testEmptyAll, {all: true}, '');41test('undefined error.all', testEmptyAll, {}, undefined);42test('ignored error.all', testEmptyAll, {all: true, stdio: 'ignore'}, undefined);43Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
lines 44–45why, one step back44test('empty error.stdio[0] even with input', async t => {45 const {stdio} = await t.throwsAsync(execa('fail.js', {input: 'test'}));Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
line 46why, one step back46 t.is(stdio[0], undefined);Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
lines 47–48why, one step back47});48Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 49–50why, one step back49// `error.code` is OS-specific here50const SPAWN_ERROR_CODES = new Set(['EINVAL', 'ENOTSUP', 'EPERM']);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 51why, one step back51Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
line 52why, one step back52test('stdout/stderr/stdio on process spawning errors', async t => {Fix `reject` option with early spawning errors (#734)ehmickybefore adoption8a18881
line 53why, one step back53 const {code, stdout, stderr, stdio} = await t.throwsAsync(execa('empty.js', {uid: -1}));Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 54–57why, one step back54 t.true(SPAWN_ERROR_CODES.has(code));55 t.is(stdout, undefined);56 t.is(stderr, undefined);57 t.deepEqual(stdio, [undefined, undefined, undefined]);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 58–59why, one step back58});59Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 60–61why, one step back60test('stdout/stderr/all/stdio on process spawning errors - sync', t => {61 const {code, stdout, stderr, stdio} = t.throws(() => {Fix `reject` option with early spawning errors (#734)ehmickybefore adoption8a18881
line 62why, one step back62 execaSync('empty.js', {uid: -1});Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 63why, one step back63 });Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 64–67why, one step back64 t.true(SPAWN_ERROR_CODES.has(code));65 t.is(stdout, undefined);66 t.is(stderr, undefined);67 t.deepEqual(stdio, [undefined, undefined, undefined]);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 68–69why, one step back68});69Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 70–72why, one step back70const testErrorOutput = async (t, execaMethod) => {71 const {failed, stdout, stderr, stdio} = await execaMethod('echo-fail.js', {...fullStdio, reject: false});72 t.true(failed);Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
lines 73–74why, one step back73 t.is(stdout, 'stdout');74 t.is(stderr, 'stderr');Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 75–76why, one step back75 t.deepEqual(stdio, [undefined, 'stdout', 'stderr', 'fd3']);76};Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 77why, one step back77Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 78–79why, one step back78test('error.stdout/stderr/stdio is defined', testErrorOutput, execa);79test('error.stdout/stderr/stdio is defined - sync', testErrorOutput, execaSync);Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 80why, one step back80Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 81why, one step back81test('exitCode is 0 on success', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 82why, one step back82 const {exitCode} = await execa('noop.js', ['foo']);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 83–85why, one step back83 t.is(exitCode, 0);84});85Upgrade dependenciesSindre Sorhusbefore adoption5d64878
line 86why, one step back86const testExitCode = async (t, number) => {Fix inconsistency between `result.stdout` and `error.stdout` (#686)ehmickybefore adoptionec383fe
lines 87–90why, one step back87 const {exitCode} = await t.throwsAsync(88 execa('exit.js', [`${number}`]),89 {message: new RegExp(`failed with exit code ${number}`)},90 );Upgrade dependenciesSindre Sorhusbefore adoption5d64878
line 91why, one step back91 t.is(exitCode, number);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 92–98why, one step back92};9394test('exitCode is 2', testExitCode, 2);95test('exitCode is 3', testExitCode, 3);96test('exitCode is 4', testExitCode, 4);9798test('error.message contains the command', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 99why, one step back99 await t.throwsAsync(execa('exit.js', ['2', 'foo', 'bar']), {message: /exit.js 2 foo bar/});Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 100–101why, one step back100});101Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce
lines 102–103why, one step back102const testStdioMessage = async (t, encoding, all, objectMode) => {103 const {message} = await t.throwsAsync(execa('echo-fail.js', {...getStdio(1, noopGenerator(objectMode), 4), encoding, all}));Improve `error.message` (#705)ehmickybefore adoption67b476b
lines 104–105why, one step back104 const output = all ? 'stdout\nstderr' : 'stderr\n\nstdout';105 t.true(message.endsWith(`echo-fail.js\n\n${output}\n\nfd3`));Fix `error.message` when using `encoding: 'buffer'` (#701)ehmickybefore adoptionb8c1f55
lines 106–107why, one step back106};107Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce
lines 108–115why, one step back108test('error.message contains stdout/stderr/stdio if available', testStdioMessage, 'utf8', false, false);109test('error.message contains stdout/stderr/stdio even with encoding "buffer"', testStdioMessage, 'buffer', false, false);110test('error.message contains all if available', testStdioMessage, 'utf8', true, false);111test('error.message contains all even with encoding "buffer"', testStdioMessage, 'buffer', true, false);112test('error.message contains stdout/stderr/stdio if available, objectMode', testStdioMessage, 'utf8', false, true);113test('error.message contains stdout/stderr/stdio even with encoding "buffer", objectMode', testStdioMessage, 'buffer', false, true);114test('error.message contains all if available, objectMode', testStdioMessage, 'utf8', true, true);115test('error.message contains all even with encoding "buffer", objectMode', testStdioMessage, 'buffer', true, true);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 116why, one step back116Improve `error.message` (#705)ehmickybefore adoption67b476b
lines 117–120why, one step back117const testPartialIgnoreMessage = async (t, index, stdioOption, output) => {118 const {message} = await t.throwsAsync(execa('echo-fail.js', getStdio(index, stdioOption, 4)));119 t.true(message.endsWith(`echo-fail.js\n\n${output}\n\nfd3`));120};Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 121why, one step back121Improve `error.message` (#705)ehmickybefore adoption67b476b
lines 122–123why, one step back122test('error.message does not contain stdout if not available', testPartialIgnoreMessage, 1, 'ignore', 'stderr');123test('error.message does not contain stderr if not available', testPartialIgnoreMessage, 2, 'ignore', 'stdout');Allow any type with transforms (#709)ehmickybefore adoptioned8b2ce
lines 124–125why, one step back124test('error.message does not contain stdout if it is an object', testPartialIgnoreMessage, 1, outputObjectGenerator, 'stderr');125test('error.message does not contain stderr if it is an object', testPartialIgnoreMessage, 2, outputObjectGenerator, 'stdout');Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 126why, one step back126Improve `error.message` (#705)ehmickybefore adoption67b476b
lines 127–128why, one step back127const testFullIgnoreMessage = async (t, options, resultProperty) => {128 const {[resultProperty]: message} = await t.throwsAsync(execa('echo-fail.js', options));Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 129–130why, one step back129 t.false(message.includes('stderr'));130 t.false(message.includes('stdout'));Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 131why, one step back131 t.false(message.includes('fd3'));Improve `error.message` (#705)ehmickybefore adoption67b476b
line 132why, one step back132};Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 133why, one step back133Improve `error.message` (#705)ehmickybefore adoption67b476b
lines 134–143why, one step back134test('error.message does not contain stdout/stderr/stdio if not available', testFullIgnoreMessage, {stdio: 'ignore'}, 'message');135test('error.shortMessage does not contain stdout/stderr/stdio', testFullIgnoreMessage, fullStdio, 'shortMessage');136137const testErrorMessageConsistent = async (t, stdout) => {138 const {message} = await t.throwsAsync(execa('noop-both-fail.js', [stdout, 'stderr']));139 t.true(message.endsWith(`noop-both-fail.js ${stdout} stderr\n\nstderr\n\nstdout`));140};141142test('error.message newlines are consistent - no newline', testErrorMessageConsistent, 'stdout');143test('error.message newlines are consistent - newline', testErrorMessageConsistent, 'stdout\n');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 144–145why, one step back144145test('Original error.message is kept', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 146why, one step back146 const {originalMessage} = await t.throwsAsync(execa('noop.js', {cwd: 1}));Drop support for Node 12 (#497)ehmickybefore adoptiona09cbc0
line 147why, one step back147 t.true(originalMessage.startsWith('The "options.cwd" property must be of type string or an instance of Buffer or URL. Received type number'));Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 148–150why, one step back148});149150test('failed is false on success', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 151why, one step back151 const {failed} = await execa('noop.js', ['foo']);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 152–155why, one step back152 t.false(failed);153});154155test('failed is true on failure', async t => {Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 156why, one step back156 const {failed} = await t.throwsAsync(execa('fail.js'));Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 157–159why, one step back157 t.true(failed);158});159Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
line 160why, one step back160test('error.isTerminated is true if process was killed directly', async t => {Improve `killSignal` option (#728)ehmickybefore adoptioncf36c1d
line 161why, one step back161 const subprocess = execa('forever.js', {killSignal: 'SIGINT'});Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 162–164why, one step back162163 subprocess.kill();164Improve `killSignal` option (#728)ehmickybefore adoptioncf36c1d
line 165why, one step back165 const {isTerminated, signal} = await t.throwsAsync(subprocess, {message: /was killed with SIGINT/});Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
line 166why, one step back166 t.true(isTerminated);Improve `killSignal` option (#728)ehmickybefore adoptioncf36c1d
line 167why, one step back167 t.is(signal, 'SIGINT');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 168–169why, one step back168});169Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
line 170why, one step back170test('error.isTerminated is true if process was killed indirectly', async t => {Improve `killSignal` option (#728)ehmickybefore adoptioncf36c1d
line 171why, one step back171 const subprocess = execa('forever.js', {killSignal: 'SIGHUP'});Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 172–175why, one step back172173 process.kill(subprocess.pid, 'SIGINT');174175 // `process.kill()` is emulated by Node.js on WindowsImprove process termination (#724)ehmickybefore adoption1c48d37
lines 176–184why, one step back176 if (isWindows) {177 const {isTerminated, signal} = await t.throwsAsync(subprocess, {message: /failed with exit code 1/});178 t.is(isTerminated, false);179 t.is(signal, undefined);180 } else {181 const {isTerminated, signal} = await t.throwsAsync(subprocess, {message: /was killed with SIGINT/});182 t.is(isTerminated, true);183 t.is(signal, 'SIGINT');184 }Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 185–186why, one step back185});186Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
lines 187–189why, one step back187test('result.isTerminated is false if not killed', async t => {188 const {isTerminated} = await execa('noop.js');189 t.false(isTerminated);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 190–191why, one step back190});191Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
lines 192–197why, one step back192test('result.isTerminated is false if not killed and childProcess.kill() was called', async t => {193 const subprocess = execa('noop.js');194 subprocess.kill(0);195 t.true(subprocess.killed);196 const {isTerminated} = await subprocess;197 t.false(isTerminated);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 198–199why, one step back198});199Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
lines 200–202why, one step back200test('result.isTerminated is false if not killed, in sync mode', t => {201 const {isTerminated} = execaSync('noop.js');202 t.false(isTerminated);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 203–204why, one step back203});204Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
lines 205–211why, one step back205test('result.isTerminated is false on process error', async t => {206 const {isTerminated} = await t.throwsAsync(execa('wrong command'));207 t.false(isTerminated);208});209210test('result.isTerminated is false on process error, in sync mode', t => {211 const {isTerminated} = t.throws(() => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 212why, one step back212 execaSync('wrong command');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 213why, one step back213 });Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
line 214why, one step back214 t.false(isTerminated);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 215–216why, one step back215});216Fix `error.killed` and rename to `error.isTerminated` (#625)ehmickybefore adoption248349c
line 217why, one step back217if (!isWindows) {Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 218why, one step back218 test('error.signal is SIGINT', async t => {Fix randomly failing tests for `spawned.kill()` (#613)ehmickybefore adoption43c30ac
line 219why, one step back219 const subprocess = execa('forever.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 220–227why, one step back220221 process.kill(subprocess.pid, 'SIGINT');222223 const {signal} = await t.throwsAsync(subprocess, {message: /was killed with SIGINT/});224 t.is(signal, 'SIGINT');225 });226227 test('error.signalDescription is defined', async t => {Fix randomly failing tests for `spawned.kill()` (#613)ehmickybefore adoption43c30ac
line 228why, one step back228 const subprocess = execa('forever.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 229–236why, one step back229230 process.kill(subprocess.pid, 'SIGINT');231232 const {signalDescription} = await t.throwsAsync(subprocess, {message: /User interruption with CTRL-C/});233 t.is(signalDescription, 'User interruption with CTRL-C');234 });235236 test('error.signal is SIGTERM', async t => {Fix randomly failing tests for `spawned.kill()` (#613)ehmickybefore adoption43c30ac
line 237why, one step back237 const subprocess = execa('forever.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 238–244why, one step back238239 process.kill(subprocess.pid, 'SIGTERM');240241 const {signal} = await t.throwsAsync(subprocess, {message: /was killed with SIGTERM/});242 t.is(signal, 'SIGTERM');243 });244Improve `killSignal` option (#728)ehmickybefore adoptioncf36c1d
lines 245–247why, one step back245 test('error.signal uses killSignal', async t => {246 const {signal} = await t.throwsAsync(execa('forever.js', {killSignal: 'SIGINT', timeout: 1, message: TIMEOUT_REGEXP}));247 t.is(signal, 'SIGINT');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 248–250why, one step back248 });249250 test('exitCode is undefined on signal termination', async t => {Fix randomly failing tests for `spawned.kill()` (#613)ehmickybefore adoption43c30ac
line 251why, one step back251 const subprocess = execa('forever.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 252–260why, one step back252253 process.kill(subprocess.pid);254255 const {exitCode} = await t.throwsAsync(subprocess);256 t.is(exitCode, undefined);257 });258}259260test('result.signal is undefined for successful execution', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 261why, one step back261 const {signal} = await execa('noop.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 262–265why, one step back262 t.is(signal, undefined);263});264265test('result.signal is undefined if process failed, but was not killed', async t => {Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 266why, one step back266 const {signal} = await t.throwsAsync(execa('fail.js'));Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 267–270why, one step back267 t.is(signal, undefined);268});269270test('result.signalDescription is undefined for successful execution', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 271why, one step back271 const {signalDescription} = await execa('noop.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 272–275why, one step back272 t.is(signalDescription, undefined);273});274275test('error.code is undefined on success', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 276why, one step back276 const {code} = await execa('noop.js');Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
lines 277–280why, one step back277 t.is(code, undefined);278});279280test('error.code is defined on failure if applicable', async t => {Require Node.js 12.20 and move to ESM (#478)Minh Nguyenbefore adoption7707880
line 281why, one step back281 const {code} = await t.throwsAsync(execa('noop.js', {cwd: 1}));Remove faulty emulated ENOENT error on Windows (#447)Mark Terrelbefore adoptionbdbd975
line 282why, one step back282 t.is(code, 'ERR_INVALID_ARG_TYPE');Add `cwd` error property (#565)homersimpsonsbefore adoptionf57fdec
lines 283–285why, one step back283});284285test('error.cwd is defined on failure if applicable', async t => {Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 286why, one step back286 const {cwd} = await t.throwsAsync(execa('fail.js', [], {cwd: FIXTURES_DIR}));Add `cwd` error property (#565)homersimpsonsbefore adoptionf57fdec
lines 287–291why, one step back287 t.is(cwd, FIXTURES_DIR);288});289290test('error.cwd is undefined on failure if not passed as options', async t => {291 const expectedCwd = process.cwd();Add `result.stdio` and `error.stdio` (#676)ehmickybefore adoption62a5207
line 292why, one step back292 const {cwd} = await t.throwsAsync(execa('fail.js'));Add `cwd` error property (#565)homersimpsonsbefore adoptionf57fdec
line 293why, one step back293 t.is(cwd, expectedCwd);Simplify `mergePromise` function (#403)fisker Cheungbefore adoption0e4da68
line 294why, one step back294});