File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Sprint-3/1-implement-and-rewrite-tests/implement Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments