Skip to content

Commit f66a15a

Browse files
committed
Update: fix and test descriptions for angle type identification for clarity and readability
1 parent d375cee commit f66a15a

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
const getAngleType = require("./1-get-angle-type");
1+
const getAngleType = require("./1-get-angle-type"); // Import the function to be tested
22

33
test("should identify right angle (90°)", () => {
44
expect(getAngleType(90)).toEqual("Right angle");
55
});
66

7-
// REPLACE the comments with the tests
8-
// make your test descriptions as clear and readable as possible
9-
107
// Case 2: Identify Acute Angles:
118
// When the angle is less than 90 degrees,
129
// Then the function should return "Acute angle"
1310

11+
test("should identify Acute Angles (< 90)", () => {
12+
expect(getAngleType(45)).toEqual("Acute Angle");
13+
});
1414
// Case 3: Identify Obtuse Angles:
1515
// When the angle is greater than 90 degrees and less than 180 degrees,
1616
// Then the function should return "Obtuse angle"
17-
17+
test("should identify Obtuse angle (>90 && <180)", () => {
18+
expect(getAngleType(120)).toEqual("Obtuse angle");
19+
});
1820
// Case 4: Identify Straight Angles:
1921
// When the angle is exactly 180 degrees,
2022
// Then the function should return "Straight angle"
21-
23+
test("should identify Straight Angle (180°)", () => {
24+
expect(getAngleType(180)).toEqual("Straight angle");
25+
});
2226
// Case 5: Identify Reflex Angles:
2327
// When the angle is greater than 180 degrees and less than 360 degrees,
2428
// Then the function should return "Reflex angle"
29+
test("should identify Straight Angle (> 180 && < 360)", () => {
30+
expect(getAngleType(278)).toEqual("Reflex angle");
31+
});

0 commit comments

Comments
 (0)