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