Skip to content

Manchester | ITP-JAN-26 | Ofonime Edak | Sprint 3 | Coursework/sprint 3 implement and rewrite#1139

Open
Ofonimeedak wants to merge 4 commits intoCodeYourFuture:mainfrom
Ofonimeedak:coursework/sprint-3-implement-and-rewrite
Open

Manchester | ITP-JAN-26 | Ofonime Edak | Sprint 3 | Coursework/sprint 3 implement and rewrite#1139
Ofonimeedak wants to merge 4 commits intoCodeYourFuture:mainfrom
Ofonimeedak:coursework/sprint-3-implement-and-rewrite

Conversation

@Ofonimeedak
Copy link

@Ofonimeedak Ofonimeedak commented Mar 3, 2026

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

Angle functions
Proper fraction file
Resolved get Card Values
Write test with assertion
Rewrite test with Jest

This PR is on writing functions and carrying out unit test using JS assertion and jest

@github-actions

This comment has been minimized.

@Ofonimeedak Ofonimeedak 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 Mar 3, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 3, 2026
@github-actions

This comment has been minimized.

@Ofonimeedak Ofonimeedak added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 3, 2026
Comment on lines +15 to +19
if(numerator>denominator) {
return false
}else{
return true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you lookup if -1/-2, 1/-2, -1/2, 1/0, -1/0 are considered proper fractions, and then update your code and tests accordingly?

Comment on lines +41 to +48
test('throws on Invalid String', () => {
expect(() => { getCardValue('A10♠');}).toThrow("Invalid String");
expect(() => { getCardValue('A');}).toThrow("Invalid String");
expect(() => { getCardValue('110♠');}).toThrow("Invalid String");
expect(() => { getCardValue(' ♠');}).toThrow("Invalid String");
expect(() => { getCardValue('eeeeeej1234');}).toThrow("Invalid String");

});
Copy link
Contributor

Choose a reason for hiding this comment

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

Does your function behave the way you expected from each of the following function calls?

getCardValue("0x02♠");
getCardValue("2.1♠");
getCardValue("0002♠");
getCardValue("22");

});

// Case 5: Reflex angles
test(`Should return "Reflex angle" when (180>angle<360)`, () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The notation (180>angle<360) is not consistent with the notation used on line 23.

});

// Case 6: Invalid angles
test(`Should return "Invalid angle" when (0 =<angle>=360)`, () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about (angle <= 0 or angle >=360)?

@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 Mar 11, 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