London | ITP-JAN-2026 | Said Fayaz Sadat | Sprint 3 | coursework/sprint-3/implement-and-rewrite-tests#1221
Conversation
|
@cjyuan created new branch from main and transferred my work from old branch to new branch. |
Sprint-3/1-implement-and-rewrite-tests/implement/2-is-proper-fraction.js
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js
Outdated
Show resolved
Hide resolved
|
This description in the Changelist section does not quite explain what you have changed in this PR.
|
…get-value-card to test file
…id angle check in the beginning
|
Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js
Show resolved
Hide resolved
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
updated the description and specification of test and function.
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js
Outdated
Show resolved
Hide resolved
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js
Show resolved
Hide resolved
| }); | ||
|
|
||
| // Category 3: Improper fractions (numerator >= denominator) | ||
| test("should return false when numerator is greater than or equal to denominator", () => { |
There was a problem hiding this comment.
Could consider making the description more precise as:
should return false when |numerator| > |denominator|
or
should return false when abs(numerator) > abs(denominator)
There was a problem hiding this comment.
changes the description to be more precise.
There was a problem hiding this comment.
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.
Learners, PR Template
Self checklist
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