Skip to content
Myr

ipc.test-d.ts

This file

Path

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

43 lines · 1.9 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–10why, one step back
2import {
3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';10

Remove the old `stdio: [..., 'ipc']` syntax (#1245)Sindre Sorhusbefore adoptiondcf611c

lines 11–12why, one step back
11// The `stdio: 'ipc'` value (raw `child_process` syntax) was replaced by the `ipc: true` option
12expectError(await execa('unicorns', {stdin: 'ipc'}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 13–16why, one step back
13expectError(execaSync('unicorns', {stdin: 'ipc'}));
14expectError(await execa('unicorns', {stdin: ['ipc']}));15expectError(execaSync('unicorns', {stdin: ['ipc']}));16

Remove the old `stdio: [..., 'ipc']` syntax (#1245)Sindre Sorhusbefore adoptiondcf611c

line 17why, one step back
17expectError(await execa('unicorns', {stdout: 'ipc'}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 18–21why, one step back
18expectError(execaSync('unicorns', {stdout: 'ipc'}));
19expectError(await execa('unicorns', {stdout: ['ipc']}));20expectError(execaSync('unicorns', {stdout: ['ipc']}));21

Remove the old `stdio: [..., 'ipc']` syntax (#1245)Sindre Sorhusbefore adoptiondcf611c

line 22why, one step back
22expectError(await execa('unicorns', {stderr: 'ipc'}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 23–29why, one step back
23expectError(execaSync('unicorns', {stderr: 'ipc'}));
24expectError(await execa('unicorns', {stderr: ['ipc']}));25expectError(execaSync('unicorns', {stderr: ['ipc']}));2627expectError(await execa('unicorns', {stdio: 'ipc'}));28expectError(execaSync('unicorns', {stdio: 'ipc'}));29

Remove the old `stdio: [..., 'ipc']` syntax (#1245)Sindre Sorhusbefore adoptiondcf611c

line 30why, one step back
30expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}));

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 31–34why, one step back
31expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}));
32expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ipc']]}));33expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ipc']]}));34

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

lines 35–38why, one step back
35expectTypeOf<'ipc'>().not.toBeAssignableTo<StdinOption>();
36expectTypeOf<'ipc'>().not.toBeAssignableTo<StdinSyncOption>();37expectTypeOf<['ipc']>().not.toBeAssignableTo<StdinOption>();38expectTypeOf<['ipc']>().not.toBeAssignableTo<StdinSyncOption>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 39why, one step back
39

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

lines 40–43why, one step back
40expectTypeOf<'ipc'>().not.toBeAssignableTo<StdoutStderrOption>();
41expectTypeOf<'ipc'>().not.toBeAssignableTo<StdoutStderrSyncOption>();42expectTypeOf<['ipc']>().not.toBeAssignableTo<StdoutStderrOption>();43expectTypeOf<['ipc']>().not.toBeAssignableTo<StdoutStderrSyncOption>();