Skip to content

Commit

Permalink
fixup: test
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Jun 11, 2021
1 parent 23f50be commit 2ba4a10
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/parallel/test-stream-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -1387,3 +1387,23 @@ const net = require('net');
assert.strictEqual(res, content);
}));
}

{
const writableLike = new EE();
writableLike.writableNeedDrain = true;

pipeline(async function *() {}, writableLike,
common.expectsError({ code: 'ERR_STREAM_PREMATURE_CLOSE' }));

writableLike.emit('close');
}

{
const writableLike = new EE();
writableLike.write = () => false;

pipeline(async function *() { yield null }, writableLike,
common.expectsError({ code: 'ERR_STREAM_PREMATURE_CLOSE' }));

writableLike.emit('close');
}

0 comments on commit 2ba4a10

Please sign in to comment.