The issue involves conflicting timeout behaviors in the test runner, with maintainers debating the expected behavior.
The issue describes a conflict between suite-level and run-level timeout settings in the Node.js test runner, where the run-level timeout overrides the suite-level timeout. Maintainers are debating whether this is the desired behavior or a bug, and potential documentation updates may be needed. The scope involves understanding the test runner's timeout handling logic and possibly adjusting its behavior or documentation.
24.7.0
Microsoft Windows NT 10.0.19045.0 x64
No response
runner.js
import { run } from "node:test";
import { spec } from "node:test/reporters";
run({
timeout: 1000
}).compose(spec)
.pipe(process.stdout);
tee.test.js
import { test, suite } from "node:test";
suite("baa", { timeout: 2000 }, () => {
test("tee", async () => {
console.log("tee");
await new Promise((res) => { setTimeout(res, 1500) });
})
})
Run node runner.js
=> 'test timed out after 1000ms'
Always. No.
Test should pass.
=> 'test timed out after 1000ms'
Similar to #58802
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!