Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: test pipeline end on transform streams
Add test that confirms that
`stream.promises.pipeline(source, transform, dest, {end: false});`
only skips ending the destination stream.
`{end: false}` should still end any transform streams.

PR-URL: #48970
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
aloisklink authored and aduh95 committed May 12, 2024
commit f3f1aec0962f988c9c04931e58fe95802f426207
6 changes: 5 additions & 1 deletion test/parallel/test-stream-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -1476,10 +1476,14 @@ const tsp = require('timers/promises');
});

const duplex = new PassThrough();
const transform = new PassThrough();

read.push(null);

await pipelinePromise(read, duplex, { end: false });
await pipelinePromise(read, transform, duplex, { end: false });

assert.strictEqual(transform.destroyed, true);
assert.strictEqual(transform.writableEnded, true);

assert.strictEqual(duplex.destroyed, false);
assert.strictEqual(duplex.writableEnded, false);
Expand Down