readable-stream.test-d.ts
This file
Path
test-d/stdio/option/readable-stream.test-d.ts
43 lines · 2.1 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.
Fix typing of web streams (#1043)ehmickybefore adoption6f4941e
line 1why, one step back1import {ReadableStream} from 'node:stream/web';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–34why, one step back3import {4 execa,5 execaSync,6 type StdinOption,7 type StdinSyncOption,8 type StdoutStderrOption,9 type StdoutStderrSyncOption,10} from '../../../index.js';1112await execa('unicorns', {stdin: new ReadableStream()});13expectError(execaSync('unicorns', {stdin: new ReadableStream()}));14await execa('unicorns', {stdin: [new ReadableStream()]});15expectError(execaSync('unicorns', {stdin: [new ReadableStream()]}));1617expectError(await execa('unicorns', {stdout: new ReadableStream()}));18expectError(execaSync('unicorns', {stdout: new ReadableStream()}));19expectError(await execa('unicorns', {stdout: [new ReadableStream()]}));20expectError(execaSync('unicorns', {stdout: [new ReadableStream()]}));2122expectError(await execa('unicorns', {stderr: new ReadableStream()}));23expectError(execaSync('unicorns', {stderr: new ReadableStream()}));24expectError(await execa('unicorns', {stderr: [new ReadableStream()]}));25expectError(execaSync('unicorns', {stderr: [new ReadableStream()]}));2627expectError(await execa('unicorns', {stdio: new ReadableStream()}));28expectError(execaSync('unicorns', {stdio: new ReadableStream()}));2930await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new ReadableStream()]});31expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new ReadableStream()]}));32await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new ReadableStream()]]});33expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new ReadableStream()]]}));34Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 35–38why, one step back35expectTypeOf(new ReadableStream()).toBeAssignableTo<StdinOption>();36expectTypeOf(new ReadableStream()).not.toBeAssignableTo<StdinSyncOption>();37[new ReadableStream()] satisfies StdinOption;38expectTypeOf([new ReadableStream()]).not.toBeAssignableTo<StdinSyncOption>();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(new ReadableStream()).not.toBeAssignableTo<StdoutStderrOption>();41expectTypeOf(new ReadableStream()).not.toBeAssignableTo<StdoutStderrSyncOption>();42expectTypeOf([new ReadableStream()]).not.toBeAssignableTo<StdoutStderrOption>();43expectTypeOf([new ReadableStream()]).not.toBeAssignableTo<StdoutStderrSyncOption>();