Skip to content

Conversation

@Della-Bella
Copy link

@Della-Bella Della-Bella commented Oct 22, 2025

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

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@github-actions
Copy link

Your PR's title didn't contain a known region.

Please check the expected title format, and make sure your region is in the correct place and spelled correctly.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@Della-Bella Della-Bella added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 22, 2025
@github-actions
Copy link

Your PR's title didn't contain a known region.

Please check the expected title format, and make sure your region is in the correct place and spelled correctly.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Can you update the title of this PR to make it match the format described in the PR template?

Also, there were four checkboxes and a "Changelist" section in the PR template. Can you include them in your PR description? You can copy the Markdown code in the PR template from
https://github.com/Della-Bella/Module-Structuring-and-Testing-Data/blob/coursework/sprint-3-implement-and-rewrite/.github/pull_request_template.md

Comment on lines 15 to 16
} else if (angle > 90 && angle < 180) {
return "Obtuse angle";
Copy link
Contributor

Choose a reason for hiding this comment

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

Both the else keyword and checking angle > 90 are optional.

Can you figure out why?

Copy link
Author

Choose a reason for hiding this comment

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

hello Cyjuan,
Yes now i can see the redundante. I refractored the code and took the reduntant check on the 90 angule. thank you

Comment on lines 11 to +15
if (numerator < denominator) {
return true;
return true ;
}
else {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the definition of proper fraction in mathematics:

  • isProperFraction(-4, 3) should return false
  • isProperFraction(-2, 5) should return true
  • isProperFraction(-1, 1) should return false
  • isProperFraction(-2, -3) should return true

Can you look up the definition of proper fraction and update your function accordingly?

Comment on lines +16 to +17
} else if (rank >= "2" && rank <= "9") {
return parseInt(rank);
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 return the value or behave the way you expected from each of the following function calls?

getCardValue("20♠");
getCardValue("2.1♠");
getCardValue("0002♠");

Comment on lines +26 to +45
test("returns Obtuse angle for values greater than 90 degrees and less than 180 degrees",()=>{
expect(getAngleType(120)).toEqual("Obtuse angle");
});


// Case 4: Identify Straight Angles:
// When the angle is exactly 180 degrees,
// Then the function should return "Straight angle"

test("returns Straight angle for angle === 180",() =>{
expect(getAngleType(180)).toEqual("Straight angle");
});

// Case 5: Identify Reflex Angles:
// When the angle is greater than 180 degrees and less than 360 degrees,
// Then the function should return "Reflex angle"

test("returns Reflex angle for angles > 180 && angle < 360",() =>{
expect(getAngleType(290)).toEqual("Reflex angle");
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is not very consistent.


// Case 2: Identify Improper Fractions:

test("it is a Improper Fraction",() =>{
Copy link
Contributor

Choose a reason for hiding this comment

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

The test description is not quite informative; it does not describe what the function should return or behave when the input represents an improper fraction.

Ideally, the description should help a developer figure out how to implement a function to pass all the tests.

});

// Case 3: Handle Face Cards (J, Q, K):
test ("should return Face Cards J, Q, K ", () =>{
Copy link
Contributor

Choose a reason for hiding this comment

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

What should the function return when the input represents a face card?

Comment on lines +12 to +15
test("should return number cards", () => {
const fiveofHearts = getCardValue("5♥");
expect(fiveofHearts).toEqual(5);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Here's an example of how we can specify a test for number cards.

test("should return the value of number cards (2-10)", () => {
    expect(getCardValue("2♣︎")).toEqual(2);
    expect(getCardValue("5♠")).toEqual(5);
    expect(getCardValue("10♥")).toEqual(10);
    // Note: We could also use a loop to check all values from 2 to 10.
});

Note: We could test multiple samples within each test to make the test more comprehensive.

@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 25, 2025
@github-actions
Copy link

Your PR's title didn't contain a known region.

Please check the expected title format, and make sure your region is in the correct place and spelled correctly.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

1 similar comment
@github-actions
Copy link

Your PR's title didn't contain a known region.

Please check the expected title format, and make sure your region is in the correct place and spelled correctly.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@Della-Bella Della-Bella changed the title Gislaine Della Bella| 25-ITP- SEP | Gislaine Della Bella | Sprint 3 | Implement-and-rewrite-tests London | 25-ITP-Sep | Gislaine Della Bella | Sprint 3 | Implement-and-rewrite-tests Nov 16, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

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