Skip to content

Commit 402fc26

Browse files
committed
fixup
1 parent 299b2fd commit 402fc26

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

test/parallel/test-http-server-write-end-after-end.js

+9-11
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,19 @@ function handle(req, res) {
1111
res.write('hello');
1212
res.end();
1313

14-
setImmediate(() => {
15-
// TODO: Known issues. OutgoingMessage does not always invoke callback
16-
// in end. Also streams don't propagate write after end to callback.
14+
setImmediate(common.mustCall(() => {
1715
res.end('world');
1816
process.nextTick(() => {
1917
server.close();
2018
});
21-
// res.end('world', common.mustCall((err) => {
22-
// common.expectsError({
23-
// code: 'ERR_STREAM_WRITE_AFTER_END',
24-
// name: 'Error'
25-
// })(err);
26-
// server.close();
27-
// }));
28-
});
19+
res.write('world', common.mustCall((err) => {
20+
common.expectsError({
21+
code: 'ERR_STREAM_WRITE_AFTER_END',
22+
name: 'Error'
23+
})(err);
24+
server.close();
25+
}));
26+
}));
2927
}
3028

3129
server.listen(0, common.mustCall(() => {

0 commit comments

Comments
 (0)