fd-integer-3.test-d.ts
This file
Path
test-d/stdio/option/fd-integer-3.test-d.ts
42 lines · 1.4 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–33why, one step back2import {3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';1011await execa('unicorns', {stdin: 3});12execaSync('unicorns', {stdin: 3});13expectError(await execa('unicorns', {stdin: [3]}));14execaSync('unicorns', {stdin: [3]});1516await execa('unicorns', {stdout: 3});17execaSync('unicorns', {stdout: 3});18expectError(await execa('unicorns', {stdout: [3]}));19execaSync('unicorns', {stdout: [3]});2021await execa('unicorns', {stderr: 3});22execaSync('unicorns', {stderr: 3});23expectError(await execa('unicorns', {stderr: [3]}));24execaSync('unicorns', {stderr: [3]});2526expectError(await execa('unicorns', {stdio: 3}));27expectError(execaSync('unicorns', {stdio: 3}));2829await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 3]});30execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 3]});31expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [3]]}));32execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [3]]});33Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 34–37why, one step back34expectTypeOf<3>().toBeAssignableTo<StdinOption>();35expectTypeOf<3>().toBeAssignableTo<StdinSyncOption>();36expectTypeOf<[3]>().not.toBeAssignableTo<StdinOption>();37[3] satisfies StdinSyncOption;100% test coverage (#1018)ehmickybefore adoption9f65b86
line 38why, one step back38Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 39–42why, one step back39expectTypeOf<3>().toBeAssignableTo<StdoutStderrOption>();40expectTypeOf<3>().toBeAssignableTo<StdoutStderrSyncOption>();41expectTypeOf<[3]>().not.toBeAssignableTo<StdoutStderrOption>();42[3] satisfies StdoutStderrSyncOption;