Skip to content
Myr

result-all.test-d.ts

This file

Path

test-d/return/result-all.test-d.ts

31 lines · 963 bytes · TypeScript

Last changed by

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

History of this file

Take it

The walk stopped after 200 commits: lines older than 9f65b86 point at it.

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 1why, one step back
1import {expectTypeOf} from 'nz';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 2–9why, one step back
2import {
3 execa,4 execaSync,5 type ExecaError,6 type ExecaSyncError,7} from '../../index.js';89const allResult = await execa('unicorns', {all: true});

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 10why, one step back
10expectTypeOf(allResult.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 11–12why, one step back
11
12const noAllResult = await execa('unicorns');

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 13why, one step back
13expectTypeOf(noAllResult.all).toBe<undefined>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 14–15why, one step back
14
15const allResultSync = execaSync('unicorns', {all: true});

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 16why, one step back
16expectTypeOf(allResultSync.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 17–18why, one step back
17
18const noAllResultSync = execaSync('unicorns');

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 19why, one step back
19expectTypeOf(noAllResultSync.all).toBe<undefined>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 20–21why, one step back
20
21const allError = new Error('.') as ExecaError<{all: true}>;

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 22why, one step back
22expectTypeOf(allError.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 23–24why, one step back
23
24const noAllError = new Error('.') as ExecaError<{}>;

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 25why, one step back
25expectTypeOf(noAllError.all).toBe<undefined>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 26–27why, one step back
26
27const allErrorSync = new Error('.') as ExecaError<{all: true}>;

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 28why, one step back
28expectTypeOf(allErrorSync.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 29–30why, one step back
29
30const noAllErrorSync = new Error('.') as ExecaSyncError<{}>;

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

line 31why, one step back
31expectTypeOf(noAllErrorSync.all).toBe<undefined>();