-
-
Notifications
You must be signed in to change notification settings - Fork 272
West Midlands | ITP SEP | Jonathan Boahene | Sprint 3 |Implement and Rewrite Tests #891
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?
West Midlands | ITP SEP | Jonathan Boahene | Sprint 3 |Implement and Rewrite Tests #891
Conversation
cjyuan
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.
You missed updating two Jest test scripts in the rewrite-tests-with-jest subfolder.
| const num = Number(rank); | ||
| if (!isNaN(num) && num >= 2 && num <= 9) { | ||
| return num; | ||
| } |
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.
To find out what these strings are, you can ask AI
What kinds of string values would make
Number(rank)evaluate to2in JS?
or
What string values could make the expression
!isNaN(num) && num >= 2 && num <= 9evalute totrue?
Do you want to recognize these string values as valid ranks?
…ithub.com/Abayie/Module-Structuring-and-Testing-Data into coursework/sprint-3-implement-and-rewrite
cjyuan
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.
The tests look good.
Can you also address my comment which I left on Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
|
Yes, I did the research, ChatGPT made understand that are several other numbers that would evaluate to "0-10" which doesn't necessarily have to be exactly "0-10" because JavaScript is VERY permissive. It doesn’t only accept "specific number". It accepts anything that coerces to a specific number. Possible errors could be accidental "2.0", "2e0" bugs, whitespace tricks, coercion abuse |
cjyuan
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.
All good! Well done!
|
Thank you for your guidance |
Learners, PR Template
Self checklist
Changelist
Implement and rewrite test sprint 3
Questions
No questions