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

Request: 'istanbul instrument' should optionally create a 'baseline' coverage*.json file #19

Closed
nwwells opened this issue Nov 27, 2012 · 4 comments

Comments

@nwwells
Copy link

nwwells commented Nov 27, 2012

We're adding coverage to an existing project, and many files are not covered. Since the coverage json generated from the instrumented code essentially reports 'undefined' for files that weren't touched during the testing, our coverage stats are inaccurate (i.e. way too high).

My proposal is to provide an option in the instrument CLI to generate a 'coverage-baseline.json' file for the files instrumented, such that if you ran a report on the generated file, you'd see all the files, with 0% coverage.

@gotwarlost
Copy link
Owner

This is a good idea. Let me look into the easiest way of adding this.

@gotwarlost
Copy link
Owner

Darn it - used the wrong issue id in the commit message.

The following commit adds this feature:

092f336

@gotwarlost
Copy link
Owner

OK, version v0.1.23 adds this feature. Let me know if it works as expected for you.

@davglass FYI, in case it is useful for you guys too.

@nwwells
Copy link
Author

nwwells commented Dec 3, 2012

Thanks, this works for us!

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