-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mocha/Jest like APIs to node:test
#43415
Comments
If this sounds reasonable I would submit a PR |
cc @nodejs/test_runner @cjihrig |
These styles are typically magic globals, which is definitely not a great thing. If someone wants to import/require However, one probably wouldn't want multiple styles in the same codebase. Perhaps it should be configurable, and only one style at a time supported? |
I assumed that's what we're talking about (exposing them and not defining them as globals, right?)
Actually I've seen it before (tools like jest typically support both styles and people use them for different things) - I don't do it myself but it definitely exists "in the wild". |
@ljharb @benjamingr I was totally thinking something like |
PR-URL: #43420 Refs: #43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#43420 Refs: nodejs#43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs/node#43420 Refs: nodejs/node#43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs/node#43420 Refs: nodejs/node#43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs/node#43420 Refs: nodejs/node#43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: #43420 Refs: #43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: #43420 Refs: #43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs/node#43420 Refs: nodejs/node#43415 Reviewed-By: Benjamin Gruenbaum <[email protected]>
What is the problem this feature will solve?
help wider adoption of
node:test
as a native test runnerWhat is the feature you are proposing to solve the problem?
following the discussion here #40954
it seems like there was no strong opionons against supporting mocha/jest test styles,
So I think adding the
describe
andit
APIs for starters can be fairly easyWhat alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: