Skip to content

Indicate when a test is started in test_runner #46727

@connor4312

Description

@connor4312

What is the problem this feature will solve?

When running tests in an editor (like VS Code), users want to know what test is currently being executed. This is useful, so if a test is hanging for instance, it's easy to see what it is.

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

Currently, TAP output for a test like...

describe("math", () => { it("addition",async () => { strictEqual(1 + 1, 2); }); });

looks like this:

# Subtest: math # Subtest: addition ok 1 - addition --- duration_ms: 1.369826 ... 

The "Subtest:` comment, and following assertion result, is only printed once the test completes. Two good alternatives would be to:

  • Print the Subtest: comment when the test is started, rather than when it finishes, or
  • Just print some other comment when the test is started

(The former is breaking for the way I handle logs in VS Code's runner, but this is due to my own hackery; not sure if any others will be affected)

What alternatives have you considered?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.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