Skip to content

Commit 1c30f4c

Browse files
author
kohanman
committed
Sprint 3 | Jest Test Coursework 1.1
1 parent 6d76dee commit 1c30f4c

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

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

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@ test("should identify right angle (90°)", () => {
66
expect(getAngleType(90)).toEqual("Right angle");
77
});
88

9-
// REPLACE the comments with the tests
10-
// make your test descriptions as clear and readable as possible
11-
12-
// Case 2: Identify Acute Angles:
13-
// When the angle is less than 90 degrees,
14-
// Then the function should return "Acute angle"
9+
test("should identify acute angle (<90°)", () => {
10+
expect(getAngleType(45)).toEqual("Acute angle");
11+
});
1512

16-
// Case 3: Identify Obtuse Angles:
17-
// When the angle is greater than 90 degrees and less than 180 degrees,
18-
// Then the function should return "Obtuse angle"
13+
test("should identify obtuse angle (>90°)", () => {
14+
expect(getAngleType(120)).toEqual("Obtuse angle");
15+
});
1916

20-
// Case 4: Identify Straight Angles:
21-
// When the angle is exactly 180 degrees,
22-
// Then the function should return "Straight angle"
17+
test("should identify Straight angle (180°)", () => {
18+
expect(getAngleType(180)).toEqual("Straight angle");
19+
});
2320

24-
// Case 5: Identify Reflex Angles:
25-
// When the angle is greater than 180 degrees and less than 360 degrees,
26-
// Then the function should return "Reflex angle"
21+
test("should identify Reflex angle (>180°)", () => {
22+
expect(getAngleType(240)).toEqual("Reflex angle");
23+
});

0 commit comments

Comments
 (0)