Skip to content

Commit ed99cda

Browse files
committed
Refactor angle type tests for clarity and completeness
1 parent 068c792 commit ed99cda

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,24 @@ test("should identify right angle (90°)", () => {
1212
// Case 2: Identify Acute Angles:
1313
// When the angle is less than 90 degrees,
1414
// Then the function should return "Acute angle"
15-
15+
test("should identify acute angle (< 90°)", () => {
16+
expect(getAngleType(89)).toEqual("Acute angle");
17+
});
1618
// Case 3: Identify Obtuse Angles:
1719
// When the angle is greater than 90 degrees and less than 180 degrees,
1820
// Then the function should return "Obtuse angle"
19-
21+
test("should identify obtuse angle (> 90° && < 180°)", () => {
22+
expect(getAngleType(91)).toEqual("Obtuse angle");
23+
});
2024
// Case 4: Identify Straight Angles:
2125
// When the angle is exactly 180 degrees,
2226
// Then the function should return "Straight angle"
23-
27+
test("should identify straight angle (180°)", () => {
28+
expect(getAngleType(180)).toEqual("Straight angle");
29+
});
2430
// Case 5: Identify Reflex Angles:
2531
// When the angle is greater than 180 degrees and less than 360 degrees,
2632
// Then the function should return "Reflex angle"
33+
test("should identify reflex angle (>180° && < 360°)", () => {
34+
expect(getAngleType(359)).toEqual("Reflex angle");
35+
});

0 commit comments

Comments
 (0)