-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Implement an lcov
coverage reporter for bun test
#4015
Comments
I switched a small project to current output in console is usable, but |
..and uploading reports to tools such as codecov and coveralls. |
Any progress on uploadable coverage reports?
Before digging into deep analysis I wanted to recheck |
I'm having this same issue when using the gitlab pipeline to run tests. Any luck finding a fix? |
Is anyone actively looking into this here? Interested in resolving this for some use cases, and might have some bandwidth in the next few days to look into it. |
Using (devbox) ➜ tdd-demo-for-dajia-talk git:(devbox) ✗ bun run -b --filter="*" test
stack-with-jest test $ jest
│ [5 lines elided]
│
│ at withGlobal (../../node_modules/@sinonjs/fake-timers/src/fake-timers-src.js:183:23)
│ at new FakeTimers (../../node_modules/@jest/fake-timers/build/modernFakeTimers.js:27:50)
│ at processTicksAndRejections (:12:39)
│
│ Test Suites: 1 failed, 1 total
│ Tests: 0 total
│ Snapshots: 0 total
│ Time: 0.043 s
│ Ran all test suites.
└─ Done in 576 ms
(devbox) ➜ tdd-demo-for-dajia-talk git:(devbox) ✗ echo $?
0 |
Any update on this or something we can help with? |
If you want a badge here is a basic gist I made to do that for you quickly. I have a |
To be honest, the need is to integrate with other tools like CodeClimate (with lcov report) than display a badge in your repo. |
I need If |
I need it really bad too! I just wanted some visual indicator for now of how far my testing was getting while I wait for lcov. I recommend using shieldsIO for all the badges. the link here is for coveralls but the website does it all. Saves me a lot of pain to get working badges including github actions. |
I solved the badge issue based on @CraigglesO's code. If you need to display the badge, perhaps this is a display solution. If you also want to solve it in this way, you can refer to: https://github.com/renzp94/utils/blob/main/scripts/common.ts#L86 |
This will ship as part of Bun v1.1.16, thanks to @exoego |
@exoego This is awesome and a huge step towards being able to fully migrate from Jest to @Jarred-Sumner There are only 22 open issues with the "bun:test" label that mention "coverage". Could that be a focus of an upcoming release? (Big ones for me are #7100, #4021, and #7662.) |
Amazing news! |
Format
The only thing we are missing for lcov to work well is function names. JSC doesn't include them.
Otherwise, I think we can just write the file
The text was updated successfully, but these errors were encountered: