(t, fdNumber, generator, input, objectMode, isInput)
| 16 | |
| 17 | // eslint-disable-next-line max-params |
| 18 | const testGeneratorReturn = async (t, fdNumber, generator, input, objectMode, isInput) => { |
| 19 | const fixtureName = isInput ? 'stdin-fd.js' : 'noop-fd.js'; |
| 20 | const {message} = await t.throwsAsync(execa(fixtureName, [`${fdNumber}`], getStdio(fdNumber, generator(input)(objectMode)))); |
| 21 | t.true(message.includes(getMessage(input))); |
| 22 | }; |
| 23 | |
| 24 | test('Generators with result.stdin cannot return an object if not in objectMode', testGeneratorReturn, 0, inputGenerator, foobarObject, false, true); |
| 25 | test('Generators with result.stdio[*] as input cannot return an object if not in objectMode', testGeneratorReturn, 3, inputGenerator, foobarObject, false, true); |
nothing calls this directly
no test coverage detected