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

fails to generate badge for 0% coverage #2

Closed
engineervix opened this issue Dec 4, 2020 · 6 comments
Closed

fails to generate badge for 0% coverage #2

engineervix opened this issue Dec 4, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@engineervix
Copy link

First of all, I'd like to thank you for this excellent package, this is absolutely great! Everything seems to work just fine, except I've noticed that if coverage is 0%, the badge isn't generated and hence substitution doesn't take place. For example, in my case, I had the following results:

=============================== Coverage summary ===============================
Statements   : 6.25% ( 1/16 )
Branches     : 0% ( 0/4 )
Functions    : 20% ( 1/5 )
Lines        : 7.14% ( 1/14 )
================================================================================
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   1 passed, 1 total
Time:        6.294s
Ran all test suites.

This resulted in

Statements Functions Lines Branches
Statements Functions Lines Branches

Thanks

@engineervix engineervix changed the title fails to add coverage if it's 0% fails to generate badge for 0% coverage Dec 4, 2020
@engineervix
Copy link
Author

It seems this is also true for 100% coverage! Again, I experienced this on the coverage for Branches

@olavoparno
Copy link
Member

Hey, first of all, sorry for the delay!

Thank you for the detailed explanation. I will look into it!

olavoparno added a commit that referenced this issue Dec 8, 2020
The replace match was incorrect

#2
@olavoparno
Copy link
Member

@olavoparno olavoparno added the bug Something isn't working label Dec 8, 2020
@olavoparno olavoparno self-assigned this Dec 8, 2020
@olavoparno
Copy link
Member

@all-contributors please add @engineervix for bug reporting.

@allcontributors
Copy link
Contributor

@olavoparno

I've put up a pull request to add @engineervix! 🎉

@engineervix
Copy link
Author

Hello again, mister @engineervix, could you please give another try using version 1.0.6?

https://github.com/olavoparno/istanbul-badges-readme/releases/tag/v1.0.6
https://www.npmjs.com/package/istanbul-badges-readme/v/1.0.6

Hey @olavoparno, thank you so much for looking into this, and for adding me to the list of contributors! I can confirm that v1.0.6 fixes the problem! 😃 🙌 Muito obrigado!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants