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

Function testSingleErrorInput

test/transform/generator-error.js:51–60  ·  view source on GitHub ↗
(t, type, execaMethod)

Source from the content-addressed store, hash-verified

49test('WebTransform errors make subprocess fail even when other output generators do not throw', testSingleErrorOutput, 'webTransform', execa);
50
51const testSingleErrorInput = async (t, type, execaMethod) => {
52 await assertProcessError(t, type, execaMethod, transform => execaMethod('stdin.js', {
53 stdin: [
54 ['foobar\n'],
55 generatorsMap[type].noop(false),
56 transform,
57 generatorsMap[type].noop(false),
58 ],
59 }));
60};
61
62test('Generators errors make subprocess fail even when other input generators do not throw', testSingleErrorInput, 'generator', execa);
63test('Generators errors make subprocess fail even when other input generators do not throw, sync', testSingleErrorInput, 'generator', execaSync);

Callers

nothing calls this directly

Calls 1

assertProcessErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…