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

Function testStreamOutputDestroy

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

Source from the content-addressed store, hash-verified

70test('Destroying input stdio[*] should not make the subprocess exit', testStreamInputDestroy, 3);
71
72const testStreamOutputDestroy = async (t, fdNumber) => {
73 const subprocess = getStreamOutputSubprocess(fdNumber);
74 const cause = new Error('test');
75 subprocess.stdio[fdNumber].destroy(cause);
76 const error = await t.throwsAsync(subprocess);
77 t.is(error.cause, cause);
78 assertStreamOutputError(t, fdNumber, error);
79};
80
81test('Destroying stdout should not make the subprocess exit', testStreamOutputDestroy, 1);
82test('Destroying stderr should not make the subprocess exit', testStreamOutputDestroy, 2);

Callers

nothing calls this directly

Calls 2

assertStreamOutputErrorFunction · 0.85

Tested by

no test coverage detected