-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
add code test coverage badge into README.md #2709
Comments
What to do in this issue can you explain |
Personally I would use Codecov, but I asked ChatGPT and found simpler way:To add Jest test coverage information to a GitHub 1. Enable Jest Coverage Reporting
2. Run Tests with Coverage
3. Generate a Coverage BadgeUse a tool like [Shields.io](https://shields.io/) or an npm package like Option A: Shields.io (Manual)
Option B: Automate with
|
@ImBIOS it is showing 0% courage |
I think you're correct, the current coverage might near to 0%. We need more test contribution or even migration to typescript to help new contributor adapt faster. |
yes |
I've prepared the GitHub Action we can use to generate the code coverage badge: |
⚬ Problem:
It's unclear whether this project requires test contributions or if the existing test coverage is healthy (above 60%). Contributors lack visibility into the project's testing status.
⚬ Solution:
Add a test coverage badge to the
README.md
file. This badge should provide a clear, real-time indicator of the test coverage percentage, helping contributors assess the current status at a glance.⚬ Alternatives:
CONTRIBUTING.md
file.⚬ Relevance/Scope:
This would benefit 100% of potential test contributors by offering critical insights into the testing status and encouraging contributions to improve test coverage.
⚬ "Side Effects":
Displaying low test coverage may prompt contributors to add more tests, improving the overall quality of the project.
⚬ Context:
Adding a coverage badge is a common practice in open-source projects and helps set a standard for transparency and contribution guidance.
The text was updated successfully, but these errors were encountered: