Skip to content

Conversation

@Tarawally
Copy link

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

  • Implemented all solution functions in the implement folder.
  • Added tests for each function using assertions.
  • Rewrote all tests in Jest in the rewrite-tests-with-jest folder.
  • Covered all main and edge cases as required.

@Tarawally Tarawally added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 10, 2025
Comment on lines +14 to +15
const numValue = parseInt(rank);
if (numValue >= 2 && numValue <= 9) return numValue;
Copy link
Contributor

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.
Do you want to recognize these string values as valid ranks?

To find out what these strings are, you can ask AI

What kinds of string values would make parseInt(rank) evaluate to 2 in JS?

});

test("should return 10 for face cards (J, Q, K, 10)", () => {
expect(getCardValue("10♣")).toEqual(10);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think 10 is considered a number card.

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

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

02 Complete Sprint 3 implement and rewrite tests coursework

2 participants