File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Sprint-3/1-implement-and-rewrite-tests/implement Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ function getAngleType(angle) {
1616 }
1717 if ( angle > 90 && angle < 180 ) {
1818 return "Obtuse angle"
19+ }
20+ if ( angle === 180 ) {
21+ return "Straight angle"
1922 }
2023 // Run the tests, work out what Case 2 is testing, and implement the required code here.
2124 // Then keep going for the other cases, one at a time.
@@ -63,6 +66,8 @@ assertEquals(obtuse,"Obtuse angle")
6366// When the angle is exactly 180 degrees,
6467// Then the function should return "Straight angle"
6568// ====> 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" )
6671
6772// Case 5: Identify Reflex Angles:
6873// 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