(t, {destinationOptions = {}, inspectPipePromise} = {})
| 32 | }; |
| 33 | |
| 34 | const assertUnhandledPipePromise = async (t, {destinationOptions = {}, inspectPipePromise} = {}) => { |
| 35 | const source = execa('fail.js'); |
| 36 | const destination = execa('fail.js', destinationOptions); |
| 37 | const pipePromise = source.pipe(destination); |
| 38 | const unhandledRejectionPromise = once(process, 'unhandledRejection'); |
| 39 | await inspectPipePromise?.(pipePromise); |
| 40 | await assertUnhandledRejection(t, pipePromise, unhandledRejectionPromise); |
| 41 | await Promise.all([ |
| 42 | t.throwsAsync(source), |
| 43 | t.throwsAsync(destination), |
| 44 | ]); |
| 45 | await t.throwsAsync(pipePromise); |
| 46 | }; |
| 47 | |
| 48 | test('Source stream abort -> destination success', async t => { |
| 49 | const source = execa('noop-repeat.js'); |
no test coverage detected