Skip to content
Myr

ignore.test-d.ts

This file

Path

test-d/stdio/option/ignore.test-d.ts

42 lines · 1.7 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, expectError} 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: 'ignore'});12execaSync('unicorns', {stdin: 'ignore'});13expectError(await execa('unicorns', {stdin: ['ignore']}));14expectError(execaSync('unicorns', {stdin: ['ignore']}));1516await execa('unicorns', {stdout: 'ignore'});17execaSync('unicorns', {stdout: 'ignore'});18expectError(await execa('unicorns', {stdout: ['ignore']}));19expectError(execaSync('unicorns', {stdout: ['ignore']}));2021await execa('unicorns', {stderr: 'ignore'});22execaSync('unicorns', {stderr: 'ignore'});23expectError(await execa('unicorns', {stderr: ['ignore']}));24expectError(execaSync('unicorns', {stderr: ['ignore']}));2526await execa('unicorns', {stdio: 'ignore'});27execaSync('unicorns', {stdio: 'ignore'});2829await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});30execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});31expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ignore']]}));32expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ignore']]}));33

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

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