content-disposition icon indicating copy to clipboard operation
content-disposition copied to clipboard

replace `mocha` and `nyc` with native node test runner and `c8`

Open Phillip9587 opened this issue 1 year ago • 1 comments

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 c8 for code coverage.
  • Updated test scripts to align with the new setup, improving maintainability and reducing reliance on external libraries.
  • Replaced deep-equal with native assert.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.

Phillip9587 avatar Oct 22 '24 21:10 Phillip9587

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]

View full report↗︎

socket-security[bot] avatar Oct 22 '24 21:10 socket-security[bot]

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

ctcpip avatar Jan 23 '25 17:01 ctcpip

@UlisesGascon Done!

Phillip9587 avatar Feb 04 '25 11:02 Phillip9587

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!

Phillip9587 avatar Feb 10 '25 18:02 Phillip9587

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.

wesleytodd avatar Mar 05 '25 13:03 wesleytodd