generator-string-full.test-d.ts
This file
Path
test-d/stdio/option/generator-string-full.test-d.ts
48 lines · 1.9 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, expectError} from 'nz';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 2–16why, one step back2import {3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';1011const stringGeneratorFull = {12 * transform(line: string) {13 yield line;14 },15} as const;16Type the `std*` generator transform `chunk` argument (#1247)Sindre Sorhusbefore adoption0a7b4f8
lines 17–20why, one step back17await execa('unicorns', {stdin: stringGeneratorFull});18execaSync('unicorns', {stdin: stringGeneratorFull});19await execa('unicorns', {stdin: [stringGeneratorFull]});20execaSync('unicorns', {stdin: [stringGeneratorFull]});100% test coverage (#1018)ehmickybefore adoption9f65b86
line 21why, one step back21Type the `std*` generator transform `chunk` argument (#1247)Sindre Sorhusbefore adoption0a7b4f8
lines 22–25why, one step back22await execa('unicorns', {stdout: stringGeneratorFull});23execaSync('unicorns', {stdout: stringGeneratorFull});24await execa('unicorns', {stdout: [stringGeneratorFull]});25execaSync('unicorns', {stdout: [stringGeneratorFull]});100% test coverage (#1018)ehmickybefore adoption9f65b86
line 26why, one step back26Type the `std*` generator transform `chunk` argument (#1247)Sindre Sorhusbefore adoption0a7b4f8
lines 27–30why, one step back27await execa('unicorns', {stderr: stringGeneratorFull});28execaSync('unicorns', {stderr: stringGeneratorFull});29await execa('unicorns', {stderr: [stringGeneratorFull]});30execaSync('unicorns', {stderr: [stringGeneratorFull]});100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 31–34why, one step back3132expectError(await execa('unicorns', {stdio: stringGeneratorFull}));33expectError(execaSync('unicorns', {stdio: stringGeneratorFull}));34Type the `std*` generator transform `chunk` argument (#1247)Sindre Sorhusbefore adoption0a7b4f8
lines 35–38why, one step back35await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGeneratorFull]});36execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGeneratorFull]});37await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGeneratorFull]]});38execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGeneratorFull]]});100% test coverage (#1018)ehmickybefore adoption9f65b86
line 39why, one step back39Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 40–43why, one step back40expectTypeOf(stringGeneratorFull).toBeAssignableTo<StdinOption>();41expectTypeOf(stringGeneratorFull).toBeAssignableTo<StdinSyncOption>();42[stringGeneratorFull] satisfies StdinOption;43[stringGeneratorFull] satisfies StdinSyncOption;100% test coverage (#1018)ehmickybefore adoption9f65b86
line 44why, one step back44Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 45–48why, one step back45expectTypeOf(stringGeneratorFull).toBeAssignableTo<StdoutStderrOption>();46expectTypeOf(stringGeneratorFull).toBeAssignableTo<StdoutStderrSyncOption>();47[stringGeneratorFull] satisfies StdoutStderrOption;48[stringGeneratorFull] satisfies StdoutStderrSyncOption;