Is the code coverage markup working properly?
See original GitHub issueI’m a bit confused by the code coverage highlighting. Is it working as expected? /cc @bookman25?
Here’s the HTML reporter compared to our overlay:
Steps to Reproduce
Here’s the repo for the example:
git clone https://github.com/seanpoulter/issue--jest-community--vscode-jest--181
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Everything you need to know about code coverage - Codegrip
Code coverage is a software testing metric that can help in assessing the test performance and quality aspects of any software.
Read more >How to read code coverage report - YouTube
We will look at code coverage HTML report generated after Cypress test run, and I will explain the line counters, if/else branching and...
Read more >Reviewing Coverage Information - Parasoft C++test 10.3.3 ...
Statement Coverage. Indicates how many executable source code statements were reached by the control flow at least once. Complete, 100% ...
Read more >Conflicting Code Coverage Results - Salesforce Developers
The coverage markup in the left hand column is clearly incorrect - there's no way that you can cover a comment line for...
Read more >Clearing coverage highlighting in Eclipse - java - Stack Overflow
Eclemma is maintained, but does not work properly with some unit testing framework features of Mockito and Powermock. So basicly it has problems...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m all in favor of adding more tests. I’m not attached to any of the code. If you find a way to improve the code so it makes more sense and is easier to maintain, then by all means feel free.
@bookman25, are you OK if I refactor
overlay.ts
as a class so it’s easier to test? I’m just getting familiar with Jest’s mocking, but it seems let testing a lot easier to manage mocks when you’re checking behavior (e.g.:callFoo()
callsfoo()
.Full disclosure: That’s how I’ve been adding tests but I wanted to check in before I bother with a PR.