Skip to content

London | ITP-JAN-2026 | Said Fayaz Sadat | Sprint 3 | coursework/sprint-3/implement-and-rewrite-tests#1221

Open
fayaz551 wants to merge 20 commits intoCodeYourFuture:mainfrom
fayaz551:coursework/Sprint-3-implement-and-rewrite
Open

London | ITP-JAN-2026 | Said Fayaz Sadat | Sprint 3 | coursework/sprint-3/implement-and-rewrite-tests#1221
fayaz551 wants to merge 20 commits intoCodeYourFuture:mainfrom
fayaz551:coursework/Sprint-3-implement-and-rewrite

Conversation

@fayaz551
Copy link

@fayaz551 fayaz551 commented Mar 7, 2026

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 addresses the Implement and Rewrite Tests backlog for Sprint 3. I have separated this from the main coursework branch to ensure correct validation by the GitHub bot.
Implemented functions in the implement folder to pass existing criteria.
Refactored and rewrote test suites in the rewrite-tests-with-jest folder to improve and follow Jest best practices.
Ensured all tests pass locally before submission.

Questions

n/a

@fayaz551
Copy link
Author

fayaz551 commented Mar 7, 2026

@cjyuan created new branch from main and transferred my work from old branch to new branch.

@fayaz551 fayaz551 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 7, 2026
@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 8, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Mar 8, 2026

This description in the Changelist section does not quite explain what you have changed in this PR.

fixed the branches and PR to match the acceptance criteria of Sprint-3.

@fayaz551
Copy link
Author

fayaz551 commented Mar 8, 2026

This description in the Changelist section does not quite explain what you have changed in this PR.

fixed the branches and PR to match the acceptance criteria of Sprint-3.

updated the description to explain what have I done in this PR.

@fayaz551 fayaz551 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 8, 2026
@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 8, 2026
@fayaz551 fayaz551 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 8, 2026
@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 8, 2026
@fayaz551 fayaz551 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 9, 2026
Comment on lines +41 to +56
test(`should return "Invalid angle" when angle < 1 `, () => {
expect(getAngleType(-1)).toEqual("Invalid angle");
});

test(`should return "Invalid angle" when angle > 360 `, () => {
expect(getAngleType(361)).toEqual("Invalid angle");
});

// Largest valid angle(boundary case)
test(`should return "Straight angle" when angle is the maximum valid value (360)`, () => {
expect(getAngleType(360)).toEqual("Straight angle");
});
// Smallest valid angle(boundary case)
test(`should return "Acute angle" when angle is the minimum valid value (1)`, () => {
expect(getAngleType(1)).toEqual("Acute angle");
}); No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

The "definition of angles" in these tests do not quite match the specification defined in
Sprint-3/1-implement-and-rewrite-tests/implement/1-get-angle-type.js.
Please check the specification and update these tests and the function accordingly.

Copy link
Author

Choose a reason for hiding this comment

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

updated the description and specification of test and function.

@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 9, 2026
@fayaz551 fayaz551 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 9, 2026
});

// Category 3: Improper fractions (numerator >= denominator)
test("should return false when numerator is greater than or equal to denominator", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could consider making the description more precise as:

should return false when |numerator| > |denominator|

or

should return false when abs(numerator) > abs(denominator)

Copy link
Author

Choose a reason for hiding this comment

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

changes the description to be more precise.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice update on the highlighted test description. As a general practice, when you receive review comments like this, it's helpful to check if the same improvement can be applied in other similar places. Could you take another pass through the test descriptions and update any others where the notation would help keep things concise?

I will mark this PR as complete first.

@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 10, 2026
@fayaz551 fayaz551 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 10, 2026
@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. 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

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants