-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
🐛 Bug: mocha 11 with tsx breaks some modules #5774
Copy link
Copy link
Open
Labels
status: in triagea maintainer should (re-)triage (review) this issuea maintainer should (re-)triage (review) this issuetype: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Milestone
Description
Bug Report Checklist
- I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
- I have searched for related issues and issues with the
faqlabel, but none matched my issue. - I have 'smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, my usage of Mocha, or Mocha itself.
- I want to provide a PR to resolve this
Expected
Updating mocha from 10 to 11 should not break tests
Actual
Module from node_modules are loaded incorrectly when using tsx
Minimal, Complete and Verifiable Example
https://gist.github.com/tpluscode/f5f1248509068afa033797bb51bd7dea
Versions
> npx mocha --version
11.7.5
> node_modules/.bin/mocha --version
11.7.5
> node --version
v20.19.4
Same with node 24
Additional Info
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: in triagea maintainer should (re-)triage (review) this issuea maintainer should (re-)triage (review) this issuetype: buga defect, confirmed by a maintainera defect, confirmed by a maintainer
Type
Projects
Status
No status