Skip to content

Conversation

@PaymanIB
Copy link

  • 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

made a new branch so it has no extra files

@PaymanIB PaymanIB added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 22, 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.

Are these files related to Sprint-3 exercise? If not, can you remove them?
They are making code review less convenient.

If they are local configuration files, you can consider updating .gitignore in the top level folder to exclude them from being tracked by Git. Alternatively, you can selectively manually commit only the relevant files (instead of "commit all changes") to the repository.

image

Comment on lines +10 to +28
test("should return false for an improper fraction", () =>{
expect(isProperFraction(5, 2)).toEqual(false);
});

// Case 3: Identify Negative Fractions:
test("should return true for negative proper fraction", () => (
expect(isProperFraction(-4,7)).toEqual(true)
));

// Case 4: Identify Equal Numerator and Denominator:
test("should return false when numerator equals denominator", () => {
expect(isProperFraction(3,3)).toEqual(false);
});

// Stretch:
// What other scenarios could you test for?
test("should return true for negative proper fraction with negative denominator", () => {
expect(isProperFraction(4,-7)).toEqual(true);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

What are your expected range of numerators and denominators?

If you test all possible combinations of positive/negative numerator and denominator, you may discover a bug in your implementation.

Comment on lines +16 to +18
else if ( 2 <= rank && rank <= 9 ){
return Number(rank);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you find out from AI the following?

What string value could make 2 <= rank && rank <= 9 evaluates to true in JavaScript?

Can you figure out how to improve the checking condition to recognize only strings that represent valid ranks?

Comment on lines +12 to +18
test("should return numeric value for number cards (2-10)", () => {
const fiveofHearts = getCardValue("5♥");
expect(fiveofHearts).toEqual(5);
});
// Case 3: Handle Face Cards (J, Q, K):
test("should return 10 for face cards (J, Q, K) and 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.

  • 2 and 10 are good boundary cases to test.
  • 10 is normally considered a number card.

Comment on lines +24 to +26
test("should return 11 for Ace (A)", () => {
expect(getCardValue("A♦")).toEqual(11);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This test and the test on lines 7-9 are quite similar.

@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 22, 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.

2 participants