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

Function testScriptStdout

test/methods/template.js:14–17  ·  view source on GitHub ↗
(t, getSubprocess, expectedStdout)

Source from the content-addressed store, hash-verified

12};
13
14const testScriptStdout = async (t, getSubprocess, expectedStdout) => {
15 const {stdout} = await getSubprocess();
16 t.is(stdout, expectedStdout);
17};
18
19test('$ allows number interpolation', testScriptStdout, () => $`echo.js 1 ${2}`, '1\n2');
20test('$ can concatenate multiple tokens', testScriptStdout, () => $`echo.js ${'foo'}bar${'foo'}`, 'foobarfoo');

Callers

nothing calls this directly

Calls 1

getSubprocessFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…