Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Covering or Ignoring Generated Functions #11

Closed
jsmylnycky opened this issue May 26, 2015 · 8 comments
Closed

Covering or Ignoring Generated Functions #11

jsmylnycky opened this issue May 26, 2015 · 8 comments

Comments

@jsmylnycky
Copy link

Hi,

I have a setup using Webpack with Babel and this project, and while everything works great, one issue I've been trying to figure out how to fix is the coverage occurring on the generated functions.

Functions such as _createClass and _classCallCheck end up tanking my coverage stats, especially for Branches.

Is there something I may have done incorrectly? Is there a way to ignore these generated functions from being covered? Is this on a roadmap anywhere for resolution?

Thanks!

@aaronmaturen
Copy link

+1

@deepsweet
Copy link
Collaborator

hi.

are you talking about ES6 code transpiled by Babel?

@jsmylnycky
Copy link
Author

Yup, those functions at the top of each file after Babel transpiles ES6.
They end up counting against the coverage.
On May 26, 2015 8:31 PM, "Kir Belevich" [email protected] wrote:

hi.

are you talking about ES6 code transpiled by Babel?


Reply to this email directly or view it on GitHub
#11 (comment)
.

@deepsweet
Copy link
Collaborator

you can cover original ES6 code with https://github.com/deepsweet/isparta-loader

@jsmylnycky
Copy link
Author

Thanks, I'll take a look at that in the morning and post back here if
there's any issues :). Hard to find an answer to this issue.
On May 26, 2015 8:40 PM, "Kir Belevich" [email protected] wrote:

you can cover original ES6 code with
https://github.com/deepsweet/isparta-loader


Reply to this email directly or view it on GitHub
#11 (comment)
.

@deepsweet
Copy link
Collaborator

I'll update README with note about this. Isparta "binds" transpiled constructions to your original ES6 lines of code, so coverage report will be fair.

@jsmylnycky
Copy link
Author

Thanks!
On May 26, 2015 8:48 PM, "Kir Belevich" [email protected] wrote:

I'll update README with note about this. Isparta "binds" transpiled
constructions to your original ES6 lines of code, so coverage report will
be fair.


Reply to this email directly or view it on GitHub
#11 (comment)
.

@jsmylnycky
Copy link
Author

@deepsweet Just an FYI, I did just plug in isparta and moved it from post to pre-loader, and everything covers 100% now. Thanks so much :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants