Skip to content

Commit 1a47995

Browse files
committed
update case 4
1 parent bf6c370 commit 1a47995

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ function getAngleType(angle) {
1616
return "Acute angle";
1717
}
1818
// Then keep going for the other cases, one at a time.
19+
if (angle > 90 && angle < 180) {
20+
return "Obtuse angle";
21+
}
22+
if (angle === 180) {
23+
return "Straight angle";
24+
}
1925
}
2026

2127
// The line below allows us to load the getAngleType function into tests in other files.
@@ -60,6 +66,8 @@ assertEquals(obtuse, "Obtuse angle");
6066
// When the angle is exactly 180 degrees,
6167
// Then the function should return "Straight angle"
6268
// ====> write your test here, and then add a line to pass the test in the function above
69+
const straight = getAngleType(180);
70+
assertEquals(straight, "Straight angle");
6371

6472
// Case 5: Identify Reflex Angles:
6573
// When the angle is greater than 180 degrees and less than 360 degrees,

0 commit comments

Comments
 (0)