Skip to content
Closed
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: test
  • Loading branch information
ronag committed Apr 28, 2020
commit 20fe402464c3af07cc35312dfccd45497462d475
10 changes: 6 additions & 4 deletions test/parallel/test-stream-finished.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,6 @@ testClosed((opts) => new Writable({ write() {}, ...opts }));
// Regression https://github.com/nodejs/node/issues/33130

const response = new PassThrough();
response.write('chunk 1');
response.write('chunk 2');
response.write('chunk 3');
response.end();

class HelloWorld extends Duplex {
constructor(response) {
Expand Down Expand Up @@ -452,6 +448,12 @@ testClosed((opts) => new Writable({ write() {}, ...opts }));
instance.end();

instance.on('finish', common.mustCall(() => {
setImmediate(common.mustCall(() => {
response.write('chunk 1');
response.write('chunk 2');
response.write('chunk 3');
response.end();
}));
(async () => {
assert.strictEqual(instance.writableFinished, true);

Expand Down