test: ensure assertions are reached on more tests

PR-URL: https://github.com/nodejs/node/pull/60759
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Antoine du Hamel authored and RafaelGSS committed 2026-01-13 10:04:26 -03:00
1 parent 585e200b40
commit 79d48f9441
57 files changed
+246 -286

No files matched your search

+4 -4
View File
@@ -35,16 +35,16 @@ const options = {
const body = 'hello world\n';
const httpsServer = https.createServer(options, function(req, res) {
res.on('finish', function() {
const httpsServer = https.createServer(options, common.mustCallAtLeast((req, res) => {
res.on('finish', common.mustCall(() => {
assert.strictEqual(typeof req.connection.bytesWritten, 'number');
assert(req.connection.bytesWritten > 0);
httpsServer.close();
console.log('ok');
});
}));
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end(body);
});
}));
httpsServer.listen(0, function() {
https.get({