Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k
stars
786
forks
source link
Branch not covered error when using jasmine and ES6 #810
I'm getting "Branch Not Covered" warnings for code, seemingly starting from any logical operator (see this screenshot) and run to the end of the file. Removing the logical operator fixes the erroneous error, but it crops up again at the next one. This only seems to happen for "branch not covered" warnings, "statement not covered" errors appear to be correct, even if in the middle of a "branch not covered" warning.
I'm using Istanbul version 1.0.0-alpha.2, and Jasmine version 2.6.0, with Babel to transpile from es6. I've set up my babel config and it seems to be working (jasmine tests run fine), and Istanbul is giving me code coverage metrics that seem right.
I'm getting "Branch Not Covered" warnings for code, seemingly starting from any logical operator (see this screenshot) and run to the end of the file. Removing the logical operator fixes the erroneous error, but it crops up again at the next one. This only seems to happen for "branch not covered" warnings, "statement not covered" errors appear to be correct, even if in the middle of a "branch not covered" warning.
I'm using Istanbul version 1.0.0-alpha.2, and Jasmine version 2.6.0, with Babel to transpile from es6. I've set up my babel config and it seems to be working (jasmine tests run fine), and Istanbul is giving me code coverage metrics that seem right.