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

Function testStreamOutputError

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

Source from the content-addressed store, hash-verified

97test('Errors on input stdio[*] should not make the subprocess exit', testStreamInputError, 3);
98
99const testStreamOutputError = async (t, fdNumber) => {
100 const subprocess = getStreamOutputSubprocess(fdNumber);
101 const cause = new Error('test');
102 const stream = subprocess.stdio[fdNumber];
103 stream.emit('error', cause);
104 const error = await t.throwsAsync(subprocess);
105 t.is(error.cause, cause);
106 assertStreamOutputError(t, fdNumber, error);
107};
108
109test('Errors on stdout should make the subprocess exit', testStreamOutputError, 1);
110test('Errors on stderr should make the subprocess exit', testStreamOutputError, 2);

Callers

nothing calls this directly

Calls 2

assertStreamOutputErrorFunction · 0.85

Tested by

no test coverage detected