readable.test-d.ts
This file
Path
test-d/convert/readable.test-d.ts
26 lines · 939 bytes · 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.
100% test coverage (#1018)ehmickybefore adoption9f65b86
line 1why, one step back1import type {Readable} from 'node:stream';Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 2why, one step back2import {expectTypeOf, expectError} from 'nz';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 3–6why, one step back3import {execa} from '../../index.js';45const subprocess = execa('unicorns');6Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
line 7why, one step back7expectTypeOf(subprocess.readable()).toBe<Readable>();100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 8–12why, one step back89subprocess.readable({from: 'stdout'});10subprocess.readable({from: 'stderr'});11subprocess.readable({from: 'all'});12subprocess.readable({from: 'fd3'});Add more type tests (#1117)ehmickybefore adoption077749d
line 13why, one step back13expectError(subprocess.readable({from: 'fd3' as string}));100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 14–26why, one step back14expectError(subprocess.readable({from: 'stdin'}));15expectError(subprocess.readable({from: 'fd'}));16expectError(subprocess.readable({from: 'fdNotANumber'}));17expectError(subprocess.readable({to: 'stdin'}));1819subprocess.readable({binary: false});20expectError(subprocess.readable({binary: 'false'}));2122subprocess.readable({preserveNewlines: false});23expectError(subprocess.readable({preserveNewlines: 'false'}));2425expectError(subprocess.readable('stdout'));26expectError(subprocess.readable({other: 'stdout'}));