Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace mocha and nyc with native node test runner and c8 #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phillip9587
Copy link
Contributor

@Phillip9587 Phillip9587 commented Oct 22, 2024

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.

Copy link

socket-security bot commented Oct 22, 2024

Updated and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link
Member

@wesleytodd wesleytodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am on the fence on adopting the node test runner yet, but I am a fan of trying in one package, so I am approving this. But I will tag in the @jshttp/express-tc in case anyone has strong opinions.

@wesleytodd wesleytodd mentioned this pull request Jan 23, 2025
@ctcpip ctcpip requested a review from blakeembrey January 23, 2025 17:50
@ctcpip
Copy link
Member

ctcpip commented Jan 23, 2025

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

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on trying it in a single package for now, probably before releasing, the captain should agree, which in this case is @blakeembrey

Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! @Phillip9587 can you work on the conflct? 🙏

@Phillip9587
Copy link
Contributor Author

@UlisesGascon Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants