mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
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' });
|
||||
|
||||
Reference in new issue
Block a user