Skip to content
Closed
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
ronag committed Jul 12, 2021
commit 9fa8a9f93314abf1707fecbefa67595f4d75acad
4 changes: 2 additions & 2 deletions lib/internal/streams/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ module.exports = function compose(...streams) {
const head = streams[0];
const tail = pipeline(streams, onfinished);

const writable = isWritable(head);
const readable = isReadable(tail);
const writable = !!isWritable(head);
const readable = !!isReadable(tail);

// TODO (ronag): Avoid double buffering.
Comment thread
ronag marked this conversation as resolved.
Outdated
// Implement Writable/Readable/Duplex traits.
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-stream-compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ const assert = require('assert');
}
});

assert.strictEqual(s1.writable, false);
assert.strictEqual(s1.readable, false);

finished(s1.resume(), common.mustCall((err) => {
assert(!err);
assert.strictEqual(buf, 'HELLOWORLD');
Expand Down