@@ -14,11 +14,6 @@ test("should append 'nd' for numbers ending with 2, except those ending with 12"
1414 expect ( getOrdinalNumber ( 132 ) ) . toEqual ( "132nd" ) ;
1515} ) ;
1616
17- // In this week's prep, we started implementing getOrdinalNumber.
18- // This function takes a number as input and returns a string with the appropriate ordinal suffix ("st", "nd", "rd", "th").
19- // For example:
20- // - getOrdinalNumber(1) should return "1st"
21-
2217// Continue testing and implementing getOrdinalNumber for additional cases.
2318// Write your tests using Jest — remember to run your tests often for continual feedback.
2419test ( "should append 'rd' for numbers ending with 3, except those ending with 13" , ( ) => {
@@ -35,7 +30,7 @@ test("should append 'rd' for numbers ending with 3, except those ending with 13"
3530// Case 1: Numbers ending with 1 (but not 11)
3631// When the number ends with 1, except those ending with 11,
3732// Then the function should return a string by appending "st" to the number.
38- test ( "should append 'th' for numbers ending with 11, 12, or 13" , ( ) => {
33+ test ( "should append 'th' for special cases 11, 12, or 13" , ( ) => {
3934 expect ( getOrdinalNumber ( 11 ) ) . toEqual ( "11th" ) ;
4035 expect ( getOrdinalNumber ( 12 ) ) . toEqual ( "12th" ) ;
4136 expect ( getOrdinalNumber ( 13 ) ) . toEqual ( "13th" ) ;
0 commit comments