node/test/parallel/test-ttywrap-stack.js
Antoine du Hamel e50cbc1abd
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>
2025-12-10 23:55:36 +00:00

19 lines
327 B
JavaScript

'use strict';
const common = require('../common');
// This test ensures that console.log
// will not crash the process if there
// is not enough space on the V8 stack
async function test() {
await test();
}
(async () => {
try {
await test();
} catch (err) {
console.log(err);
}
})().then(common.mustCall());