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

[BREAKING CHANGE] Update code coverage to look at additional coverage data #98

Closed
notmessenger opened this issue Apr 13, 2017 · 0 comments · Fixed by #107
Closed

[BREAKING CHANGE] Update code coverage to look at additional coverage data #98

notmessenger opened this issue Apr 13, 2017 · 0 comments · Fixed by #107

Comments

@notmessenger
Copy link
Contributor

The total percentage of statements covered, or total.statements.pct is what is currently considered, per https://github.com/ciena-blueplanet/pr-bumper#code-coverage, however total.branches.pct should be considered as well. The reason for this is because even though a statement of code may be evaluated, not all of the code branches inside of it may be.

An example of this scenario that has been encountered is:

return {
  label: testPoint.get(displayFormat) || '',
  value: testPoint.get('id') || ''
}

where the || '' conditions where never being tested but the statement was reported as being covered.

The pr-bumper.coverage property in the package.json file needs to remain a % value less than 100 so we cannot simply add these two numbers together but instead should average them. This assumes that the averaging of these two numbers gives us an accurate representation of what we are after. If this approach is chosen, it needs to be determined if the combined value would still accurately reflect an improvement in code coverage without the value decreasing.

This was referenced Jun 16, 2017
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

Successfully merging a pull request may close this issue.

1 participant