-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
area: repository toolingconcerning ease of contributionconcerning ease of contributionstatus: accepting prsMocha can use your help with this one!Mocha can use your help with this one!
Description
Tooling Suggestion Checklist
- I have tried restarting my IDE and the issue persists.
- I have pulled the latest
main
branch of the repository. - I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues and issues with the
faq
label, but none matched my issue. - I want to provide a PR to resolve this
Overview
Mocha 11.7.0 included #5366, using require to load ESM when supported in the running Node.js version. This was a great feature add for fixing #5314 & #5317, as well as working towards unblocking nodejs/node#57298.
However, it uncovered at least 2-3 user-reported issues:
- 🐛 Bug: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './esm-register' is not defined by "exports #5380
- feat: use require to load esm #5366 (comment): asynchronous Node.js loaders/hooks
- feat: use require to load esm #5366 (comment): MDN's browser-compat data tests
The root issue here is that the Mocha repo doesn't test those cases. Which is a problem. We should really have test coverage for these core user flows IMO.
Additional Info
IMO a good next step would be to:
- Fill in any examples in https://github.com/mochajs/mocha-examples
- Set up "ecosystem" style tests for PRs to make sure all examples are fixed
I think that can be separately tracked / out of scope for this specific issue.
robpalme
Metadata
Metadata
Assignees
Labels
area: repository toolingconcerning ease of contributionconcerning ease of contributionstatus: accepting prsMocha can use your help with this one!Mocha can use your help with this one!