array-object.test-d.ts
This file
Path
test-d/stdio/option/array-object.test-d.ts
31 lines · 1.1 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–26why, one step back2import {3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';1011const objectArray = [{}, {}] as const;1213await execa('unicorns', {stdin: [objectArray]});14execaSync('unicorns', {stdin: [objectArray]});1516expectError(await execa('unicorns', {stdout: [objectArray]}));17expectError(execaSync('unicorns', {stdout: [objectArray]}));1819expectError(await execa('unicorns', {stderr: [objectArray]}));20expectError(execaSync('unicorns', {stderr: [objectArray]}));2122await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]});23expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]}));24await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]});25expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]}));26Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 27–28why, one step back27[objectArray] satisfies StdinOption;28[objectArray] satisfies StdinSyncOption;100% test coverage (#1018)ehmickybefore adoption9f65b86
line 29why, one step back29Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 30–31why, one step back30expectTypeOf([objectArray]).not.toBeAssignableTo<StdoutStderrOption>();31expectTypeOf([objectArray]).not.toBeAssignableTo<StdoutStderrSyncOption>();