diff --git a/test/parallel/test-stream-pipeline.js b/test/parallel/test-stream-pipeline.js index a729e77218b183..a6f4bffb46e5ee 100644 --- a/test/parallel/test-stream-pipeline.js +++ b/test/parallel/test-stream-pipeline.js @@ -1402,8 +1402,14 @@ const net = require('net'); const writableLike = new EE(); writableLike.write = () => false; - pipeline(async function *() { yield null }, writableLike, - common.expectsError({ code: 'ERR_STREAM_PREMATURE_CLOSE' })); + pipeline( + async function *() { + yield null; + yield null; + }, + writableLike, + common.expectsError({ code: 'ERR_STREAM_PREMATURE_CLOSE' }) + ); writableLike.emit('close'); }