Skip to content
Myr

overlapped.test-d.ts

This file

Path

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

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

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

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