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 fileTake 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 back1import {expectTypeOf, expectError} from 'nz';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 2–11why, one step back2import {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 back12await execa('unicorns', {maxBuffer: {fd3: 0}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 13why, one step back13await execa('unicorns', {maxBuffer: {fd3: 0}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 14why, one step back14await execa('unicorns', {maxBuffer: {ipc: 0}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 15–24why, one step back15expectError(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 back25execaSync('unicorns', {maxBuffer: {fd3: 0}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 26why, one step back26execaSync('unicorns', {maxBuffer: {fd3: 0}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 27why, one step back27execaSync('unicorns', {maxBuffer: {ipc: 0}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 28–37why, one step back28expectError(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 back38await execa('unicorns', {verbose: {fd3: 'none'}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 39why, one step back39await execa('unicorns', {verbose: {fd3: 'none'}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 40why, one step back40await execa('unicorns', {verbose: {ipc: 'none'}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 41–50why, one step back41expectError(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 back51execaSync('unicorns', {verbose: {fd3: 'none'}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 52why, one step back52execaSync('unicorns', {verbose: {fd3: 'none'}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 53why, one step back53execaSync('unicorns', {verbose: {ipc: 'none'}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 54–63why, one step back54expectError(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 back64await execa('unicorns', {stripFinalNewline: {fd3: true}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 65why, one step back65await execa('unicorns', {stripFinalNewline: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 66why, one step back66await execa('unicorns', {stripFinalNewline: {ipc: true}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 67–76why, one step back67expectError(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 back77execaSync('unicorns', {stripFinalNewline: {fd3: true}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 78why, one step back78execaSync('unicorns', {stripFinalNewline: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 79why, one step back79execaSync('unicorns', {stripFinalNewline: {ipc: true}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 80–89why, one step back80expectError(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 back90await execa('unicorns', {lines: {fd3: true}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 91why, one step back91await execa('unicorns', {lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 92why, one step back92await execa('unicorns', {lines: {ipc: true}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 93–102why, one step back93expectError(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 back103execaSync('unicorns', {lines: {fd3: true}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 104why, one step back104execaSync('unicorns', {lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 105why, one step back105execaSync('unicorns', {lines: {ipc: true}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 106–115why, one step back106expectError(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 back116await execa('unicorns', {buffer: {fd3: true}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 117why, one step back117await execa('unicorns', {buffer: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 118why, one step back118await execa('unicorns', {buffer: {ipc: true}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 119–128why, one step back119expectError(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 back129execaSync('unicorns', {buffer: {fd3: true}});Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883
line 130why, one step back130execaSync('unicorns', {buffer: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});Log IPC messages with `verbose: 'full'` (#1063)ehmickybefore adoption839c2fe
line 131why, one step back131execaSync('unicorns', {buffer: {ipc: true}});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 132–142why, one step back132expectError(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 back143expectError(await execa('unicorns', {preferLocal: {ipc: 0}}));100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 144–154why, one step back144expectError(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 back155expectError(execaSync('unicorns', {preferLocal: {ipc: 0}}));100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 156–157why, one step back156expectError(execaSync('unicorns', {preferLocal: {stdout: '0'}}));157Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 158–169why, one step back158expectTypeOf(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[]>();