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

Function testTextOutput

test/io/iterate.js:116–122  ·  view source on GitHub ↗
(t, expectedOutput, methodName, preserveNewlines)

Source from the content-addressed store, hash-verified

114test('.duplex() can use "binary: false" + "preserveNewlines: false"', testText, complexChunks, 'duplex', false, false, 'utf8');
115
116const testTextOutput = async (t, expectedOutput, methodName, preserveNewlines) => {
117 const subprocess = getSubprocess(methodName, complexFull);
118 const stream = subprocess[methodName]({binary: false, preserveNewlines});
119
120 await assertStreamOutput(t, stream, expectedOutput);
121 await assertSubprocessOutput(t, subprocess, complexFull);
122};
123
124test('.readable() "binary: false" keeps output as is', testTextOutput, complexFull, 'readable', undefined);
125test('.readable() "binary: false" + "preserveNewlines: true" keeps output as is', testTextOutput, complexFull, 'readable', true);

Callers

nothing calls this directly

Calls 3

assertStreamOutputFunction · 0.90
assertSubprocessOutputFunction · 0.90
getSubprocessFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…