-
-
Notifications
You must be signed in to change notification settings - Fork 275
Glasgow| 25-ITP-Sep | Abraham-Habte| Sprint 3|Coursework/sprint-3-implement-and-rewrite #806
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
base: main
Are you sure you want to change the base?
Glasgow| 25-ITP-Sep | Abraham-Habte| Sprint 3|Coursework/sprint-3-implement-and-rewrite #806
Conversation
LonMcGregor
left a comment
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.
Good start on this sprint's tasks, I have spotted a few areas where you could improve code further
| if (numerator > denominator) { | ||
| return false; | ||
| } | ||
| if (numerator === denominator) { |
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.
Are you certain this implementation is correct? Check what the comment for the test case for this condition says
| }); | ||
| // Case 5: Handle Invalid Cards: | ||
| test("should return null for invalid card 'B'", () => { | ||
| expect(getCardValue("Z♠")).toBeNull(); |
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.
Is there maybe a better jest test to use here? Looking at the documentation, can you see any expect() options that would work to help test for exceptions being thrown?
LonMcGregor
left a comment
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.
Perfect!
Self checklist
Changelist
I have done all the tasks required for this sprint
Questions
No questions