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
test: assert http writable corked state after end
  • Loading branch information
mitsos1os committed Jan 15, 2021
commit 5f944b98d7c076ec8407bbf1bb4a0788b158f3c8
3 changes: 3 additions & 0 deletions test/parallel/test-http-outgoing-end-multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ const http = require('http');

const server = http.createServer(common.mustCall(function(req, res) {
res.end('testing ended state', common.mustCall());
assert.strictEqual(res.writableCorked, 0);
res.end(common.mustCall());
assert.strictEqual(res.writableCorked, 0);
res.on('finish', common.mustCall(() => {
res.end(common.mustCall((err) => {
assert.strictEqual(err.code, 'ERR_STREAM_ALREADY_FINISHED');
server.close();
}));
assert.strictEqual(res.writableCorked, 0);
}));
}));

Expand Down