-
Notifications
You must be signed in to change notification settings - Fork 15k
Use 'count' as the default metric when available #4606
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
Conversation
Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be.
8cefaf6
to
1c72ed9
Compare
Codecov Report
@@ Coverage Diff @@
## master #4606 +/- ##
==========================================
+ Coverage 71.18% 71.24% +0.05%
==========================================
Files 189 190 +1
Lines 14847 14895 +48
Branches 1086 1101 +15
==========================================
+ Hits 10569 10612 +43
- Misses 4275 4280 +5
Partials 3 3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few nits.
expect(mainMetric([])).to.equal(undefined); | ||
expect(mainMetric(null)).to.equal(undefined); | ||
}); | ||
it('is prefers the "count" metric when first', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove "is" before "prefers".
]; | ||
expect(mainMetric(metrics)).to.equal('count'); | ||
}); | ||
it('is prefers the "count" metric when not first', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove "is" before "prefers".
]; | ||
expect(mainMetric(metrics)).to.equal('count'); | ||
}); | ||
it('it selects the first metric when "count" is not an option', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove "it" before "selects".
* Use 'count' as the default metric when available Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be. * Addressing nits
* Use 'count' as the default metric when available Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be. * Addressing nits
* Use 'count' as the default metric when available Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be. * Addressing nits
* Use 'count' as the default metric when available Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be. * Addressing nits
* Use 'count' as the default metric when available Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be. * Addressing nits
Count is a much better default than the current behavior which is to use whatever the first metric in the list happens to be.