get-each.test-d.ts
This file
Path
test-d/ipc/get-each.test-d.ts
48 lines · 2.1 KiB · TypeScript
Last changed by
Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
History of this fileTake it
Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 1why, one step back1import {expectTypeOf, expectError} from 'nz';Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 2–7why, one step back2import {3 getEachMessage,4 execa,5 type Message,6 type Options,7} from '../../index.js';Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
lines 8–11why, one step back89const subprocess = execa('test', {ipc: true});1011for await (const message of subprocess.getEachMessage()) {Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 12why, one step back12 expectTypeOf(message).toBe<Message<'advanced'>>();Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
lines 13–15why, one step back13}1415for await (const message of execa('test', {ipc: true, serialization: 'json'}).getEachMessage()) {Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 16why, one step back16 expectTypeOf(message).toBe<Message<'json'>>();Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
lines 17–18why, one step back17}18Add `filter` option to `getOneMessage()` (#1076)ehmickybefore adoption571e052
line 19why, one step back19for await (const message of getEachMessage()) {Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 20why, one step back20 expectTypeOf(message).toBe<Message>();Add `filter` option to `getOneMessage()` (#1076)ehmickybefore adoption571e052
lines 21–22why, one step back21}22Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
line 23why, one step back23expectError(subprocess.getEachMessage(''));Add `filter` option to `getOneMessage()` (#1076)ehmickybefore adoption571e052
line 24why, one step back24expectError(getEachMessage(''));Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 25–27why, one step back2526execa('test', {ipcInput: ''}).getEachMessage();27execa('test', {ipcInput: '' as Message}).getEachMessage();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
line 28why, one step back28execa('test', {gracefulCancel: true, cancelSignal: AbortSignal.abort()}).getEachMessage();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
lines 29–31why, one step back29execa('test', {} as Options).getEachMessage?.();30execa('test', {ipc: true as boolean}).getEachMessage?.();31execa('test', {ipcInput: '' as '' | undefined}).getEachMessage?.();Add `gracefulCancel` option (#1109)ehmickybefore adoptiond8190e5
line 32why, one step back32execa('test', {gracefulCancel: true as boolean | undefined, cancelSignal: AbortSignal.abort()}).getEachMessage?.();Add `ipcInput` option (#1068)ehmickybefore adoption46cae30
line 33why, one step back33Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 34–41why, one step back34expectTypeOf(execa('test').getEachMessage).toBe<undefined>();35expectTypeOf(execa('test', {}).getEachMessage).toBe<undefined>();36expectTypeOf(execa('test', {ipc: false}).getEachMessage).toBe<undefined>();37expectTypeOf(execa('test', {ipcInput: undefined}).getEachMessage).toBe<undefined>();38expectTypeOf(execa('test', {gracefulCancel: undefined}).getEachMessage).toBe<undefined>();39expectTypeOf(execa('test', {gracefulCancel: false}).getEachMessage).toBe<undefined>();40expectTypeOf(execa('test', {ipc: false, ipcInput: ''}).getEachMessage).toBe<undefined>();41expectTypeOf(execa('test', {ipc: false, gracefulCancel: true, cancelSignal: AbortSignal.abort()}).getEachMessage).toBe<undefined>();Add promise-based IPC (#1059)ehmickybefore adoptionacc2b68
line 42why, one step back42Add `reference` option to `getOneMessage()` and `getEachMessage()` (#1107)ehmickybefore adoptionff02af6
lines 43–44why, one step back43subprocess.getEachMessage({reference: true} as const);44getEachMessage({reference: true} as const);Add more type tests (#1117)ehmickybefore adoption077749d
lines 45–46why, one step back45subprocess.getEachMessage({reference: true as boolean});46getEachMessage({reference: true as boolean});Add `reference` option to `getOneMessage()` and `getEachMessage()` (#1107)ehmickybefore adoptionff02af6
lines 47–48why, one step back47expectError(subprocess.getEachMessage({reference: 'true'} as const));48expectError(getEachMessage({reference: 'true'} as const));