babel-istanbul icon indicating copy to clipboard operation
babel-istanbul copied to clipboard

export default E constants

Open MoonTahoe opened this issue 8 years ago • 3 comments

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 avatar Aug 03 '16 21:08 MoonTahoe

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

MoonTahoe avatar Aug 03 '16 22:08 MoonTahoe

@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.

jeffrifwald avatar Aug 05 '16 19:08 jeffrifwald

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

MoonTahoe avatar Aug 07 '16 03:08 MoonTahoe