web-transform-instance.test-d.ts
This file
Path
test-d/stdio/option/web-transform-instance.test-d.ts
45 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 type of `TransformStream` (#1044)ehmickybefore adoption11bbd9d
line 1why, one step back1import {TransformStream} 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–36why, one step back3import {4 execa,5 execaSync,6 type StdinOption,7 type StdinSyncOption,8 type StdoutStderrOption,9 type StdoutStderrSyncOption,10} from '../../../index.js';1112const webTransformInstance = new TransformStream();1314await execa('unicorns', {stdin: webTransformInstance});15expectError(execaSync('unicorns', {stdin: webTransformInstance}));16await execa('unicorns', {stdin: [webTransformInstance]});17expectError(execaSync('unicorns', {stdin: [webTransformInstance]}));1819await execa('unicorns', {stdout: webTransformInstance});20expectError(execaSync('unicorns', {stdout: webTransformInstance}));21await execa('unicorns', {stdout: [webTransformInstance]});22expectError(execaSync('unicorns', {stdout: [webTransformInstance]}));2324await execa('unicorns', {stderr: webTransformInstance});25expectError(execaSync('unicorns', {stderr: webTransformInstance}));26await execa('unicorns', {stderr: [webTransformInstance]});27expectError(execaSync('unicorns', {stderr: [webTransformInstance]}));2829expectError(await execa('unicorns', {stdio: webTransformInstance}));30expectError(execaSync('unicorns', {stdio: webTransformInstance}));3132await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformInstance]});33expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformInstance]}));34await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformInstance]]});35expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformInstance]]}));36Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 37–40why, one step back37expectTypeOf(webTransformInstance).toBeAssignableTo<StdinOption>();38expectTypeOf(webTransformInstance).not.toBeAssignableTo<StdinSyncOption>();39[webTransformInstance] satisfies StdinOption;40expectTypeOf([webTransformInstance]).not.toBeAssignableTo<StdinSyncOption>();100% test coverage (#1018)ehmickybefore adoption9f65b86
line 41why, one step back41Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 42–45why, one step back42expectTypeOf(webTransformInstance).toBeAssignableTo<StdoutStderrOption>();43expectTypeOf(webTransformInstance).not.toBeAssignableTo<StdoutStderrSyncOption>();44[webTransformInstance] satisfies StdoutStderrOption;45expectTypeOf([webTransformInstance]).not.toBeAssignableTo<StdoutStderrSyncOption>();