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 MylesBorins committed Dec 20, 2016
1 parent 57d48ac commit 1e53cf4
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 @@ -27,6 +27,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 1e53cf4

Please sign in to comment.