feat(blog): add mocha-to-node-test-runner migration guide - #9088
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview The article explains why teams might switch from Mocha to the built-in runner, Node.js ≥18 requirements (and major-version/engine bumps when dropping older Node), which APIs the codemod rewrites ( Reviewed by Cursor Bugbot for commit ea97e4c. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@nodejs/web-infra what is the Vercel issue ? |
|
@Xstoudi Your PR head is outdate with main, please rebase (it'll fix Vercel) |
| ## Node.js Version Requirements | ||
|
|
||
| - Node.js v18.0.0 or later (Node.js test runner is available but marked experimental) | ||
| - Node.js v20.0.0 or later (Node.js test runner is stable) | ||
|
|
||
| > If your package currently supports Node.js versions earlier than v18.0.0, you cannot migrate to the Node.js test runner without dropping support for those versions. | ||
| > This requires bumping the major version of your package AND updating the engines field in your package.json to require Node.js >= v18.0.0. |
There was a problem hiding this comment.
This section isn't needed, since those versions are both EOL
There was a problem hiding this comment.
humm IMO we should keep it because user may have older codebase that use EoL and to update it they can use this codemod.
There was a problem hiding this comment.
It's common for migrations to run to update outdated software in outdated environments.
Knowing that this migration won't work before node 20 -18 with experimental flag- would be valuable to me tbh. I can maybe agree that lines 25 and 26 are not that useful tho.
avivkeller
left a comment
There was a problem hiding this comment.
Blocking for further discussion
90d7c22 to
548eb5f
Compare
|
Looks like the further discussion isn't happening on this PR yet is blocking it. Not a big fan of that. |
It's happening in nodejs-website on Slack 👍 It is quite often easier to have conversations there and then report back on a PR once a decision has been made, rather than trying to have a conversation on the PR itself. |
|
Hi @Xstoudi! We've reached a decision, and. have moved this content to https://nodejs.org/learn/userland-migrations/mocha-to-node-test-runner |
|
What a wonderful example of consensus seeking :) |
Description
As titles
Related Issues
No related issue
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.