Closed
Description
What is the problem this feature will solve?
currently - tests can easily be stuck or never end, which makes it very hard to understand and locate where your problem might originate
for example, this program will be very hard to debug:
test('top level', { concurrency: 2 }, async (t) => {
await t.test('endless', () => new Promise(() => {
setTimeout(() => {}, /* Large number */);
}));
// ... many other tests
});
What is the feature you are proposing to solve the problem?
add a timeout to tests running via node:test
, I propose adding a default timeout that will be configurable
one of the most important parts of testing is failing fast and knowing what the failure is, and timing out will help determine which test is misfunctioning
What alternatives have you considered?
No response