Skip to content

Commit 91fa9ca

Browse files
committed
updated invalid range and description in the get and angle file and reworked negative case in the proper fraction file
1 parent d7f2621 commit 91fa9ca

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎implement-and-rewrite-tests/rewrite-tests-with-jest/1-get-angle-type.test.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ test(`should return "Reflex angle" when (angle > 180 && angle < 360)`, () => {
4242
});
4343

4444
// Case 6: Invalid angles
45-
test(`should return "Invalid angle" when (angle === Invalid)`, () => {
45+
test(`should return "Invalid angle" when (angle <= 0 or angle >= 360)`, () => {
4646
// Test various invalid angles, including boundary cases
4747
expect(getAngleType(361)).toEqual("Invalid angle");
4848
expect(getAngleType(0)).toEqual("Invalid angle");
4949
expect(getAngleType(-181)).toEqual("Invalid angle");
50+
expect(getAngleType(-1)).toEqual("Invalid angle");
5051
});

‎implement-and-rewrite-tests/rewrite-tests-with-jest/2-is-proper-fraction.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test(`should return false when denominator is 2`, () => {
1818
});
1919

2020
// Special case: numerator is negative number
21-
test(`should return true when denominator is 1`, () => {
21+
test(`should return false when the negative numerator's magnitude equals the denominator)`, () => {
2222
expect(isProperFraction(-1, 1)).toEqual(false);
2323
});
2424

0 commit comments

Comments
 (0)