Skip to content

Cape Town | 25-ITP-May | Asanda Dunn | Sprint 3 | Coursework/sprint 3 implement and rewrite - #1453

Closed
asandagwala wants to merge 6 commits into
CodeYourFuture:mainfrom
asandagwala:coursework/sprint-3-implement-and-rewrite
Closed

Cape Town | 25-ITP-May | Asanda Dunn | Sprint 3 | Coursework/sprint 3 implement and rewrite#1453
asandagwala wants to merge 6 commits into
CodeYourFuture:mainfrom
asandagwala:coursework/sprint-3-implement-and-rewrite

Conversation

@asandagwala

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

Module: Structure and testing data Sprint 3 work

@asandagwala asandagwala 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 Jul 3, 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.

Good start, but still some things to work on

assertEquals(isProperFraction(1, 2), true);
assertEquals(isProperFraction(10,20), true);
assertEquals(isProperFraction(80, 10), false);
assertEquals(isProperFraction(8, 16), 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.

Does your testing consider valid proper fractions that include negatives?

!isNaN(numericValue) &&
numericValue >= 2 &&
numericValue <= 10 &&
String(numericValue) === rank

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What does this last condition do?


// Case 4: Negative Numbers
test("should handle negative integers according to mathematical comparison rules", () => {
expect(isProperFraction(-5, -2)).toEqual(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.

Are you sure these tests are correct for valid proper fractions?

assertEquals(getCardValue("Q♠"), 10);
assertEquals(getCardValue("K♣"), 10);

assertThrows("invalid");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you try running this, does "assertThrows" work here?

@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 8, 2026
@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the May ITP run has finished. Feel free to re-open if you're still working on it.

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. 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.

3 participants