From 892813f7b08ce7eaa2d545ea21b6e169ac81354a Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Mon, 14 Nov 2016 14:35:36 +0500 Subject: [PATCH] ensure pipe methods on stream See #244 --- test/stream.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/stream.js b/test/stream.js index 6c9d359..0f89e75 100644 --- a/test/stream.js +++ b/test/stream.js @@ -127,6 +127,12 @@ test.cb('redirect response contains old url', t => { }); }); +test('check for pipe method', t => { + const stream = got.stream(`${s.url}/`); + t.is(typeof stream.pipe, 'function'); + t.is(typeof stream.on('error', () => {}).pipe, 'function'); +}); + test.after('cleanup', async () => { await s.close(); });