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

Add more tests for calculateRank #459

Closed
wants to merge 1 commit into from

Conversation

nrchandan
Copy link

Also, change let to const for API response.

Also, change let to const for API response.
@codecov
Copy link

codecov bot commented Sep 13, 2020

Codecov Report

Merging #459 into master will increase coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
src/fetchers/stats-fetcher.js 91.48% <100.00%> (ø)
src/calculateRank.js 93.61% <0.00%> (+2.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23d2d23...c0788a5. Read the comment docs.

@nrchandan nrchandan mentioned this pull request Sep 13, 2020
5 tasks
prs: 0,
issues: 0,
})
).toStrictEqual({ level: "A+", score: 51.03597635931825 });

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.

Copy link
Author

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

Copy link

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)?

@stale
Copy link

stale bot commented Dec 6, 2020

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.

@stale stale bot added the stale Issue is marked as stale. label Dec 6, 2020
@stale stale bot closed this Dec 13, 2020
@Plavit
Copy link

Plavit commented Feb 13, 2021

Still an issue

Copy link

@Plavit Plavit left a 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 });
Copy link

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue is marked as stale.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants