web-transform-invalid.test-d.ts
This file
Path
test-d/stdio/option/web-transform-invalid.test-d.ts
48 lines · 2.6 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–39why, one step back3import {4 execa,5 execaSync,6 type StdinOption,7 type StdinSyncOption,8 type StdoutStderrOption,9 type StdoutStderrSyncOption,10} from '../../../index.js';1112const webTransformWithInvalidObjectMode = {13 transform: new TransformStream(),14 objectMode: 'true',15} as const;1617expectError(await execa('unicorns', {stdin: webTransformWithInvalidObjectMode}));18expectError(execaSync('unicorns', {stdin: webTransformWithInvalidObjectMode}));19expectError(await execa('unicorns', {stdin: [webTransformWithInvalidObjectMode]}));20expectError(execaSync('unicorns', {stdin: [webTransformWithInvalidObjectMode]}));2122expectError(await execa('unicorns', {stdout: webTransformWithInvalidObjectMode}));23expectError(execaSync('unicorns', {stdout: webTransformWithInvalidObjectMode}));24expectError(await execa('unicorns', {stdout: [webTransformWithInvalidObjectMode]}));25expectError(execaSync('unicorns', {stdout: [webTransformWithInvalidObjectMode]}));2627expectError(await execa('unicorns', {stderr: webTransformWithInvalidObjectMode}));28expectError(execaSync('unicorns', {stderr: webTransformWithInvalidObjectMode}));29expectError(await execa('unicorns', {stderr: [webTransformWithInvalidObjectMode]}));30expectError(execaSync('unicorns', {stderr: [webTransformWithInvalidObjectMode]}));3132expectError(await execa('unicorns', {stdio: webTransformWithInvalidObjectMode}));33expectError(execaSync('unicorns', {stdio: webTransformWithInvalidObjectMode}));3435expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformWithInvalidObjectMode]}));36expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformWithInvalidObjectMode]}));37expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformWithInvalidObjectMode]]}));38expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformWithInvalidObjectMode]]}));39Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 40–43why, one step back40expectTypeOf(webTransformWithInvalidObjectMode).not.toBeAssignableTo<StdinOption>();41expectTypeOf(webTransformWithInvalidObjectMode).not.toBeAssignableTo<StdinSyncOption>();42expectTypeOf([webTransformWithInvalidObjectMode]).not.toBeAssignableTo<StdinOption>();43expectTypeOf([webTransformWithInvalidObjectMode]).not.toBeAssignableTo<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(webTransformWithInvalidObjectMode).not.toBeAssignableTo<StdoutStderrOption>();46expectTypeOf(webTransformWithInvalidObjectMode).not.toBeAssignableTo<StdoutStderrSyncOption>();47expectTypeOf([webTransformWithInvalidObjectMode]).not.toBeAssignableTo<StdoutStderrOption>();48expectTypeOf([webTransformWithInvalidObjectMode]).not.toBeAssignableTo<StdoutStderrSyncOption>();