-
-
Notifications
You must be signed in to change notification settings - Fork 275
West Midlands | 25-ITP-Sep | Baba Yusuf | Sprint 3 | coursework/sprint-3-implement-and-rewrite #796
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 | 25-ITP-Sep | Baba Yusuf | Sprint 3 | coursework/sprint-3-implement-and-rewrite #796
Conversation
…for numeric ranks
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
1 similar comment
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/3-get-card-value.test.js
Show resolved
Hide resolved
|
No new commits was pushed to GitHub. |
…ng and simplify logic for proper fraction checks
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.
Changes look great. Well done.
| expect(() => getCardValue("Z♠")).toThrow( | ||
| 'Invalid or unrecognized card rank: "Z"' | ||
| ); | ||
| expect(() => getCardValue("1♥")).toThrow( | ||
| 'Invalid or unrecognized card rank: "1"' | ||
| ); | ||
| expect(() => getCardValue("11♦")).toThrow( | ||
| 'Invalid or unrecognized card rank: "11"' | ||
| ); | ||
| expect(() => getCardValue("X♣")).toThrow( | ||
| 'Invalid or unrecognized card rank: "X"' | ||
| ); | ||
|
|
||
| // These should throw because they result in an empty or whitespace rank | ||
| expect(() => getCardValue(" ♣")).toThrow( | ||
| 'Invalid or unrecognized card rank: " "' | ||
| ); | ||
| expect(() => getCardValue("♣")).toThrow( | ||
| 'Invalid or unrecognized card rank: ""' | ||
| ); |
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.
If you have time, you could also explore using a loop+array or test.each() (https://jestjs.io/docs/api#testeachtablename-fn-timeout)
Learners, PR Template
Self checklist
Changelist
Updated functions and practiced test-driven development by adding test cases for the functions in the sprint-3 exercise.