@@ -17,14 +17,14 @@ test("should repeat the string count times", () => {
1717// Given a target string `str` and a `count` equal to 1,
1818// When the repeatStr function is called with these inputs,
1919// Then it should return the original `str` without repetition.
20- test ( "should print the original string" , ( ) => {
20+ test ( "should return the original string when count is 1 " , ( ) => {
2121 expect ( repeatStr ( "Love" , 1 ) ) . toEqual ( "Love" ) ;
2222} ) ;
2323// Case: Handle count of 0:
2424// Given a target string `str` and a `count` equal to 0,
2525// When the repeatStr function is called with these inputs,
2626// Then it should return an empty string.
27- test ( "should return an empty string" , ( ) => {
27+ test ( "should return an empty string when count is 0 " , ( ) => {
2828 expect ( repeatStr ( "Love" , 0 ) ) . toEqual ( "" ) ;
2929} ) ;
3030// Case: Handle negative count:
@@ -33,4 +33,4 @@ test("should return an empty string", () => {
3333// Then it should throw an error, as negative counts are not valid.
3434test ( "should throw and error when count is a negative number" , ( ) => {
3535 expect ( ( ) => repeatStr ( "Love" , - 3 ) ) . toThrow ( "Negative counts are not valid" ) ;
36- } ) ;
36+ } ) ;
0 commit comments