uint-array.test-d.ts
This file
Path
test-d/stdio/option/uint-array.test-d.ts
42 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–33why, one step back2import {3 execa,4 execaSync,5 type StdinOption,6 type StdinSyncOption,7 type StdoutStderrOption,8 type StdoutStderrSyncOption,9} from '../../../index.js';1011await execa('unicorns', {stdin: new Uint8Array()});12execaSync('unicorns', {stdin: new Uint8Array()});13await execa('unicorns', {stdin: [new Uint8Array()]});14execaSync('unicorns', {stdin: [new Uint8Array()]});1516expectError(await execa('unicorns', {stdout: new Uint8Array()}));17expectError(execaSync('unicorns', {stdout: new Uint8Array()}));18expectError(await execa('unicorns', {stdout: [new Uint8Array()]}));19expectError(execaSync('unicorns', {stdout: [new Uint8Array()]}));2021expectError(await execa('unicorns', {stderr: new Uint8Array()}));22expectError(execaSync('unicorns', {stderr: new Uint8Array()}));23expectError(await execa('unicorns', {stderr: [new Uint8Array()]}));24expectError(execaSync('unicorns', {stderr: [new Uint8Array()]}));2526expectError(await execa('unicorns', {stdio: new Uint8Array()}));27expectError(execaSync('unicorns', {stdio: new Uint8Array()}));2829await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Uint8Array()]});30expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Uint8Array()]}));31await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Uint8Array()]]});32expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Uint8Array()]]}));33Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 34–37why, one step back34expectTypeOf(new Uint8Array()).toBeAssignableTo<StdinOption>();35expectTypeOf(new Uint8Array()).toBeAssignableTo<StdinSyncOption>();36[new Uint8Array()] satisfies StdinOption;37[new Uint8Array()] satisfies StdinSyncOption;100% test coverage (#1018)ehmickybefore adoption9f65b86
line 38why, one step back38Move type tests from `tsd` to `nz`Sindre Sorhusbefore adoption2141147
lines 39–42why, one step back39expectTypeOf(new Uint8Array()).not.toBeAssignableTo<StdoutStderrOption>();40expectTypeOf(new Uint8Array()).not.toBeAssignableTo<StdoutStderrSyncOption>();41expectTypeOf([new Uint8Array()]).not.toBeAssignableTo<StdoutStderrOption>();42expectTypeOf([new Uint8Array()]).not.toBeAssignableTo<StdoutStderrSyncOption>();