Skip to content

Commit dc90d42

Browse files
wrote test to check for obtuse angle and implemented the function to pass the test
1 parent 0ae5f4b commit dc90d42

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ function getAngleType(angle) {
1313
}
1414
if(angle<90){
1515
return "Acute angle"
16+
}
17+
if(angle>90 && angle<180){
18+
return "Obtuse angle"
1619
}
1720
// Run the tests, work out what Case 2 is testing, and implement the required code here.
1821
// Then keep going for the other cases, one at a time.
@@ -53,6 +56,7 @@ assertEquals(acute, "Acute angle");
5356
// When the angle is greater than 90 degrees and less than 180 degrees,
5457
// Then the function should return "Obtuse angle"
5558
const obtuse = getAngleType(120);
59+
assertEquals(obtuse,"Obtuse angle")
5660
// ====> write your test here, and then add a line to pass the test in the function above
5761

5862
// Case 4: Identify Straight Angles:

0 commit comments

Comments
 (0)