Skip to content

Commit

Permalink
test: updated test-stream-pipe-unpipe-stream
Browse files Browse the repository at this point in the history
test readableStream.unpipe(dest) is no operation when dest is
not a destination for readable stream.

PR-URL: #10100
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
Raja Panidepu authored and addaleax committed Dec 8, 2016
1 parent 3aa51ec commit 5afcf3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-stream-pipe-unpipe-streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 5afcf3a

Please sign in to comment.