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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant