(t, fdNumber, from, options, hasResult)
| 46 | |
| 47 | // eslint-disable-next-line max-params |
| 48 | const testReadableDuplexDefault = async (t, fdNumber, from, options, hasResult) => { |
| 49 | const subprocess = execa('noop-stdin-fd.js', [`${fdNumber}`], options); |
| 50 | const stream = subprocess.duplex({from}); |
| 51 | stream.end(foobarString); |
| 52 | |
| 53 | await assertStreamOutput(t, stream, hasResult ? foobarString : ''); |
| 54 | await assertSubprocessOutput(t, subprocess, foobarString, fdNumber); |
| 55 | }; |
| 56 | |
| 57 | test('.duplex() can use stdout', testReadableDuplexDefault, 1, 'stdout', {}, true); |
| 58 | test('.duplex() can use stderr', testReadableDuplexDefault, 2, 'stderr', {}, true); |
nothing calls this directly
no test coverage detected
searching dependent graphs…