Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% coverage reported incorrectly #9

Closed
jedireza opened this issue Jan 16, 2016 · 5 comments
Closed

100% coverage reported incorrectly #9

jedireza opened this issue Jan 16, 2016 · 5 comments

Comments

@jedireza
Copy link

I'm working with lab-babel in a larger project and suspected some incorrect coverage reported. To demonstrate I updated the jedireza/lab-es6 example.

You just need to clone it, npm install and then npm test.

It shouldn't be 100% covered because I never tested the subtractSomething function.

@jedireza
Copy link
Author

Possibly related to: hapijs/lab#459

@willin
Copy link

willin commented Apr 15, 2016

i met the same problem

@mitch000001
Copy link

mitch000001 commented May 24, 2016

Same here. Seems like the auxiliaryCommentBefore and auxiliaryCommentAfter in https://github.com/nlf/lab-babel/blob/master/lib/index.js#L14-L15 are responsible for that. Removing these two lines brings back proper code coverage.
Actually I don't know why they were introduced in the first place so I hesitate to open a PR. Maybe @phated can clarify why they are/were needed.

@phated
Copy link
Collaborator

phated commented May 24, 2016

All the context needed should be in #4

Lab doesn't (or at least didn't) have a way to "skip next line" the way that istanbul did, so each line of generated code needed to be wrapped in a before & after comment. If lab has updated to allow comment to "skip next line" that would be ideal to use; however, I've stopped using lab since they don't support older versions of node.

@jedireza
Copy link
Author

[email protected] is out and has a fix in place for this now (hapijs/lab#622).

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

No branches or pull requests

4 participants