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

setting coverage-path doesn't include all code in path #710

Closed
danielb2 opened this issue May 29, 2017 · 3 comments · Fixed by #877
Assignees
Labels
Milestone

Comments

@danielb2
Copy link
Contributor

@danielb2 danielb2 commented May 29, 2017

I'm setting coverage-path to --coverage-path lib. As a result, I'm expecting ALL files in the lib dir to be part of the coverage report.

Actual behavior:
Files not required in the test files are not covered.

https://github.com/danielb2/lab-example

It would also be useful to be able to specify multiple paths to include coverage for

@geek

This comment has been minimized.

Copy link
Member

@geek geek commented May 30, 2017

I think this a reasonable idea, any files under the coverage-path will be traversed and required. It will be breaking as coverage percentages might change and break existing builds. I wonder if we should add an option for opting-in or out of this auto-require behavior.

@geek geek added the request label May 30, 2017
@jcollum-cambia

This comment has been minimized.

Copy link

@jcollum-cambia jcollum-cambia commented Sep 6, 2017

My 2 cents: automatic with opt-out. We were just discussing why we have to manually exclude code in ./test path but the code in my ./src path isn't automatically included in coverage.

@joshrivers

This comment has been minimized.

Copy link

@joshrivers joshrivers commented Oct 25, 2017

What if we added a --coverage-all-path flag, leaving --coverage-path with it's current behavior. Later iterations could deprecate --coverage-path and migrate users forward?

@geek geek closed this in #877 Nov 2, 2018
@geek geek added this to the 17.2.0 milestone Nov 2, 2018
@geek geek self-assigned this Nov 2, 2018
@Marsup Marsup added feature and removed request labels Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.