Skip to content

Conversation

@Baba05206
Copy link

@Baba05206 Baba05206 commented Oct 23, 2025

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Updated functions and practiced test-driven development by adding test cases for the functions in the sprint-3 exercise.

@github-actions
Copy link

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).

@Baba05206 Baba05206 changed the title Coursework/sprint-3-implement-and-rewrite Birmingham | 25-ITP-Sep | Baba Yusuf| Sprint 1 | coursework/sprint-3-implement-and-rewrite Oct 23, 2025
@github-actions
Copy link

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).

@Baba05206 Baba05206 added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 23, 2025
@github-actions
Copy link

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
@github-actions
Copy link

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).

@Baba05206 Baba05206 changed the title Birmingham | 25-ITP-Sep | Baba Yusuf| Sprint 1 | coursework/sprint-3-implement-and-rewrite Birmingham | 25-ITP-Sep | Baba Yusuf | Sprint 1 | coursework/sprint-3-implement-and-rewrite Oct 23, 2025
@github-actions
Copy link

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).

@Baba05206 Baba05206 changed the title Birmingham | 25-ITP-Sep | Baba Yusuf | Sprint 1 | coursework/sprint-3-implement-and-rewrite Birmingham | 25-ITP-Sep | Baba Yusuf | Sprint 3 | coursework/sprint-3-implement-and-rewrite Oct 23, 2025
@github-actions
Copy link

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).

@Baba05206 Baba05206 changed the title Birmingham | 25-ITP-Sep | Baba Yusuf | Sprint 3 | coursework/sprint-3-implement-and-rewrite West Midlands | 25-ITP-Sep | Baba Yusuf | Sprint 3 | coursework/sprint-3-implement-and-rewrite Oct 23, 2025
@cjyuan cjyuan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 27, 2025
@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 27, 2025
@Baba05206 Baba05206 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 29, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Oct 29, 2025

No new commits was pushed to GitHub.

…ng and simplify logic for proper fraction checks
@Baba05206 Baba05206 added the Module-Structuring-And-Testing-Data The name of the module. label Oct 29, 2025
Copy link
Contributor

@cjyuan cjyuan left a 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.

Comment on lines +34 to +53
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: ""'
);
Copy link
Contributor

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)

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants