@@ -6,21 +6,27 @@ test("should identify right angle (90°)", () => {
66 expect ( getAngleType ( 90 ) ) . toEqual ( "Right angle" ) ;
77} ) ;
88
9- // REPLACE the comments with the tests
10- // make your test descriptions as clear and readable as possible
11-
12- // Case 2: Identify Acute Angles:
13- // When the angle is less than 90 degrees,
14- // Then the function should return "Acute angle"
9+ test ( "should identify acute angle (< 90°)" , ( ) => {
10+ expect ( getAngleType ( 45 ) ) . toEqual ( "Acute angle" ) ;
11+ expect ( getAngleType ( 30 ) ) . toEqual ( "Acute angle" ) ;
12+ expect ( getAngleType ( 1 ) ) . toEqual ( " Acute angle" ) ;
13+ expect ( getAngleType ( 89 ) ) . toEqual ( "Acute angle" ) ;
14+ } ) ;
1515
16- // Case 3: Identify Obtuse Angles:
17- // When the angle is greater than 90 degrees and less than 180 degrees,
18- // Then the function should return "Obtuse angle"
16+ test ( "should identify obtuse angle (> 90° and < 180°)" , ( ) => {
17+ expect ( getAngleType ( 120 ) ) . toEqual ( "Obtuse angle" ) ;
18+ expect ( getAngleType ( 135 ) ) . toEqual ( "Obtuse angle" ) ;
19+ expect ( getAngleType ( 91 ) ) . toEqual ( "Obtuse angle" ) ;
20+ expect ( getAngleType ( 179 ) ) . toEqual ( "Obtuse angle" ) ;
21+ } ) ;
1922
20- // Case 4: Identify Straight Angles:
21- // When the angle is exactly 180 degrees,
22- // Then the function should return "Straight angle"
23+ test ( "should identify straight angle (180°)" , ( ) => {
24+ expect ( getAngleType ( 180 ) ) . toEqual ( "Straight angle" ) ;
25+ } ) ;
2326
24- // Case 5: Identify Reflex Angles:
25- // When the angle is greater than 180 degrees and less than 360 degrees,
26- // Then the function should return "Reflex angle"
27+ test ( "should identify reflex angle (> 180° and < 360°)" , ( ) => {
28+ expect ( getAngleType ( 270 ) ) . toEqual ( "Reflex angle" ) ;
29+ expect ( getAngleType ( 181 ) ) . toEqual ( "Reflex angle" ) ;
30+ expect ( getAngleType ( 359 ) ) . toEqual ( "Reflex angle" ) ;
31+ expect ( getAngleType ( 200 ) ) . toEqual ( "Reflex angle" ) ;
32+ } ) ;
0 commit comments