File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Sprint-3/1-implement-and-rewrite-tests/implement Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ function getAngleType(angle) {
1111 if ( angle === 90 ) return "Right angle" ;
1212 if ( angle < 90 ) return "Acute angle" ;
1313 if ( angle > 90 ) && ( angle < 180 ) ) return "Obtuse angle" ;
14+ if ( angle === 180 ) return "Straight angle" ;
1415 // Run the tests, work out what Case 2 is testing, and implement the required code here.
1516 // Then keep going for the other cases, one at a time.
1617}
@@ -56,6 +57,8 @@ const obtuse = getAngleType(120);
5657// When the angle is exactly 180 degrees,
5758// Then the function should return "Straight angle"
5859// ====> write your test here, and then add a line to pass the test in the function above
60+ const straight = getAngleType ( 180 ) ;
61+ assertEquals ( straight , "Straight angle" ) ;
5962
6063// Case 5: Identify Reflex Angles:
6164// 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