Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.42 KB

README.md

File metadata and controls

32 lines (24 loc) · 1.42 KB

Repro case for an issue with incorrect highlighting in coverage HTML report when using nyc + Babel + AVA. Code is extracted from the cochan lib.

To reproduce the issue, run npm install followed by npm run cov, and then inspect HTML report located in converage/index.html. The report is also uploaded to this GH pages site.

To see the issue, look at the _takeFromWaitingPublisher() function, which looks like this:

image

Annotations on the left suggest that it has been executed multiple times, and that's indeed the case as the test code is crafted to ensure this. However, it is highlighted as not being covered.

The _take() function also has similar problem, although its code is highlighted in yellow, which means "branch not covered". However, the highlighted code has clearly been executed multuple times.

Also, the highlighting sometimes starts and ends at positions that make no sense, e.g. between "t" and "h" letters in this keyword.

And perhaps the most critical issue: overall coverage numbers for branches and functions look incorrect, much less than expected.