Skip to content

Document why node:test exists #42902

Open

Description

@spencerwilson

Affected URL(s)

https://nodejs.org/api/test.html

Description of the problem

Background

The core module node:test was proposed in #40954 and shipped at Experimental stability in 18.0.0 via #42325. Dozens of people expressed support for the idea via 👍 reactions and written comments. The sentiment of commenters toward the feature is overwhelmingly supportive.

Problem

TL;DR the questions asked in #40954 (comment) seem unanswered, reducing the likelihood that node:test becomes adopted.

It's unclear what problems the project aims to solve by including a test runner in core.

...or should I say—given the broad support shown by participants in #40954 —that they're unclear to me. 😕

@bcomnes had a comment here - #40954 (comment) - that resonated very much with me: It distilled and synthesized a lot of rough ideas that commenters had submitted up to that point. IMO his comment effectively highlights the variety of goals that people might have for the module. It seems to me that the questions he raised remain unanswered.

cc @nodejs/test_runner (which I saw referenced in nodejs/TSC#1194 (comment) as a recently formed team)

meta note: My framing of this as a docs request might not be the best. If this is more suited as a Discussion or other type of issue, please let me know. Thanks.

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    on Apr 29, 2022
  2. bcomnes commented on Apr 29, 2022

    @bcomnes

    Finger to the wind now that things settled, a few node maintainers wanted a tape like test runner built in for their own tests in the node repo (functionality beyond the built in assert module) and possibly adoption from the wider ecosystem (outside of the original npm test test runner that was intended as the standard test entry point when Issacs was working on node/npm). This isn't an official description, just what it looks like from outside looking in.

  3. spencerwilson commented on Apr 29, 2022

    @spencerwilson
    Author

    a tape like test runner built in for their own tests in the node repo

    Thanks. Ah, that actually does relate to something in pull-requests.md:

    One general rule of thumb is that if Node.js itself needs it (due to historic or functional reasons), then it belongs in Node.js.

    I'm now wondering if the commenters in the original feature request issue skew toward Node maintainers and away from non-maintainers. Maybe the value/purpose is more self-evident to that first population than it is to the second.

  4. RaisinTen commented on Apr 30, 2022

    @RaisinTen
    Member

    cc @nodejs/test_runner

  5. ljharb commented on Apr 30, 2022

    @ljharb
    SponsorMember

    I think that’s true. The ecosystem itself hasn’t come anywhere close to settling on one preferred test runner pattern, and node should be adding things only after the ecosystem has rough consensus about what it wants.

  6. github-actions commented on Jun 25, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  7. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 25, 2026
  8. bcomnes commented on Jun 25, 2026

    @bcomnes

    I rescind all questions. Node should have this feature and its turned out well. Great work everyone.

  9. removed
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 26, 2026
  10. github-actions commented on Sep 25, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 90 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  11. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Sep 25, 2026
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

    docIssues and PRs related to Node.js documentation.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.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