diff --git a/test/stream.ts b/test/stream.ts index 1eaaa3926..13a9c3ea4 100644 --- a/test/stream.ts +++ b/test/stream.ts @@ -319,3 +319,14 @@ test('no unhandled body stream errors', async t => { code: 'ENOTFOUND' }); }); + +test('works with pipeline', async t => { + await t.throwsAsync(pStreamPipeline( + new stream.Readable({ + read: function () { + this.push(null); + } + }), + got.stream.put('http://localhost:7777') + ), {message: 'connect ECONNREFUSED 127.0.0.1:7777'}); +});