MCPcopy Create free account
hub / github.com/sindresorhus/execa / testStreamInputDestroy

Function testStreamInputDestroy

test/resolve/stdio.js:60–67  ·  view source on GitHub ↗
(t, fdNumber)

Source from the content-addressed store, hash-verified

58test('Aborting output stdio[*] should not make the subprocess exit', testStreamOutputAbort, 3);
59
60const testStreamInputDestroy = async (t, fdNumber) => {
61 const subprocess = getStreamInputSubprocess(fdNumber);
62 const cause = new Error('test');
63 subprocess.stdio[fdNumber].destroy(cause);
64 const error = await t.throwsAsync(subprocess);
65 t.is(error.cause, cause);
66 assertStreamInputError(t, error);
67};
68
69test('Destroying stdin should not make the subprocess exit', testStreamInputDestroy, 0);
70test('Destroying input stdio[*] should not make the subprocess exit', testStreamInputDestroy, 3);

Callers

nothing calls this directly

Calls 2

getStreamInputSubprocessFunction · 0.85
assertStreamInputErrorFunction · 0.85

Tested by

no test coverage detected