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

Make it possible to ignore predefined lines (consider them “covered”) #57

Closed
mathiasbynens opened this issue May 28, 2013 · 3 comments

Comments

@mathiasbynens
Copy link
Contributor

I have lots of projects that need to work in browsers but also in Node, Narwhal.js, Rhino, and other JavaScript environments. Example coverage report: http://rawgithub.com/mathiasbynens/esrever/master/coverage/esrever/esrever.js.html
The main code starts at line 20 and ends at line 41. Everything else is the export logic that covers all those environments.

Of course, since Istanbul uses Node to run the tests, the code paths for the other environments won’t be reached. But this is also causing the coverage % of the file to drop.

It would be nice if it was possible to somehow configure Istanbul to ignore some parts of the code and just consider them as covered, or just display them greyed out in the report (to signify that they were ignored while calculating the coverage % of the file). Thoughts?

@gotwarlost
Copy link
Owner

This issue is similar in many aspects to: #15 where some folks have chimed in on how this feature should behave. Let me think about this.

@mathiasbynens
Copy link
Contributor Author

I see. Please feel free to close this issue in favor of #15.

@gotwarlost
Copy link
Owner

Closing since this is a dupe of #15

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

2 participants