@@ -26,13 +26,13 @@ test("should repeat the string count times", () => {
2626// Given a target string `str` and a `count` equal to 1,
2727// When the repeatStr function is called with these inputs,
2828// Then it should return the original `str` without repetition.
29- test ( "should repeat the string count times " , ( ) => {
29+ test ( "should repeat the string once " , ( ) => {
3030 const str = "hello" ;
3131 const count = 1 ;
3232 const repeatedStr = repeatStr ( str , count ) ;
3333 expect ( repeatedStr ) . toEqual ( "hello" ) ;
3434} ) ;
35- test ( "should repeat the string count times " , ( ) => {
35+ test ( "should repeat the string once " , ( ) => {
3636 const str = "codeyourfuture" ;
3737 const count = 1 ;
3838 const repeatedStr = repeatStr ( str , count ) ;
@@ -42,13 +42,13 @@ test("should repeat the string count times", () => {
4242// Given a target string `str` and a `count` equal to 0,
4343// When the repeatStr function is called with these inputs,
4444// Then it should return an empty string.
45- test ( "should repeat the string count times " , ( ) => {
45+ test ( "should return an empty string " , ( ) => {
4646 const str = "hello" ;
4747 const count = 0 ;
4848 const repeatedStr = repeatStr ( str , count ) ;
4949 expect ( repeatedStr ) . toEqual ( "" ) ;
5050} ) ;
51- test ( "should repeat the string count times " , ( ) => {
51+ test ( "should return an empty string " , ( ) => {
5252 const str = "codeyourfuture" ;
5353 const count = 0 ;
5454 const repeatedStr = repeatStr ( str , count ) ;
@@ -58,13 +58,13 @@ test("should repeat the string count times", () => {
5858// Given a target string `str` and a negative integer `count`,
5959// When the repeatStr function is called with these inputs,
6060// Then it should throw an error, as negative counts are not valid.
61- test ( "should repeat the string count times " , ( ) => {
61+ test ( "should throw an error for negative integer " , ( ) => {
6262 const str = "hello" ;
6363 const count = - 4 ;
6464 expect ( ( ) => repeatStr ( str , count ) ) . toThrow ( "Invalid count" ) ;
6565} ) ;
66- test ( "should repeat the string count times " , ( ) => {
66+ test ( "should throw an error for negative integer " , ( ) => {
6767 const str = "codeyourfuture" ;
6868 const count = - 1 ;
6969 expect ( ( ) => repeatStr ( str , count ) ) . toThrow ( "Invalid count" ) ;
70- } ) ;
70+ } ) ;
0 commit comments