command.test-d.ts
This file
Path
test-d/methods/command.test-d.ts
27 lines · 1.1 KiB · TypeScript
Last changed by
Fix `execaNode()` and the `node` option missing IPC in their typesSindre Sorhusbefore adoption2633abb
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
line 2why, one step back2import {Add `parseCommandString()` (#1054)ehmickybefore adoptionb9474c3
lines 3–7why, one step back3 execa,4 execaSync,5 $,6 execaNode,7 parseCommandString,100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 8–11why, one step back8 type Result,9 type SyncResult,10} from '../../index.js';11Add `parseCommandString()` (#1054)ehmickybefore adoptionb9474c3
lines 12–15why, one step back12expectError(parseCommandString());13expectError(parseCommandString(true));14expectError(parseCommandString(['unicorns', 'arg']));15Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 16–17why, one step back16expectTypeOf(parseCommandString('')).toBe<string[]>();17expectTypeOf(parseCommandString('unicorns foo bar')).toBe<string[]>();Add `parseCommandString()` (#1054)ehmickybefore adoptionb9474c3
line 18why, one step back18Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 19–22why, one step back19expectTypeOf(await execa`${parseCommandString('unicorns foo bar')}`).toBe<Result<{}>>();20expectTypeOf(execaSync`${parseCommandString('unicorns foo bar')}`).toBe<SyncResult<{}>>();21expectTypeOf(await $`${parseCommandString('unicorns foo bar')}`).toBe<Result<{}>>();22expectTypeOf($.sync`${parseCommandString('unicorns foo bar')}`).toBe<SyncResult<{}>>();Fix `execaNode()` and the `node` option missing IPC in their typesSindre Sorhusbefore adoption2633abb
line 23why, one step back23expectTypeOf(await execaNode`${parseCommandString('foo bar')}`).toBe<Result<{readonly node: true}>>();Add `parseCommandString()` (#1054)ehmickybefore adoptionb9474c3
line 24why, one step back24Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 25–27why, one step back25expectTypeOf(await execa`unicorns ${parseCommandString('foo bar')}`).toBe<Result<{}>>();26expectTypeOf(await execa('unicorns', parseCommandString('foo bar'))).toBe<Result<{}>>();27expectTypeOf(await execa('unicorns', ['foo', ...parseCommandString('bar')])).toBe<Result<{}>>();