Skip to content

Glasgow | 26-ITP-May | Francesco Romano Monda | Sprint 3 | Complete Sprint 3 implement and rewrite tests coursework - #1556

Open
fromonda wants to merge 3 commits into
CodeYourFuture:mainfrom
fromonda:coursework/sprint-3-implement-and-rewrite
Open

Glasgow | 26-ITP-May | Francesco Romano Monda | Sprint 3 | Complete Sprint 3 implement and rewrite tests coursework#1556
fromonda wants to merge 3 commits into
CodeYourFuture:mainfrom
fromonda:coursework/sprint-3-implement-and-rewrite

Conversation

@fromonda

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

  • Implemented the getAngleType function.
  • Added tests covering all angle types, boundary values, and invalid angles.
  • Rewrote the getAngleType tests using Jest.
  • Implemented the isProperFraction function.
  • Added tests covering proper fractions, improper fractions, zero values, and boundary cases.
  • Rewrote the isProperFraction tests using Jest.
  • Implemented the getCardValue function.
  • Added support for Ace, face cards, and number cards.
  • Added validation for invalid card strings and error handling.
  • Rewrote the getCardValue tests using Jest.

@fromonda fromonda added 📅 Sprint 3 Assigned during Sprint 3 of this module 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 Jul 23, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 27, 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.

Very close to be complete, one test case left.


// Example #5: -1/2 and -5/-2 are proper fractions
assertEquals(isProperFraction(-1, 2), true);
assertEquals(isProperFraction(-5, -2), true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In maths, we consider than -1/2 is proper, but -5/2 is not proper (because 5 is bigger than 2). Can you take another look at this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I corrected the assertion for the negative numerator and denominator case. The mistake stemmed from overlooking that the definition of a proper fraction is based on the absolute values of the numerator and denominator.

@LonMcGregor LonMcGregor 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 27, 2026
@fromonda fromonda 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 Jul 27, 2026
@LonMcGregor

Copy link
Copy Markdown

Thanks for making the change to the test. But now, if you run the test, it fails. Did you also change the implementation as well?

@LonMcGregor LonMcGregor 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 Jul 27, 2026
@fromonda

Copy link
Copy Markdown
Author

Thanks for making the change to the test. But now, if you run the test, it fails. Did you also change the implementation as well?

Sorry for my oversight. I have fixed the implementation now.

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

Labels

Module-Structuring-And-Testing-Data The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants