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

feat(learn): Collecting code coverage #7006

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RedYetiDev
Copy link
Member

Description

This PR introduces a learning article on collecting code coverage in Node.js. However, it should not be merged until support for thresholds is included in the next semver-minor release, which is expected to be next week.

Related Issues

Support for code coverage: nodejs/node#46017
Support for code coverage inclusion/exclusion: nodejs/node#53553
Support for code coverage thresholds: nodejs/node#54429

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • [N/A] I've covered new added functionality with unit tests if necessary.

Copy link

vercel bot commented Aug 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Aug 25, 2024 11:26am

@RedYetiDev
Copy link
Member Author

This is currently marked as draft until the next semver-minor release of Node.js

Copy link
Contributor

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

This is my first feedback, I think the introduction should be improved to put it in context. It should be remembered that the learn section is intended for non-experts.

Copy link

vercel bot commented Aug 24, 2024

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

Copy link
Contributor

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM !

Signed-off-by: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com>
Copy link
Member

@mikeesto mikeesto left a comment

Choose a reason for hiding this comment

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

Thanks for writing this, reads well

Co-authored-by: Michael Esteban <mickel13@gmail.com>
Signed-off-by: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com>
@RedYetiDev RedYetiDev marked this pull request as ready for review August 25, 2024 23:35
@RedYetiDev RedYetiDev requested a review from a team as a code owner August 25, 2024 23:35
@RedYetiDev
Copy link
Member Author

RedYetiDev commented Aug 25, 2024

I've undrafted this, as the release proposal for v22.8.0 is ready at nodejs/node#54560, but it still shouldn't land until that does.

The expected release date is 2024-08-26 2024-09-02

Copy link

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.54% (594/656) 76.29% (177/232) 94.57% (122/129)

Unit Test Report

Tests Skipped Failures Errors Time
131 0 💤 0 ❌ 0 🔥 6.027s ⏱️

Copy link
Collaborator

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

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

this is great - looking forward to it

@AugustinMauroy
Copy link
Contributor

Can we have last review form @nodejs/test_runner

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

This is amazing. However I'm not sure we should be landing this before having stabilized the code coverage functionality.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

This is amazing. However I'm not sure we should be landing this before having stabilized the code coverage functionality.

@RedYetiDev
Copy link
Member Author

I think this is okay to land once v22.8.0 releases, as it specifies that the --experimental-code-coverage command is needed, indicating that it is experimental. Would you like me to add a notice at the beginning that this is experimental, or just hold off until it's stabilized?

@mcollina
Copy link
Member

mcollina commented Sep 2, 2024

I think it's better to hold off until it's stable.

@AugustinMauroy AugustinMauroy added content Issues/pr concerning content learn Issues/pr concerning the learn section labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Issues/pr concerning content learn Issues/pr concerning the learn section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants