(t, fdNumber, generator, input, objectMode, isInput)
| 39 | |
| 40 | // eslint-disable-next-line max-params |
| 41 | const testGeneratorReturnSync = (t, fdNumber, generator, input, objectMode, isInput) => { |
| 42 | const fixtureName = isInput ? 'stdin-fd.js' : 'noop-fd.js'; |
| 43 | const {message} = t.throws(() => { |
| 44 | execaSync(fixtureName, [`${fdNumber}`], getStdio(fdNumber, generator(input)(objectMode))); |
| 45 | }); |
| 46 | t.true(message.includes(getMessage(input))); |
| 47 | }; |
| 48 | |
| 49 | test('Generators with result.stdin cannot return an object if not in objectMode, sync', testGeneratorReturnSync, 0, inputGenerator, foobarObject, false, true); |
| 50 | test('The last generator with result.stdin cannot return an object even in objectMode, sync', testGeneratorReturnSync, 0, lastInputGenerator, foobarObject, true, true); |
nothing calls this directly
no test coverage detected