File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,17 @@ const repeatStr = require("./repeat-str");
99// When the repeatStr function is called with these inputs,
1010// Then it should return a string that contains the original `str` repeated `count` times.
1111
12- test ( "should repeat the string count times" , ( ) => {
12+ test ( "should repeat the string count times when count is greater than 1 " , ( ) => {
1313 const str = "hello" ;
1414 const count = 3 ;
1515 expect ( repeatStr ( str , count ) ) . toEqual ( "hellohellohello" ) ;
1616} ) ;
17- test ( " should return original 'str' without repetition " , ( ) => {
17+ test ( " should return original string when count is 1 " , ( ) => {
1818 const str = "hello" ;
1919 const count = 1 ;
2020 expect ( repeatStr ( str , count ) ) . toEqual ( "hello" ) ;
2121} ) ;
22- test ( "should return empty string" , ( ) => {
22+ test ( "should return empty string when count is 0 " , ( ) => {
2323 const str = "hello" ;
2424 const count = 0 ;
2525 expect ( repeatStr ( str , count ) ) . toEqual ( "" ) ;
You can’t perform that action at this time.
0 commit comments