Skip to content

Commit 48ea4c2

Browse files
committed
fixup
1 parent 5c7e371 commit 48ea4c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/parallel/test-stream-writable-end-cb-error.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ const stream = require('stream');
5656
setImmediate(callback);
5757
}
5858
});
59-
w.end('testing ended state', common.mustCall());
59+
w.end('testing ended state', common.mustCall((err) => {
60+
assert.strictEqual(err.code, 'ERR_STREAM_DESTROYED');
61+
}));
6062
assert.strictEqual(w.destroyed, false);
6163
assert.strictEqual(w.writableEnded, true);
6264
w.end(common.mustCall((err) => {
63-
assert.strictEqual(err.code, 'ERR_STREAM_WRITE_AFTER_END');
65+
assert.strictEqual(err.code, 'ERR_STREAM_DESTROYED');
6466
}));
6567
assert.strictEqual(w.destroyed, false);
6668
assert.strictEqual(w.writableEnded, true);

0 commit comments

Comments
 (0)