-
Notifications
You must be signed in to change notification settings - Fork 18
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 profile service tests & fix profile service #102
Conversation
Several notes (not sure if significant, cc @AydanPirani for final review): Coverage report for profile is as follows:
Not covered by tests:
All in all, pretty good coverage! Some things I'd like to see tested:
Other misc things / nitpicks:
This is a great start though, great job! |
@Timothy-Gonzalez @akulsharma1 Leaderboard
I wrote this super basic endpoint, it should return the top limit users by points - @akulsharma1 do you think you can add some tests in for this as well? Basically, all you need to do is:
And maybe add in a test case to ensure that limit cannot be negative. Format Testing
Yeah, dw about testing the actual "isValidformat" for now, just make sure that it throws if it gets a bad input. Role Stuff
Yup, dw about testing with roles that don't have any perms - just test that each branch of hasElevatedPerms/hasStaffPerms/hasAdminPerms gets tested. |
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.
it's making me review, but please reference above comments! I'm good with this once you get through the checkboxes + if @Timothy-Gonzalez is happy. with it
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.
Looks great! A few small nps to move duplicated code out of tests & into variables & beforeEach hooks, but otherwise great job!
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.
few more nps that I missed
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.
Great job! Feel free to merge!
This should be a squash merge, make sure to edit the description to only include the important things (not "testing formatting adjustments" for example)
Resolves #103
profile-router.test.ts
profile-router.ts