Skip to content

Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 3 | implement and rewrite-test with jest#1476

Open
Tobias-Amaechina wants to merge 81 commits into
CodeYourFuture:mainfrom
Tobias-Amaechina:coursework-sprint-3-implement-and-rewrite
Open

Birmingham | 26-ITP-May | Tobias Amaechina | Sprint 3 | implement and rewrite-test with jest#1476
Tobias-Amaechina wants to merge 81 commits into
CodeYourFuture:mainfrom
Tobias-Amaechina:coursework-sprint-3-implement-and-rewrite

Conversation

@Tobias-Amaechina

Copy link
Copy Markdown

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

1 Full Implementation of getCardValue
Added complete logic for parsing card strings.

Validates both rank and suit according to the rules of a standard 52‑card deck.

Returns correct numerical values:

Ace → 11

Face cards → 10

Number cards → their numeric value

Throws descriptive errors for invalid input.

Rewritten and Expanded Test Suite
Replaced legacy assertions with clearer, structured tests.

Added coverage for:

All valid card types

All face cards

Ace handling

Numeric cards

Error cases (invalid rank, invalid suit, missing suit, missing rank, non‑string input, malformed card formats)

Ensures the function behaves correctly across edge cases.

…are -ve, however the numerator is less than denominator in absolute terms
@Tobias-Amaechina Tobias-Amaechina added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 6, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work and good test cases. this task looks complete!

@LonMcGregor LonMcGregor 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. labels Jul 13, 2026
@github-actions

Copy link
Copy Markdown

The files changed in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the 'files changed' tab at the top of the page.

Here is an example of a file that has been changed on this branch but shouldn't be: Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js

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

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

1 similar comment
@github-actions

Copy link
Copy Markdown

The files changed in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the 'files changed' tab at the top of the page.

Here is an example of a file that has been changed on this branch but shouldn't be: Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js

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

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants