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

Function testGeneratorInput

test/transform/generator-input.js:32–36  ·  view source on GitHub ↗
(t, fdNumber, objectMode, addNoopTransform, type, execaMethod)

Source from the content-addressed store, hash-verified

30
31// eslint-disable-next-line max-params
32const testGeneratorInput = async (t, fdNumber, objectMode, addNoopTransform, type, execaMethod) => {
33 const {input, generators, output} = getInputObjectMode(objectMode, addNoopTransform, type);
34 const {stdout} = await execaMethod('stdin-fd.js', [`${fdNumber}`], getStdio(fdNumber, [input, ...generators]));
35 t.is(stdout, output);
36};
37
38test('Can use generators with result.stdin', testGeneratorInput, 0, false, false, 'generator', execa);
39test('Can use generators with result.stdio[*] as input', testGeneratorInput, 3, false, false, 'generator', execa);

Callers

nothing calls this directly

Calls 2

getStdioFunction · 0.90
getInputObjectModeFunction · 0.85

Tested by

no test coverage detected