lines-specific.test-d.ts
This file
Path
test-d/return/lines-specific.test-d.ts
90 lines · 4.7 KiB · TypeScript
Last changed by
Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
History of this fileTake 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 back1import {expectTypeOf} from 'nz';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 2–4why, one step back2import {execa, execaSync} from '../../index.js';34const linesStdoutResult = await execa('unicorns', {all: true, lines: {stdout: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 5–9why, one step back5expectTypeOf(linesStdoutResult.stdout).toBe<string[]>();6expectTypeOf(linesStdoutResult.stdio[1]).toBe<string[]>();7expectTypeOf(linesStdoutResult.stderr).toBe<string>();8expectTypeOf(linesStdoutResult.stdio[2]).toBe<string>();9expectTypeOf(linesStdoutResult.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 10–11why, one step back1011const linesStderrResult = await execa('unicorns', {all: true, lines: {stderr: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 12–16why, one step back12expectTypeOf(linesStderrResult.stdout).toBe<string>();13expectTypeOf(linesStderrResult.stdio[1]).toBe<string>();14expectTypeOf(linesStderrResult.stderr).toBe<string[]>();15expectTypeOf(linesStderrResult.stdio[2]).toBe<string[]>();16expectTypeOf(linesStderrResult.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 17–18why, one step back1718const linesFd1Result = await execa('unicorns', {all: true, lines: {fd1: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 19–23why, one step back19expectTypeOf(linesFd1Result.stdout).toBe<string[]>();20expectTypeOf(linesFd1Result.stdio[1]).toBe<string[]>();21expectTypeOf(linesFd1Result.stderr).toBe<string>();22expectTypeOf(linesFd1Result.stdio[2]).toBe<string>();23expectTypeOf(linesFd1Result.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 24–25why, one step back2425const linesFd2Result = await execa('unicorns', {all: true, lines: {fd2: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 26–30why, one step back26expectTypeOf(linesFd2Result.stdout).toBe<string>();27expectTypeOf(linesFd2Result.stdio[1]).toBe<string>();28expectTypeOf(linesFd2Result.stderr).toBe<string[]>();29expectTypeOf(linesFd2Result.stdio[2]).toBe<string[]>();30expectTypeOf(linesFd2Result.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 31–32why, one step back3132const linesAllResult = await execa('unicorns', {all: true, lines: {all: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 33–37why, one step back33expectTypeOf(linesAllResult.stdout).toBe<string[]>();34expectTypeOf(linesAllResult.stdio[1]).toBe<string[]>();35expectTypeOf(linesAllResult.stderr).toBe<string[]>();36expectTypeOf(linesAllResult.stdio[2]).toBe<string[]>();37expectTypeOf(linesAllResult.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 38–39why, one step back3839const linesFd3Result = await execa('unicorns', {all: true, lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 40–46why, one step back40expectTypeOf(linesFd3Result.stdout).toBe<string>();41expectTypeOf(linesFd3Result.stdio[1]).toBe<string>();42expectTypeOf(linesFd3Result.stderr).toBe<string>();43expectTypeOf(linesFd3Result.stdio[2]).toBe<string>();44expectTypeOf(linesFd3Result.all).toBe<string>();45expectTypeOf(linesFd3Result.stdio[3]).toBe<string[]>();46expectTypeOf(linesFd3Result.stdio[4]).toBe<string>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 47–48why, one step back4748const linesStdoutResultSync = execaSync('unicorns', {all: true, lines: {stdout: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 49–53why, one step back49expectTypeOf(linesStdoutResultSync.stdout).toBe<string[]>();50expectTypeOf(linesStdoutResultSync.stdio[1]).toBe<string[]>();51expectTypeOf(linesStdoutResultSync.stderr).toBe<string>();52expectTypeOf(linesStdoutResultSync.stdio[2]).toBe<string>();53expectTypeOf(linesStdoutResultSync.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 54–55why, one step back5455const linesStderrResultSync = execaSync('unicorns', {all: true, lines: {stderr: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 56–60why, one step back56expectTypeOf(linesStderrResultSync.stdout).toBe<string>();57expectTypeOf(linesStderrResultSync.stdio[1]).toBe<string>();58expectTypeOf(linesStderrResultSync.stderr).toBe<string[]>();59expectTypeOf(linesStderrResultSync.stdio[2]).toBe<string[]>();60expectTypeOf(linesStderrResultSync.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 61–62why, one step back6162const linesFd1ResultSync = execaSync('unicorns', {all: true, lines: {fd1: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 63–67why, one step back63expectTypeOf(linesFd1ResultSync.stdout).toBe<string[]>();64expectTypeOf(linesFd1ResultSync.stdio[1]).toBe<string[]>();65expectTypeOf(linesFd1ResultSync.stderr).toBe<string>();66expectTypeOf(linesFd1ResultSync.stdio[2]).toBe<string>();67expectTypeOf(linesFd1ResultSync.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 68–69why, one step back6869const linesFd2ResultSync = execaSync('unicorns', {all: true, lines: {fd2: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 70–74why, one step back70expectTypeOf(linesFd2ResultSync.stdout).toBe<string>();71expectTypeOf(linesFd2ResultSync.stdio[1]).toBe<string>();72expectTypeOf(linesFd2ResultSync.stderr).toBe<string[]>();73expectTypeOf(linesFd2ResultSync.stdio[2]).toBe<string[]>();74expectTypeOf(linesFd2ResultSync.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 75–76why, one step back7576const linesAllResultSync = execaSync('unicorns', {all: true, lines: {all: true}});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 77–81why, one step back77expectTypeOf(linesAllResultSync.stdout).toBe<string[]>();78expectTypeOf(linesAllResultSync.stdio[1]).toBe<string[]>();79expectTypeOf(linesAllResultSync.stderr).toBe<string[]>();80expectTypeOf(linesAllResultSync.stdio[2]).toBe<string[]>();81expectTypeOf(linesAllResultSync.all).toBe<string[]>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 82–83why, one step back8283const linesFd3ResultSync = execaSync('unicorns', {all: true, lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 84–90why, one step back84expectTypeOf(linesFd3ResultSync.stdout).toBe<string>();85expectTypeOf(linesFd3ResultSync.stdio[1]).toBe<string>();86expectTypeOf(linesFd3ResultSync.stderr).toBe<string>();87expectTypeOf(linesFd3ResultSync.stdio[2]).toBe<string>();88expectTypeOf(linesFd3ResultSync.all).toBe<string>();89expectTypeOf(linesFd3ResultSync.stdio[3]).toBe<string[]>();90expectTypeOf(linesFd3ResultSync.stdio[4]).toBe<string>();