Skip to content

Conversation

@MohammedNaru
Copy link

@MohammedNaru MohammedNaru commented Nov 4, 2025

Coursework/sprint 3 implement and rewrite

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

Pull request complete, all tests working and passed successfully

Questions

no current questions for review.

@MohammedNaru MohammedNaru force-pushed the coursework/sprint-3-implement-and-rewrite branch 4 times, most recently from e7b4c8b to d40619a Compare November 14, 2025 20:42
@MohammedNaru MohammedNaru force-pushed the coursework/sprint-3-implement-and-rewrite branch from d40619a to 5dc9452 Compare November 14, 2025 20:46
@MohammedNaru MohammedNaru reopened this Nov 14, 2025
@MohammedNaru MohammedNaru force-pushed the coursework/sprint-3-implement-and-rewrite branch from 9ac8d6e to 6082322 Compare November 14, 2025 20:51
@MohammedNaru MohammedNaru added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Nov 14, 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 Nov 15, 2025
Comment on lines +17 to +21
// When the numerator is negative but absolute value < denominator,
// Then the function should return true
test("should return true for a negative proper fraction (|numerator| < 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.

To make the tests cover all possible categories, you can consider including a test for negative improper fractions.

Copy link
Author

Choose a reason for hiding this comment

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

I’ve updated the implementation based on feedback to make it more robust and complete. For isProperFraction, I added an additional test case to cover negative improper fractions, ensuring full coverage across all fraction categories. For getCardValue, I improved the rank parsing by validating numeric ranges properly rather than relying on a fixed list, and clarified handling of both face cards and invalid input by adding stricter validation. This should now behave more reliably and align better with real-world card value rules. Let me know if any further tweaks are needed!

@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 Nov 15, 2025
@MohammedNaru MohammedNaru added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Nov 15, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Nov 16, 2025

Changes look good. Well done.

@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. labels Nov 16, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants