-
-
Notifications
You must be signed in to change notification settings - Fork 240
London | 25-ITP-Sept | Samuel Tarawally | Sprint 3 | Implement and rewrite tests #864
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?
London | 25-ITP-Sept | Samuel Tarawally | Sprint 3 | Implement and rewrite tests #864
Conversation
| const numValue = parseInt(rank); | ||
| if (numValue >= 2 && numValue <= 9) return numValue; |
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.
In JavaScript, strings that represent valid numeric literals in the language can be safely
converted to equivalent numbers or parsed into a valid integers.
Do you want to recognize these string values as valid ranks?
To find out what these strings are, you can ask AI
What kinds of string values would make
parseInt(rank)evaluate to2in JS?
| }); | ||
|
|
||
| test("should return 10 for face cards (J, Q, K, 10)", () => { | ||
| expect(getCardValue("10♣")).toEqual(10); |
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 10 is considered a number card.
Learners, PR Template
Self checklist
Changelist
implementfolder.rewrite-tests-with-jest folder.