Skip to content
Myr

specific.test-d.ts

This file

Path

test-d/arguments/specific.test-d.ts

169 lines · 9.3 KiB · 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, expectError} from 'nz';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 2–11why, one step back
2import {execa, execaSync} from '../../index.js';
34await execa('unicorns', {maxBuffer: {}});5expectError(await execa('unicorns', {maxBuffer: []}));6await execa('unicorns', {maxBuffer: {stdout: 0}});7await execa('unicorns', {maxBuffer: {stderr: 0}});8await execa('unicorns', {maxBuffer: {stdout: 0, stderr: 0} as const});9await execa('unicorns', {maxBuffer: {all: 0}});10await execa('unicorns', {maxBuffer: {fd1: 0}});11await execa('unicorns', {maxBuffer: {fd2: 0}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 12why, one step back
12await execa('unicorns', {maxBuffer: {fd3: 0}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 13why, one step back
13await execa('unicorns', {maxBuffer: {fd3: 0}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 14why, one step back
14await execa('unicorns', {maxBuffer: {ipc: 0}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 15–24why, one step back
15expectError(await execa('unicorns', {maxBuffer: {stdout: '0'}}));
1617execaSync('unicorns', {maxBuffer: {}});18expectError(execaSync('unicorns', {maxBuffer: []}));19execaSync('unicorns', {maxBuffer: {stdout: 0}});20execaSync('unicorns', {maxBuffer: {stderr: 0}});21execaSync('unicorns', {maxBuffer: {stdout: 0, stderr: 0} as const});22execaSync('unicorns', {maxBuffer: {all: 0}});23execaSync('unicorns', {maxBuffer: {fd1: 0}});24execaSync('unicorns', {maxBuffer: {fd2: 0}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 25why, one step back
25execaSync('unicorns', {maxBuffer: {fd3: 0}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 26why, one step back
26execaSync('unicorns', {maxBuffer: {fd3: 0}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 27why, one step back
27execaSync('unicorns', {maxBuffer: {ipc: 0}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 28–37why, one step back
28expectError(execaSync('unicorns', {maxBuffer: {stdout: '0'}}));
2930await execa('unicorns', {verbose: {}});31expectError(await execa('unicorns', {verbose: []}));32await execa('unicorns', {verbose: {stdout: 'none'}});33await execa('unicorns', {verbose: {stderr: 'none'}});34await execa('unicorns', {verbose: {stdout: 'none', stderr: 'none'} as const});35await execa('unicorns', {verbose: {all: 'none'}});36await execa('unicorns', {verbose: {fd1: 'none'}});37await execa('unicorns', {verbose: {fd2: 'none'}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 38why, one step back
38await execa('unicorns', {verbose: {fd3: 'none'}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 39why, one step back
39await execa('unicorns', {verbose: {fd3: 'none'}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 40why, one step back
40await execa('unicorns', {verbose: {ipc: 'none'}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 41–50why, one step back
41expectError(await execa('unicorns', {verbose: {stdout: 'other'}}));
4243execaSync('unicorns', {verbose: {}});44expectError(execaSync('unicorns', {verbose: []}));45execaSync('unicorns', {verbose: {stdout: 'none'}});46execaSync('unicorns', {verbose: {stderr: 'none'}});47execaSync('unicorns', {verbose: {stdout: 'none', stderr: 'none'} as const});48execaSync('unicorns', {verbose: {all: 'none'}});49execaSync('unicorns', {verbose: {fd1: 'none'}});50execaSync('unicorns', {verbose: {fd2: 'none'}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 51why, one step back
51execaSync('unicorns', {verbose: {fd3: 'none'}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 52why, one step back
52execaSync('unicorns', {verbose: {fd3: 'none'}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 53why, one step back
53execaSync('unicorns', {verbose: {ipc: 'none'}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 54–63why, one step back
54expectError(execaSync('unicorns', {verbose: {stdout: 'other'}}));
5556await execa('unicorns', {stripFinalNewline: {}});57expectError(await execa('unicorns', {stripFinalNewline: []}));58await execa('unicorns', {stripFinalNewline: {stdout: true}});59await execa('unicorns', {stripFinalNewline: {stderr: true}});60await execa('unicorns', {stripFinalNewline: {stdout: true, stderr: true} as const});61await execa('unicorns', {stripFinalNewline: {all: true}});62await execa('unicorns', {stripFinalNewline: {fd1: true}});63await execa('unicorns', {stripFinalNewline: {fd2: true}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 64why, one step back
64await execa('unicorns', {stripFinalNewline: {fd3: true}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 65why, one step back
65await execa('unicorns', {stripFinalNewline: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 66why, one step back
66await execa('unicorns', {stripFinalNewline: {ipc: true}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 67–76why, one step back
67expectError(await execa('unicorns', {stripFinalNewline: {stdout: 'true'}}));
6869execaSync('unicorns', {stripFinalNewline: {}});70expectError(execaSync('unicorns', {stripFinalNewline: []}));71execaSync('unicorns', {stripFinalNewline: {stdout: true}});72execaSync('unicorns', {stripFinalNewline: {stderr: true}});73execaSync('unicorns', {stripFinalNewline: {stdout: true, stderr: true} as const});74execaSync('unicorns', {stripFinalNewline: {all: true}});75execaSync('unicorns', {stripFinalNewline: {fd1: true}});76execaSync('unicorns', {stripFinalNewline: {fd2: true}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 77why, one step back
77execaSync('unicorns', {stripFinalNewline: {fd3: true}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 78why, one step back
78execaSync('unicorns', {stripFinalNewline: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 79why, one step back
79execaSync('unicorns', {stripFinalNewline: {ipc: true}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 80–89why, one step back
80expectError(execaSync('unicorns', {stripFinalNewline: {stdout: 'true'}}));
8182await execa('unicorns', {lines: {}});83expectError(await execa('unicorns', {lines: []}));84await execa('unicorns', {lines: {stdout: true}});85await execa('unicorns', {lines: {stderr: true}});86await execa('unicorns', {lines: {stdout: true, stderr: true} as const});87await execa('unicorns', {lines: {all: true}});88await execa('unicorns', {lines: {fd1: true}});89await execa('unicorns', {lines: {fd2: true}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 90why, one step back
90await execa('unicorns', {lines: {fd3: true}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 91why, one step back
91await execa('unicorns', {lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 92why, one step back
92await execa('unicorns', {lines: {ipc: true}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 93–102why, one step back
93expectError(await execa('unicorns', {lines: {stdout: 'true'}}));
9495execaSync('unicorns', {lines: {}});96expectError(execaSync('unicorns', {lines: []}));97execaSync('unicorns', {lines: {stdout: true}});98execaSync('unicorns', {lines: {stderr: true}});99execaSync('unicorns', {lines: {stdout: true, stderr: true} as const});100execaSync('unicorns', {lines: {all: true}});101execaSync('unicorns', {lines: {fd1: true}});102execaSync('unicorns', {lines: {fd2: true}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 103why, one step back
103execaSync('unicorns', {lines: {fd3: true}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 104why, one step back
104execaSync('unicorns', {lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 105why, one step back
105execaSync('unicorns', {lines: {ipc: true}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 106–115why, one step back
106expectError(execaSync('unicorns', {lines: {stdout: 'true'}}));
107108await execa('unicorns', {buffer: {}});109expectError(await execa('unicorns', {buffer: []}));110await execa('unicorns', {buffer: {stdout: true}});111await execa('unicorns', {buffer: {stderr: true}});112await execa('unicorns', {buffer: {stdout: true, stderr: true} as const});113await execa('unicorns', {buffer: {all: true}});114await execa('unicorns', {buffer: {fd1: true}});115await execa('unicorns', {buffer: {fd2: true}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 116why, one step back
116await execa('unicorns', {buffer: {fd3: true}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 117why, one step back
117await execa('unicorns', {buffer: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 118why, one step back
118await execa('unicorns', {buffer: {ipc: true}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 119–128why, one step back
119expectError(await execa('unicorns', {buffer: {stdout: 'true'}}));
120121execaSync('unicorns', {buffer: {}});122expectError(execaSync('unicorns', {buffer: []}));123execaSync('unicorns', {buffer: {stdout: true}});124execaSync('unicorns', {buffer: {stderr: true}});125execaSync('unicorns', {buffer: {stdout: true, stderr: true} as const});126execaSync('unicorns', {buffer: {all: true}});127execaSync('unicorns', {buffer: {fd1: true}});128execaSync('unicorns', {buffer: {fd2: true}});

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

line 129why, one step back
129execaSync('unicorns', {buffer: {fd3: true}});

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 130why, one step back
130execaSync('unicorns', {buffer: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 131why, one step back
131execaSync('unicorns', {buffer: {ipc: true}});

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 132–142why, one step back
132expectError(execaSync('unicorns', {buffer: {stdout: 'true'}}));
133134expectError(await execa('unicorns', {preferLocal: {}}));135expectError(await execa('unicorns', {preferLocal: []}));136expectError(await execa('unicorns', {preferLocal: {stdout: 0}}));137expectError(await execa('unicorns', {preferLocal: {stderr: 0}}));138expectError(await execa('unicorns', {preferLocal: {stdout: 0, stderr: 0} as const}));139expectError(await execa('unicorns', {preferLocal: {all: 0}}));140expectError(await execa('unicorns', {preferLocal: {fd1: 0}}));141expectError(await execa('unicorns', {preferLocal: {fd2: 0}}));142expectError(await execa('unicorns', {preferLocal: {fd3: 0}}));

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 143why, one step back
143expectError(await execa('unicorns', {preferLocal: {ipc: 0}}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 144–154why, one step back
144expectError(await execa('unicorns', {preferLocal: {stdout: '0'}}));
145146expectError(execaSync('unicorns', {preferLocal: {}}));147expectError(execaSync('unicorns', {preferLocal: []}));148expectError(execaSync('unicorns', {preferLocal: {stdout: 0}}));149expectError(execaSync('unicorns', {preferLocal: {stderr: 0}}));150expectError(execaSync('unicorns', {preferLocal: {stdout: 0, stderr: 0} as const}));151expectError(execaSync('unicorns', {preferLocal: {all: 0}}));152expectError(execaSync('unicorns', {preferLocal: {fd1: 0}}));153expectError(execaSync('unicorns', {preferLocal: {fd2: 0}}));154expectError(execaSync('unicorns', {preferLocal: {fd3: 0}}));

Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe

line 155why, one step back
155expectError(execaSync('unicorns', {preferLocal: {ipc: 0}}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 156–157why, one step back
156expectError(execaSync('unicorns', {preferLocal: {stdout: '0'}}));
157

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

lines 158–169why, one step back
158expectTypeOf(execaSync('unicorns', {lines: {stdout: true, fd1: false}}).stdout).toBe<string[]>();
159expectTypeOf(execaSync('unicorns', {lines: {stdout: true, all: false}}).stdout).toBe<string[]>();160expectTypeOf(execaSync('unicorns', {lines: {fd1: true, all: false}}).stdout).toBe<string[]>();161expectTypeOf(execaSync('unicorns', {lines: {stderr: true, fd2: false}}).stderr).toBe<string[]>();162expectTypeOf(execaSync('unicorns', {lines: {stderr: true, all: false}}).stderr).toBe<string[]>();163expectTypeOf(execaSync('unicorns', {lines: {fd2: true, all: false}}).stderr).toBe<string[]>();164expectTypeOf(execaSync('unicorns', {lines: {fd1: false, stdout: true}}).stdout).toBe<string[]>();165expectTypeOf(execaSync('unicorns', {lines: {all: false, stdout: true}}).stdout).toBe<string[]>();166expectTypeOf(execaSync('unicorns', {lines: {all: false, fd1: true}}).stdout).toBe<string[]>();167expectTypeOf(execaSync('unicorns', {lines: {fd2: false, stderr: true}}).stderr).toBe<string[]>();168expectTypeOf(execaSync('unicorns', {lines: {all: false, stderr: true}}).stderr).toBe<string[]>();169expectTypeOf(execaSync('unicorns', {lines: {all: false, fd2: true}}).stderr).toBe<string[]>();