Skip to content
Myr

pipe.test-d.ts

This file

Path

test-d/stdio/option/pipe.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 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} from 'nz';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 2–33why, one step back
2import {
3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';1011await execa('unicorns', {stdin: 'pipe'});12execaSync('unicorns', {stdin: 'pipe'});13await execa('unicorns', {stdin: ['pipe']});14execaSync('unicorns', {stdin: ['pipe']});1516await execa('unicorns', {stdout: 'pipe'});17execaSync('unicorns', {stdout: 'pipe'});18await execa('unicorns', {stdout: ['pipe']});19execaSync('unicorns', {stdout: ['pipe']});2021await execa('unicorns', {stderr: 'pipe'});22execaSync('unicorns', {stderr: 'pipe'});23await execa('unicorns', {stderr: ['pipe']});24execaSync('unicorns', {stderr: ['pipe']});2526await execa('unicorns', {stdio: 'pipe'});27execaSync('unicorns', {stdio: 'pipe'});2829await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});30execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});31await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe']]});32execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe']]});33

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

lines 34–37why, one step back
34expectTypeOf<'pipe'>().toBeAssignableTo<StdinOption>();
35expectTypeOf<'pipe'>().toBeAssignableTo<StdinSyncOption>();36['pipe'] satisfies StdinOption;37['pipe'] satisfies StdinSyncOption;

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 38why, one step back
38

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

lines 39–42why, one step back
39expectTypeOf<'pipe'>().toBeAssignableTo<StdoutStderrOption>();
40expectTypeOf<'pipe'>().toBeAssignableTo<StdoutStderrSyncOption>();41['pipe'] satisfies StdoutStderrOption;42['pipe'] satisfies StdoutStderrSyncOption;