jeffrifwald / babel-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
144 stars 23 forks source link

export default E constants #71

Open MoonTahoe opened 8 years ago

MoonTahoe commented 8 years ago

I updated my code to use ES6 import and export statements. Everything works, and my tests are passing, but the new syntax screwed up my code coverage... specifically branches.

It seems like this guy also had the same issue: Question

screenshot 2016-08-03 14 07 02

Any suggestions on how I can use ES6 imports and exports and still keep 100% code coverage?

MoonTahoe commented 8 years ago

Upon doing some research I found out that isparta covers export default... temporary solution hopefully?

jeffrifwald commented 8 years ago

@MoonTahoe I believe your issue is being caused by the babel source map no longer being correct. Anything that "makes it work" other than fixing the source map is at best a temporary solution.

Do you know the exact version release that causes the regression? If so, we can probably look at https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-commonjs and see what might have happened.

MoonTahoe commented 8 years ago

I am using babel-cli version 6.11.4 to run the tests...