test: enforce better never-settling-promise detection

Tests should be explicit regarding whether a promise is expected to
settle, and the test should fail when the behavior does not meet
expectations.

PR-URL: https://github.com/nodejs/node/pull/60976
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Erick Wendel <erick.workspace@gmail.com>
This commit is contained in:
Antoine du Hamel committed 2026-01-20 14:26:59 +01:00
1 parent 41adb54a37
commit a49d54308e
83 files changed
+451 -354

No files matched your search

@@ -31,7 +31,7 @@ const server = https.createServer({
console.log('Responding to /first');
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Response for /first');
});
}).then(common.mustCall());
} else if (req.url === '/second') {
// Respond immediately for the second request
res.writeHead(200, { 'Content-Type': 'text/plain' });