Code Coverage when using ES6

151 views
Skip to first unread message

Peter Beshai

unread,
Mar 31, 2015, 11:34:47 AM3/31/15
to jes...@googlegroups.com

I'm trying to get code coverage working while using Babel to transform my code prior to running the tests. I currently have overall coverage working, but when an error is thrown when istanbul tries to generate the html reports for each file. The error is:

TypeError: Cannot set property 'covered' of undefined

Apparently this is because the source file doesn't match the compiled code the tests were run against. Does anyone have any idea how to get source mapping working for the code coverage html reports?

(Note that the sourcemapping in the preprocessor/prepare scripts is to make it so line numbers show up properly in the console when tests fail)
Reply all
Reply to author
Forward
0 new messages