Skip to content

run subtests flagged as only also when parent is not flagged #51261

@simone-sanfratello

Description

@simone-sanfratello

Version

No response

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

actually not a bug, but a DX improvement

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

I'd like the test named want to run only this to run, but to do so also the parent must have the {onyl:true} option

test('want to run the subtests here', async (t) => {
  t.test('want to run only this', { only: true });
  t.test('dont run that');
});

test('this test is not run');

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

The parents tests should run as well, as they were flagged

What do you see instead?

no tests run

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.staletest_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