replace `mocha` and `nyc` with native node test runner and `c8`
This PR refactors the test setup by replacing Mocha and NYC with Node.js's native test runner (node:test) and c8 for coverage reporting.
Key Changes:
- Replaced Mocha and NYC with the native Node.js test runner and
c8for code coverage. - Updated test scripts to align with the new setup, improving maintainability and reducing reliance on external libraries.
- Replaced
deep-equalwith nativeassert.deepEqual. - Updates the CI pipeline
Benefits:
These changes modernize the testing framework, reduce external dependencies, and uphold code coverage standards using built-in Node.js capabilities.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/[email protected] | Transitive: environment, filesystem, shell, unsafe | +63 |
4.93 MB |
🚮 Removed packages: npm/[email protected], npm/[email protected]
relevant express team discussion on the topic of the node test runner, and test runners in general: https://openjs-foundation.slack.com/archives/C02QB1731FH/p1729689394701019
@UlisesGascon Done!
Hey @blakeembrey, could you take a look at this and confirm if you're on board with the changes? Let me know if you have any concerns!
I am going to push this one forward, it is not a blocking review and Blake has much more important things going on in life so I don't want to force attention on this which is rather low risk.