-
Notifications
You must be signed in to change notification settings - Fork 47
Ignoring Statements, Branches, etc.? #86
Comments
@jedmao, in my tests it appeared to me that When you compile your source code, you end up with two versions of the same file: the original, and the compiled version. The compiled version is usually more verbose and messy than the original version. After using However, every other data point will reference the compiled code. What you're seeing here is likely due to Babel adding an internal function with a few branches that your tests aren't fully covering. You can see this by running So is it fixable? I'm not sure, honestly. I know very little about the internals of isparta and Istanbul. As for me, I don't worry too much about the mismatch. I use code coverage to get an approximation of how complete my tests are. Even a value of 100% on everything doesn't mean that the code has no bugs. Anyway, I don't think I'll convince anyone to change their opinion on whether or not 100% code coverage matters, but it's worth keeping in mind that the coverage data will partially reflect the transpiled code. Does that make sense? |
@jmeas yeah that makes sense, but it's still not ideal. I wonder if isparta could more gracefully report what's going on instead of saying "skipped" for babel-generated code. Until then, I'm forced to "ignore" the number of ignored statements and branches, trusting that it's indeed accurate. Again, not ideal. Still waiting to hear back from @douglasduteil. |
This still seems to be happening in the latest version of isparta ^4.0.0 |
@nathancahill and I are seeing statements and branches ignored, even though there are no ignore comments in our source code. It looks like this:
Any idea why code is being ignored for seemingly no reason? Or maybe the report is off somehow?
The text was updated successfully, but these errors were encountered: