gotwarlost / istanbul

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

if (false && true) return 'breaks'; highlights the rest of the file yellow #668

Closed spearmootz closed 8 years ago

spearmootz commented 8 years ago

when testing if (false && true) { }

where you dont test the true should highlight the && true never executed or something but it instead highlights the rest of the file as yellow

in this example its not so bad, but in when working on a big class where you test everything compleeeetely except for 1 function at the top where this happens then you end up with a whole class being highlighted in yellow.

spearmootz commented 8 years ago

image

gotwarlost commented 8 years ago

You're using babel right? This is a babel source map bug.

https://phabricator.babeljs.io/T7453