From 5afcf3ac78f3160bb88326b5a150baff32c2fe41 Mon Sep 17 00:00:00 2001 From: Raja Panidepu Date: Fri, 2 Dec 2016 17:51:43 -0600 Subject: [PATCH] test: updated test-stream-pipe-unpipe-stream test readableStream.unpipe(dest) is no operation when dest is not a destination for readable stream. PR-URL: https://github.com/nodejs/node/pull/10100 Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina --- test/parallel/test-stream-pipe-unpipe-streams.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-stream-pipe-unpipe-streams.js b/test/parallel/test-stream-pipe-unpipe-streams.js index c51c100d0f6802..79719add3700fc 100644 --- a/test/parallel/test-stream-pipe-unpipe-streams.js +++ b/test/parallel/test-stream-pipe-unpipe-streams.js @@ -25,6 +25,9 @@ source.unpipe(dest2); assert.strictEqual(source._readableState.pipes, dest1); assert.notStrictEqual(source._readableState.pipes, dest2); +dest2.on('unpipe', common.fail); +source.unpipe(dest2); + source.unpipe(dest1); assert.strictEqual(source._readableState.pipes, null);