Skip to content

test_runner: warn if only is used without properly enabling only tests #46448

Description

@cjihrig

What is the problem this feature will solve?

only tests require enabling only mode, otherwise only does nothing. This can lead people to think that only does not work.

What is the feature you are proposing to solve the problem?

The test runner should warn if someone tries to use only without properly enabling it.

What alternatives have you considered?

Doing nothing.

Activity

  1. added
    feature requestIssues requesting new Node.js features.
    test_runnerIssues and PRs related to the test runner subsystem.
    on Jan 31, 2023
  2. richiemccoll commented on Feb 6, 2023

    @richiemccoll
    Contributor

    @cjihrig I can take a look at this one, if nobody else has picked it up.

    • Should this warning be a test diagnostic? or use a different mechanism for warnings?
    • Would this be emitted once per parent test, once per test file or something different?
  3. MoLow commented on Feb 6, 2023

    @MoLow
    Member

    @cjihrig I can take a look at this one, if nobody else has picked it up.

    • Should this warning be a test diagnostic? or use a different mechanism for warnings?
    • Would this be emitted once per parent test, once per test file or something different?

    I think either process.emitWarning, or simply test.diagnostics is ok

  4. cjihrig commented on Feb 7, 2023

    @cjihrig
    ContributorAuthor

    I think we should prefer a test diagnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.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