Skip to content

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

@ILikeRubberDuckies

Description

@ILikeRubberDuckies

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions