MCPcopy
hub / github.com/sindresorhus/execa / testSubprocessError

Function testSubprocessError

test/convert/shared.js:46–52  ·  view source on GitHub ↗
(t, methodName)

Source from the content-addressed store, hash-verified

44test('.duplex() requires listening to "error" event', testErrorEvent, 'duplex');
45
46const testSubprocessError = async (t, methodName) => {
47 const subprocess = getReadWriteSubprocess();
48 const stream = subprocess[methodName]();
49 const cause = new Error(foobarString);
50 subprocess.kill(cause);
51 await assertStreamError(t, stream, {cause});
52};
53
54test('Do not need to await subprocess with .readable()', testSubprocessError, 'readable');
55test('Do not need to await subprocess with .writable()', testSubprocessError, 'writable');

Callers

nothing calls this directly

Calls 2

getReadWriteSubprocessFunction · 0.90
assertStreamErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…