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

Function getSubprocess

test/io/iterate.js:44–52  ·  view source on GitHub ↗
(methodName, output, options)

Source from the content-addressed store, hash-verified

42const foobarObjectChunks = [foobarObject, foobarObject, foobarObject];
43
44const getSubprocess = (methodName, output, options) => {
45 if (methodName !== 'duplex') {
46 return getReadableSubprocess(output, options);
47 }
48
49 const subprocess = getReadWriteSubprocess(options);
50 subprocess.stdin.end(output);
51 return subprocess;
52};
53
54const assertChunks = async (t, streamOrIterable, expectedChunks, methodName) => {
55 const assertMethod = methodName === 'iterable' ? assertIterableChunks : assertStreamChunks;

Callers 9

testTextOutputFunction · 0.85
testObjectModeFunction · 0.85
testObjectSplitFunction · 0.85
testScriptStdoutSyncFunction · 0.85
testScriptStdoutFunction · 0.85
testReturnInterpolateFunction · 0.85
assertProcessErrorFunction · 0.85
testEarlyErrorPipeFunction · 0.85

Calls 2

getReadableSubprocessFunction · 0.90
getReadWriteSubprocessFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…