Skip to content

skozin/nyc-babel-issue-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Repro case for an issue with nyc and babel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published