Skip to content
Myr

undefined.test-d.ts

This file

Path

test-d/stdio/option/undefined.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 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: undefined});12execaSync('unicorns', {stdin: undefined});13await execa('unicorns', {stdin: [undefined]});14execaSync('unicorns', {stdin: [undefined]});1516await execa('unicorns', {stdout: undefined});17execaSync('unicorns', {stdout: undefined});18await execa('unicorns', {stdout: [undefined]});19execaSync('unicorns', {stdout: [undefined]});2021await execa('unicorns', {stderr: undefined});22execaSync('unicorns', {stderr: undefined});23await execa('unicorns', {stderr: [undefined]});24execaSync('unicorns', {stderr: [undefined]});2526await execa('unicorns', {stdio: undefined});27execaSync('unicorns', {stdio: undefined});2829await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});30execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});31await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined]]});32execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined]]});33

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

lines 34–37why, one step back
34expectTypeOf<undefined>().toBeAssignableTo<StdinOption>();
35expectTypeOf<undefined>().toBeAssignableTo<StdinSyncOption>();36[undefined] satisfies StdinOption;37[undefined] 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<undefined>().toBeAssignableTo<StdoutStderrOption>();
40expectTypeOf<undefined>().toBeAssignableTo<StdoutStderrSyncOption>();41[undefined] satisfies StdoutStderrOption;42[undefined] satisfies StdoutStderrSyncOption;