array-binary.test-d.ts
This file
Path
test-d/stdio/option/array-binary.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 binaryArray = [new Uint8Array(), new Uint8Array()] as const;1213await execa('unicorns', {stdin: [binaryArray]});14execaSync('unicorns', {stdin: [binaryArray]});1516expectError(await execa('unicorns', {stdout: [binaryArray]}));17expectError(execaSync('unicorns', {stdout: [binaryArray]}));1819expectError(await execa('unicorns', {stderr: [binaryArray]}));20expectError(execaSync('unicorns', {stderr: [binaryArray]}));2122await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]});23expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]}));24await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]});25expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]}));26Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 27–28why, one step back27[binaryArray] satisfies StdinOption;28[binaryArray] 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([binaryArray]).not.toBeAssignableTo<StdoutStderrOption>();31expectTypeOf([binaryArray]).not.toBeAssignableTo<StdoutStderrSyncOption>();