Skip to content

London | 26-ITP-SEPT | Carol Nassuna | Sprint 2 | Implement and rewrite tests - #1692

Open
Mugs3 wants to merge 1 commit into
CodeYourFuture:mainfrom
Mugs3:Sprint-2
Open

Mugs3 wants to merge 1 commit into
CodeYourFuture:mainfrom
Mugs3:Sprint-2

Conversation

@Mugs3

@Mugs3 Mugs3 commented Oct 13, 2026 •

Copy link
Copy Markdown
  • 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

Task code

CYF-1059

Changelist

Uploaded implement and rewrite tests coursework

@github-actions

This comment has been minimized.

@Mugs3 Mugs3 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 13, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good.

It seems you might have misunderstood the definition of proper fraction.

Comment on lines +45 to +50
test(`should return "Invalid angle" when (angle === Invalid)`, () => {
// Test various invalid angles, including boundary cases
expect(getAngleType(361)).toEqual("Invalid angle");
expect(getAngleType(0)).toEqual("Invalid angle");
expect(getAngleType(-181)).toEqual("Invalid angle");
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • "(angle === Invalid)" does not quite tell which angles are considered invalid.

  • 0 is a good boundary case to check. Could you think of the other boundary case?

Comment on lines +20 to +23
// Special case: numerator is negative number
test(`should return true when denominator is 1`, () => {
expect(isProperFraction(-1, 1)).toEqual(false);
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

-1 / 1, which is equal to -1, is not a proper fraction.

Could you look up the definition of "proper fraction" and then update the tests and your function implementation?

@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 Oct 19, 2026
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