Skip to content
Myr

no-buffer-specific.test-d.ts

This file

Path

test-d/return/no-buffer-specific.test-d.ts

97 lines · 5.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–4why, one step back
2import {execa, execaSync} from '../../index.js';
34const noBufferStdoutResult = await execa('unicorns', {all: true, buffer: {stdout: false}});

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

lines 5–9why, one step back
5expectTypeOf(noBufferStdoutResult.stdout).toBe<undefined>();
6expectTypeOf(noBufferStdoutResult.stdio[1]).toBe<undefined>();7expectTypeOf(noBufferStdoutResult.stderr).toBe<string>();8expectTypeOf(noBufferStdoutResult.stdio[2]).toBe<string>();9expectTypeOf(noBufferStdoutResult.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 10–11why, one step back
10
11const noBufferStderrResult = await execa('unicorns', {all: true, buffer: {stderr: false}});

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

lines 12–16why, one step back
12expectTypeOf(noBufferStderrResult.stdout).toBe<string>();
13expectTypeOf(noBufferStderrResult.stdio[1]).toBe<string>();14expectTypeOf(noBufferStderrResult.stderr).toBe<undefined>();15expectTypeOf(noBufferStderrResult.stdio[2]).toBe<undefined>();16expectTypeOf(noBufferStderrResult.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 17–18why, one step back
17
18const noBufferFd1Result = await execa('unicorns', {all: true, buffer: {fd1: false}});

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

lines 19–23why, one step back
19expectTypeOf(noBufferFd1Result.stdout).toBe<undefined>();
20expectTypeOf(noBufferFd1Result.stdio[1]).toBe<undefined>();21expectTypeOf(noBufferFd1Result.stderr).toBe<string>();22expectTypeOf(noBufferFd1Result.stdio[2]).toBe<string>();23expectTypeOf(noBufferFd1Result.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 24–25why, one step back
24
25const noBufferFd2Result = await execa('unicorns', {all: true, buffer: {fd2: false}});

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

lines 26–30why, one step back
26expectTypeOf(noBufferFd2Result.stdout).toBe<string>();
27expectTypeOf(noBufferFd2Result.stdio[1]).toBe<string>();28expectTypeOf(noBufferFd2Result.stderr).toBe<undefined>();29expectTypeOf(noBufferFd2Result.stdio[2]).toBe<undefined>();30expectTypeOf(noBufferFd2Result.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 31–32why, one step back
31
32const noBufferAllResult = await execa('unicorns', {all: true, buffer: {all: false}});

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

lines 33–37why, one step back
33expectTypeOf(noBufferAllResult.stdout).toBe<undefined>();
34expectTypeOf(noBufferAllResult.stdio[1]).toBe<undefined>();35expectTypeOf(noBufferAllResult.stderr).toBe<undefined>();36expectTypeOf(noBufferAllResult.stdio[2]).toBe<undefined>();37expectTypeOf(noBufferAllResult.all).toBe<undefined>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 38–39why, one step back
38
39const noBufferFd3Result = await execa('unicorns', {all: true, buffer: {fd3: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});

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

lines 40–46why, one step back
40expectTypeOf(noBufferFd3Result.stdout).toBe<string>();
41expectTypeOf(noBufferFd3Result.stdio[1]).toBe<string>();42expectTypeOf(noBufferFd3Result.stderr).toBe<string>();43expectTypeOf(noBufferFd3Result.stdio[2]).toBe<string>();44expectTypeOf(noBufferFd3Result.all).toBe<string>();45expectTypeOf(noBufferFd3Result.stdio[3]).toBe<undefined>();46expectTypeOf(noBufferFd3Result.stdio[4]).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 47why, one step back
47

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 48why, one step back
48const noBufferIpcResult = await execa('unicorns', {buffer: {ipc: false}, ipc: true, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

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

lines 49–50why, one step back
49expectTypeOf(noBufferIpcResult.stdio[3]).toBe<string>();
50expectTypeOf(noBufferIpcResult.ipcOutput).toBe<[]>();

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

line 51why, one step back
51

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 52why, one step back
52const noBufferStdoutResultSync = execaSync('unicorns', {all: true, buffer: {stdout: false}});

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

lines 53–57why, one step back
53expectTypeOf(noBufferStdoutResultSync.stdout).toBe<undefined>();
54expectTypeOf(noBufferStdoutResultSync.stdio[1]).toBe<undefined>();55expectTypeOf(noBufferStdoutResultSync.stderr).toBe<string>();56expectTypeOf(noBufferStdoutResultSync.stdio[2]).toBe<string>();57expectTypeOf(noBufferStdoutResultSync.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 58–59why, one step back
58
59const noBufferStderrResultSync = execaSync('unicorns', {all: true, buffer: {stderr: false}});

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

lines 60–64why, one step back
60expectTypeOf(noBufferStderrResultSync.stdout).toBe<string>();
61expectTypeOf(noBufferStderrResultSync.stdio[1]).toBe<string>();62expectTypeOf(noBufferStderrResultSync.stderr).toBe<undefined>();63expectTypeOf(noBufferStderrResultSync.stdio[2]).toBe<undefined>();64expectTypeOf(noBufferStderrResultSync.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 65–66why, one step back
65
66const noBufferFd1ResultSync = execaSync('unicorns', {all: true, buffer: {fd1: false}});

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

lines 67–71why, one step back
67expectTypeOf(noBufferFd1ResultSync.stdout).toBe<undefined>();
68expectTypeOf(noBufferFd1ResultSync.stdio[1]).toBe<undefined>();69expectTypeOf(noBufferFd1ResultSync.stderr).toBe<string>();70expectTypeOf(noBufferFd1ResultSync.stdio[2]).toBe<string>();71expectTypeOf(noBufferFd1ResultSync.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 72–73why, one step back
72
73const noBufferFd2ResultSync = execaSync('unicorns', {all: true, buffer: {fd2: false}});

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

lines 74–78why, one step back
74expectTypeOf(noBufferFd2ResultSync.stdout).toBe<string>();
75expectTypeOf(noBufferFd2ResultSync.stdio[1]).toBe<string>();76expectTypeOf(noBufferFd2ResultSync.stderr).toBe<undefined>();77expectTypeOf(noBufferFd2ResultSync.stdio[2]).toBe<undefined>();78expectTypeOf(noBufferFd2ResultSync.all).toBe<string>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 79–80why, one step back
79
80const noBufferAllResultSync = execaSync('unicorns', {all: true, buffer: {all: false}});

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

lines 81–85why, one step back
81expectTypeOf(noBufferAllResultSync.stdout).toBe<undefined>();
82expectTypeOf(noBufferAllResultSync.stdio[1]).toBe<undefined>();83expectTypeOf(noBufferAllResultSync.stderr).toBe<undefined>();84expectTypeOf(noBufferAllResultSync.stdio[2]).toBe<undefined>();85expectTypeOf(noBufferAllResultSync.all).toBe<undefined>();

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 86–87why, one step back
86
87const noBufferFd3ResultSync = execaSync('unicorns', {all: true, buffer: {fd3: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});

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

lines 88–94why, one step back
88expectTypeOf(noBufferFd3ResultSync.stdout).toBe<string>();
89expectTypeOf(noBufferFd3ResultSync.stdio[1]).toBe<string>();90expectTypeOf(noBufferFd3ResultSync.stderr).toBe<string>();91expectTypeOf(noBufferFd3ResultSync.stdio[2]).toBe<string>();92expectTypeOf(noBufferFd3ResultSync.all).toBe<string>();93expectTypeOf(noBufferFd3ResultSync.stdio[3]).toBe<undefined>();94expectTypeOf(noBufferFd3ResultSync.stdio[4]).toBe<string>();

Fix fd-specific options to account for `ipc` (#1241)Sindre Sorhusbefore adoptionb886883

lines 95–96why, one step back
95
96const noBufferIpcStdioResultSync = execaSync('unicorns', {buffer: {ipc: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe']});

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

line 97why, one step back
97expectTypeOf(noBufferIpcStdioResultSync.stdio[3]).toBe<string>();