Open silkentrance opened 8 years ago
I think https://github.com/gotwarlost/istanbul/issues/557 may be either related or the same issue.
Again having this issue with a different ternary operator
Is there a work around for this?
@mynameistechno the only work around for this is to get rid of the ternary operator and make it an if-then-else statement...
I'm getting the same issue, the code coverage with ternary operator seems like this:
However if you view page source you get the following:
t</span>his.mode = window ? 'WebBrowser' : <span class="branch-1 cbranch-no" title="branch not covered" >'server';
The </span>
closing tag should not precede the open <span>
tag. Seems the html is not rendered properly.
Adding a line break seems like one of the work around for this:
Same happens here:
I guess HTML rendering is okay, but the coverage.raw.json is wrong?
AFAIK, all this is happens because of https://phabricator.babeljs.io/T7453 - in essence, babel is producing incorrect source maps.
Please see https://github.com/jmcriffey/babel-istanbul/issues/56 for more information on this.