fd-integer-2.test-d.ts
This file
Path
test-d/stdio/option/fd-integer-2.test-d.ts
42 lines · 1.5 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';1011expectError(await execa('unicorns', {stdin: 2}));12expectError(execaSync('unicorns', {stdin: 2}));13expectError(await execa('unicorns', {stdin: [2]}));14expectError(execaSync('unicorns', {stdin: [2]}));1516await execa('unicorns', {stdout: 2});17execaSync('unicorns', {stdout: 2});18await execa('unicorns', {stdout: [2]});19execaSync('unicorns', {stdout: [2]});2021await execa('unicorns', {stderr: 2});22execaSync('unicorns', {stderr: 2});23await execa('unicorns', {stderr: [2]});24execaSync('unicorns', {stderr: [2]});2526expectError(await execa('unicorns', {stdio: 2}));27expectError(execaSync('unicorns', {stdio: 2}));2829await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 2]});30execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 2]});31await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [2]]});32execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [2]]});33Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 34–37why, one step back34expectTypeOf<2>().not.toBeAssignableTo<StdinOption>();35expectTypeOf<2>().not.toBeAssignableTo<StdinSyncOption>();36expectTypeOf<[2]>().not.toBeAssignableTo<StdinOption>();37expectTypeOf<[2]>().not.toBeAssignableTo<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<2>().toBeAssignableTo<StdoutStderrOption>();40expectTypeOf<2>().toBeAssignableTo<StdoutStderrSyncOption>();41[2] satisfies StdoutStderrOption;42[2] satisfies StdoutStderrSyncOption;