Skip to content
Myr

pipe-inherit.test-d.ts

This file

Path

test-d/stdio/option/pipe-inherit.test-d.ts

29 lines · 953 bytes · TypeScript

Last changed by

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

History of this file

Take 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 back
1import {expectTypeOf, expectError} from 'nz';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 2–24why, one step back
2import {
3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';1011const pipeInherit = ['pipe', 'inherit'] as const;1213await execa('unicorns', {stdin: pipeInherit});14execaSync('unicorns', {stdin: pipeInherit});1516await execa('unicorns', {stdout: pipeInherit});17execaSync('unicorns', {stdout: pipeInherit});1819await execa('unicorns', {stderr: pipeInherit});20execaSync('unicorns', {stderr: pipeInherit});2122expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeInherit]}));23execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeInherit]});24

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

lines 25–26why, one step back
25expectTypeOf(pipeInherit).toBeAssignableTo<StdinOption>();
26expectTypeOf(pipeInherit).toBeAssignableTo<StdinSyncOption>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 27why, one step back
27

Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147

lines 28–29why, one step back
28expectTypeOf(pipeInherit).toBeAssignableTo<StdoutStderrOption>();
29expectTypeOf(pipeInherit).toBeAssignableTo<StdoutStderrSyncOption>();