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
Add more tests for calculateRank #459
Conversation
Also, change let to const for API response.
Codecov Report
@@ Coverage Diff @@
## master #459 +/- ##
==========================================
+ Coverage 93.92% 94.11% +0.18%
==========================================
Files 17 17
Lines 527 527
Branches 144 144
==========================================
+ Hits 495 496 +1
+ Misses 28 27 -1
Partials 4 4
Continue to review full report at Codecov.
|
prs: 0, | ||
issues: 0, | ||
}) | ||
).toStrictEqual({ level: "A+", score: 51.03597635931825 }); |
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.
I have seen that there are other ranks like B+ and C. This test means that the lowest rank is A+ which was not intended, I think.
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.
True, looks like calculateRank
is broken. Will wait for input from @anuraghazra
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.
Would it maybe make sense to propose the score to be "0" in this case, with the lowest possible rank (C)?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still an issue |
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.
The rank calculation appears broken, these tests might provide a good incentive to change and improve it
prs: 0, | ||
issues: 0, | ||
}) | ||
).toStrictEqual({ level: "A+", score: 51.03597635931825 }); |
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.
Would it maybe make sense to propose the score to be "0" in this case, with the lowest possible rank (C)?
Also, change let to const for API response.