result-ipc.ts
This file
Path
test-d/return/result-ipc.ts
110 lines · 4.6 KiB · TypeScript
Last changed by
Fix `execaNode()` and the `node` option missing IPC in their typesSindre Sorhusbefore adoption2633abb
History of this fileTake it
Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 1why, one step back1import {expectTypeOf} from 'nz';Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 2–4why, one step back2import {3 execa,4 execaSync,Fix `execaNode()` and the `node` option missing IPC in their typesSindre Sorhusbefore adoption2633abb
line 5why, one step back5 execaNode,Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 6–9why, one step back6 type Result,7 type SyncResult,8 type ExecaError,9 type ExecaSyncError,Fix type of `result.ipc` (#1071)ehmickybefore adoption69152ec
line 10why, one step back10 type Message,Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
line 11why, one step back11 type Options,Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 12–14why, one step back12} from '../../index.js';1314const ipcResult = await execa('unicorns', {ipc: true});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 15why, one step back15expectTypeOf(ipcResult.ipcOutput).toBe<Array<Message<'advanced'>>>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 16–17why, one step back1617const ipcFdResult = await execa('unicorns', {ipc: true, buffer: {stdout: false}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 18why, one step back18expectTypeOf(ipcFdResult.ipcOutput).toBe<Array<Message<'advanced'>>>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
line 19why, one step back19Fix type of `result.ipc` (#1071)ehmickybefore adoption69152ec
line 20why, one step back20const advancedResult = await execa('unicorns', {ipc: true, serialization: 'advanced'});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 21why, one step back21expectTypeOf(advancedResult.ipcOutput).toBe<Array<Message<'advanced'>>>();Fix type of `result.ipc` (#1071)ehmickybefore adoption69152ec
lines 22–23why, one step back2223const jsonResult = await execa('unicorns', {ipc: true, serialization: 'json'});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 24why, one step back24expectTypeOf(jsonResult.ipcOutput).toBe<Array<Message<'json'>>>();Fix type of `result.ipc` (#1071)ehmickybefore adoption69152ec
line 25why, one step back25Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
line 26why, one step back26const inputResult = await execa('unicorns', {ipcInput: ''});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 27why, one step back27expectTypeOf(inputResult.ipcOutput).toBe<Array<Message<'advanced'>>>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 28–29why, one step back2829const genericInputResult = await execa('unicorns', {ipcInput: '' as Message});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 30why, one step back30expectTypeOf(genericInputResult.ipcOutput).toBe<Array<Message<'advanced'>>>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
line 31why, one step back31Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
line 32why, one step back32const gracefulResult = await execa('unicorns', {gracefulCancel: true, cancelSignal: AbortSignal.abort()});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 33why, one step back33expectTypeOf(gracefulResult.ipcOutput).toBe<Array<Message<'advanced'>>>();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
line 34why, one step back34Fix `execaNode()` and the `node` option missing IPC in their typesSindre Sorhusbefore adoption2633abb
lines 35–43why, one step back35const nodeResult = await execa('unicorns', {node: true});36expectTypeOf(nodeResult.ipcOutput).toBe<Array<Message<'advanced'>>>();3738const execaNodeResult = await execaNode('unicorns');39expectTypeOf(execaNodeResult.ipcOutput).toBe<Array<Message<'advanced'>>>();4041const execaNodeJsonResult = await execaNode({serialization: 'json'})`unicorns`;42expectTypeOf(execaNodeJsonResult.ipcOutput).toBe<Array<Message<'json'>>>();43Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
line 44why, one step back44const genericResult = await execa('unicorns', {} as Options);Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 45why, one step back45expectTypeOf(genericResult.ipcOutput).toBe<Message[] | []>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 46–47why, one step back4647const genericIpc = await execa('unicorns', {ipc: true as boolean});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 48why, one step back48expectTypeOf(genericIpc.ipcOutput).toBe<Array<Message<'advanced'>> | []>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 49–50why, one step back4950const maybeInputResult = await execa('unicorns', {ipcInput: '' as '' | undefined});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 51why, one step back51expectTypeOf(maybeInputResult.ipcOutput).toBe<Array<Message<'advanced'>> | []>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
line 52why, one step back52Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
line 53why, one step back53const maybeGracefulResult = await execa('unicorns', {gracefulCancel: true as boolean | undefined, cancelSignal: AbortSignal.abort()});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 54why, one step back54expectTypeOf(maybeGracefulResult.ipcOutput).toBe<Array<Message<'advanced'>> | []>();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
line 55why, one step back55Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
line 56why, one step back56const falseIpcResult = await execa('unicorns', {ipc: false});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 57why, one step back57expectTypeOf(falseIpcResult.ipcOutput).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 58–59why, one step back5859const noIpcResult = await execa('unicorns');Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 60why, one step back60expectTypeOf(noIpcResult.ipcOutput).toBe<[]>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 61–62why, one step back6162const emptyIpcResult = await execa('unicorns', {});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 63why, one step back63expectTypeOf(emptyIpcResult.ipcOutput).toBe<[]>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 64–65why, one step back6465const undefinedInputResult = await execa('unicorns', {ipcInput: undefined});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 66why, one step back66expectTypeOf(undefinedInputResult.ipcOutput).toBe<[]>();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 67–68why, one step back6768const inputNoIpcResult = await execa('unicorns', {ipc: false, ipcInput: ''});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 69why, one step back69expectTypeOf(inputNoIpcResult.ipcOutput).toBe<[]>();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
lines 70–71why, one step back7071const undefinedGracefulResult = await execa('unicorns', {gracefulCancel: undefined});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 72why, one step back72expectTypeOf(undefinedGracefulResult.ipcOutput).toBe<[]>();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
lines 73–74why, one step back7374const falseGracefulResult = await execa('unicorns', {gracefulCancel: false});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 75why, one step back75expectTypeOf(falseGracefulResult.ipcOutput).toBe<[]>();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
lines 76–77why, one step back7677const gracefulNoIpcResult = await execa('unicorns', {ipc: false, gracefulCancel: true, cancelSignal: AbortSignal.abort()});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 78why, one step back78expectTypeOf(gracefulNoIpcResult.ipcOutput).toBe<[]>();Fix `execaNode()` and the `node` option missing IPC in their typesSindre Sorhusbefore adoption2633abb
lines 79–84why, one step back7980const falseNodeResult = await execa('unicorns', {node: false});81expectTypeOf(falseNodeResult.ipcOutput).toBe<[]>();8283const execaNodeNoIpcResult = await execaNode('unicorns', {ipc: false});84expectTypeOf(execaNodeNoIpcResult.ipcOutput).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 85–86why, one step back8586const noBufferResult = await execa('unicorns', {ipc: true, buffer: false});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 87why, one step back87expectTypeOf(noBufferResult.ipcOutput).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 88–89why, one step back8889const noBufferFdResult = await execa('unicorns', {ipc: true, buffer: {ipc: false}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 90why, one step back90expectTypeOf(noBufferFdResult.ipcOutput).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 91–92why, one step back9192const syncResult = execaSync('unicorns');Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 93why, one step back93expectTypeOf(syncResult.ipcOutput).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
line 94why, one step back94Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 95–97why, one step back95expectTypeOf<Result['ipcOutput']>().toBe<Message[] | []>();96expectTypeOf<Result['ipcOutput']>().toBeAssignableTo<Message[]>();97expectTypeOf({} as unknown as SyncResult['ipcOutput']).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 98–99why, one step back9899const ipcError = new Error('.') as ExecaError<{ipc: true}>;Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 100why, one step back100expectTypeOf(ipcError.ipcOutput).toBe<Array<Message<'advanced'>>>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 101–102why, one step back101102const ipcFalseError = new Error('.') as ExecaError<{ipc: false}>;Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 103why, one step back103expectTypeOf(ipcFalseError.ipcOutput).toBe<[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 104–105why, one step back104105const asyncError = new Error('.') as ExecaError;Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 106–107why, one step back106expectTypeOf(asyncError.ipcOutput).toBe<Message[] | []>();107expectTypeOf(asyncError.ipcOutput).toBeAssignableTo<Message[]>();Add `result.ipc`/`error.ipc` (#1067)ehmickybefore adoption3ab34de
lines 108–109why, one step back108109const syncError = new Error('.') as ExecaSyncError;Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 110why, one step back110expectTypeOf(syncError.ipcOutput).toBe<[]>();