-
-
Notifications
You must be signed in to change notification settings - Fork 195
Glasgow | Mansoor Munawar | Structuring and Testing Data | Sprint 3 #662
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?
Conversation
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.
Hi Mansoor, good work on this sprint. I've left comments about 2 small issues in two files for you to look at.
if (Math.abs(numerator) < Math.abs(denominator)) return true; | ||
else if (numerator === denominator) return false; | ||
else if (numerator > denominator) return false; | ||
else return false; | ||
} |
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.
Can you see any way you could combine these 3 return false conditions into one line?
// Handle Ace (A): | ||
// Given a card with a rank of "A", | ||
// When the function is called with an Ace, | ||
// Then it should, by default, assume the Ace is worth 11 points, which is a common rule in blackjack. | ||
|
||
const aceOfHearts = getCardValue("A♥"); | ||
assertEquals(aceOfSpades, 11); |
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 think you may have made a typo here that invalidates this test. Which variables are you trying to test for on this line?
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
I have completed the task for sprint 3 which required me to create test using Jest and implement functions to solve the required problems.
Questions
Ask any questions you have for your reviewer.