@@ -5,16 +5,16 @@ describe('repeatString', () => {
55 expect ( repeatString ( 'hey' , 3 ) ) . toEqual ( 'heyheyhey' ) ;
66 } ) ;
77 test . skip ( 'repeats the string many times' , ( ) => {
8- expect ( repeatString ( 'hey ' , 10 ) ) . toEqual ( 'heyheyheyheyheyheyheyheyheyhey ' ) ;
8+ expect ( repeatString ( 'hello ' , 10 ) ) . toEqual ( 'hellohellohellohellohellohellohellohellohellohello ' ) ;
99 } ) ;
1010 test . skip ( 'repeats the string 1 times' , ( ) => {
11- expect ( repeatString ( 'hey ' , 1 ) ) . toEqual ( 'hey ' ) ;
11+ expect ( repeatString ( 'hi ' , 1 ) ) . toEqual ( 'hi ' ) ;
1212 } ) ;
1313 test . skip ( 'repeats the string 0 times' , ( ) => {
14- expect ( repeatString ( 'hey ' , 0 ) ) . toEqual ( '' ) ;
14+ expect ( repeatString ( 'bye ' , 0 ) ) . toEqual ( '' ) ;
1515 } ) ;
1616 test . skip ( 'returns ERROR with negative numbers' , ( ) => {
17- expect ( repeatString ( 'hey ' , - 1 ) ) . toEqual ( 'ERROR' ) ;
17+ expect ( repeatString ( 'goodbye ' , - 1 ) ) . toEqual ( 'ERROR' ) ;
1818 } ) ;
1919 test . skip ( 'repeats the string a random amount of times' , function ( ) {
2020 /*The number is generated by using Math.random to get a value from between
@@ -29,7 +29,7 @@ describe('repeatString', () => {
2929 /*The .match(/((hey))/g).length is a regex that will count the number of heys
3030 in the result, which if your function works correctly will equal the number that
3131 was randomly generated. */
32- expect ( repeatString ( 'hey ' , number ) . match ( / ( ( h e y ) ) / g) . length ) . toEqual ( number ) ;
32+ expect ( repeatString ( 'odin ' , number ) . match ( / ( ( o d i n ) ) / g) . length ) . toEqual ( number ) ;
3333 } ) ;
3434 test . skip ( 'works with blank strings' , ( ) => {
3535 expect ( repeatString ( '' , 10 ) ) . toEqual ( '' ) ;
0 commit comments