Skip to content

Manchester | 26-ITP-May |Abdu Hassen | Sprint 3 |implement and rewrite tests#1486

Open
Abduhasen wants to merge 2 commits into
CodeYourFuture:mainfrom
Abduhasen:Sprint-3-Backlog
Open

Manchester | 26-ITP-May |Abdu Hassen | Sprint 3 |implement and rewrite tests#1486
Abduhasen wants to merge 2 commits into
CodeYourFuture:mainfrom
Abduhasen:Sprint-3-Backlog

Conversation

@Abduhasen

@Abduhasen Abduhasen commented Jul 10, 2026

Copy link
Copy Markdown

Learners, PR Template

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

This PR implements the required function and updates the related tests to match the new implementation.

Questions

N/A

@github-actions

This comment has been minimized.

@Abduhasen Abduhasen 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 10, 2026
@Abduhasen Abduhasen changed the title Manchester | 26-ITP-May |Abdu Hassen | Sprint 3 |implement and rewriting tests Manchester | 26-ITP-May |Abdu Hassen | Sprint 3 |implement and rewrite tests Jul 10, 2026
Comment on lines +16 to +20
} else if (denominator === 0) {
return false;
} else {
return 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.

Code on lines 16-20 could further be simplified.


function getCardValue(card) {
// TODO: Implement this function
const validRank = [

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.

It's common practice to use plural names for arrays.

Comment on lines +21 to +23
return "Right angle";
} else if (90 < angle && angle < 180) {
return "Obtuse angles";

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.

Should some in singular form and some in plural form?

expect(getAngleType(-2)).toEqual("Invalid angles");
expect(getAngleType(361)).toEqual("Invalid angles");
expect(getAngleType(890)).toEqual("Invalid angles");
});

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.

  • Could consider explicitly specify the range of the invalid angles in the test description.

  • Why not test the boundary cases?

Comment on lines +11 to +17
test(`should return false when the denominator less nominator`, () => {
expect(isProperFraction(7, 2)).toEqual(false);
expect(isProperFraction(-17, -2)).toEqual(false);
expect(isProperFraction(0.5, 0.1)).toEqual(false);
});
test(`should return true when denominator is greater than nominator`, () => {
expect(isProperFraction(2, 8)).toEqual(true);

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.

  • The test description applies only when the values being compared are the absolute values of the denominator and numerator. You could consider using pseudo-code and notations like abs(...) or | ... | to denote absolute value in the test description.

  • Why not test the boundary cases?

Note: The correct term is numerator (not nominator).

@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 Jul 17, 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. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants