Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
test_runner: suite timeout doesn't overwrite run() timeout | GoodFirstPicks

test_runner: suite timeout doesn't overwrite run() timeout

nodejs/node 9 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeTest focusedNode.jsJavaScript

Why this is a good first issue

The issue involves conflicting timeout behaviors in the test runner, with maintainers debating the expected behavior.

AI Summary

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.

Issue Description

Version

24.7.0

Platform

Microsoft Windows NT 10.0.19045.0 x64

Subsystem

No response

What steps will reproduce the bug?

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'

How often does it reproduce? Is there a required condition?

Always. No.

What is the expected behavior? Why is that the expected behavior?

Test should pass.

What do you see instead?

=> 'test timed out after 1000ms'

Additional information

Similar to #58802

GitHub Labels

test_runner

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • maintainer disagreement on expected behavior
  • potential documentation changes
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedyes