Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Jan 6, 2021
1 parent 5c7e371 commit 48ea4c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/parallel/test-stream-writable-end-cb-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ const stream = require('stream');
setImmediate(callback);
}
});
w.end('testing ended state', common.mustCall());
w.end('testing ended state', common.mustCall((err) => {
assert.strictEqual(err.code, 'ERR_STREAM_DESTROYED');
}));
assert.strictEqual(w.destroyed, false);
assert.strictEqual(w.writableEnded, true);
w.end(common.mustCall((err) => {
assert.strictEqual(err.code, 'ERR_STREAM_WRITE_AFTER_END');
assert.strictEqual(err.code, 'ERR_STREAM_DESTROYED');
}));
assert.strictEqual(w.destroyed, false);
assert.strictEqual(w.writableEnded, true);
Expand Down

0 comments on commit 48ea4c2

Please sign in to comment.