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: nodejs#10100
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
Raja Panidepu authored and Jonathan Darling committed Dec 8, 2016
1 parent 1acebfe commit 89dcd9b
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 89dcd9b

Please sign in to comment.