Repository navigation
Document why node:test exists #42902
Description
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. 😕
- If it's relevant, my background: I'm primarily a maintainer of Node.js applications, ~5 years of experience doing so, and am not a maintainer of any OSS.
- I'm unsure how "should X go in core?" questions are usually settled, or if there are heuristics that exist in docs somewhere or in the heads of regular contributors. I went looking and found https://github.com/nodejs/node/blob/68fb0bf553e2af3e0b61733d29e1e9ba7f73d9b2/doc/contributing/pull-requests.md#accept-that-there-are-different-opinions-about-what-belongs-in-nodejs, which doesn't address the question so much as COC concerns at the periphery of the question. The couple “sufficient to put a thing in core” criteria it does identify aren’t met by a testing framework.
@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
bcomnes commentedon Apr 29, 2022
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 testtest 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.spencerwilson commentedon Apr 29, 2022
Thanks. Ah, that actually does relate to something in pull-requests.md:
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.
RaisinTen commentedon Apr 30, 2022
cc @nodejs/test_runner
ljharb commentedon Apr 30, 2022
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.
github-actions commentedon Jun 25, 2026
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.
bcomnes commentedon Jun 25, 2026
I rescind all questions. Node should have this feature and its turned out well. Great work everyone.
github-actions commentedon Sep 25, 2026
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.