@@ -5,16 +5,16 @@ describe('repeatString', () => {
5
5
expect ( repeatString ( 'hey' , 3 ) ) . toEqual ( 'heyheyhey' ) ;
6
6
} ) ;
7
7
test . skip ( 'repeats the string many times' , ( ) => {
8
- expect ( repeatString ( 'hey ' , 10 ) ) . toEqual ( 'heyheyheyheyheyheyheyheyheyhey ' ) ;
8
+ expect ( repeatString ( 'hello ' , 10 ) ) . toEqual ( 'hellohellohellohellohellohellohellohellohellohello ' ) ;
9
9
} ) ;
10
10
test . skip ( 'repeats the string 1 times' , ( ) => {
11
- expect ( repeatString ( 'hey ' , 1 ) ) . toEqual ( 'hey ' ) ;
11
+ expect ( repeatString ( 'hi ' , 1 ) ) . toEqual ( 'hi ' ) ;
12
12
} ) ;
13
13
test . skip ( 'repeats the string 0 times' , ( ) => {
14
- expect ( repeatString ( 'hey ' , 0 ) ) . toEqual ( '' ) ;
14
+ expect ( repeatString ( 'bye ' , 0 ) ) . toEqual ( '' ) ;
15
15
} ) ;
16
16
test . skip ( 'returns ERROR with negative numbers' , ( ) => {
17
- expect ( repeatString ( 'hey ' , - 1 ) ) . toEqual ( 'ERROR' ) ;
17
+ expect ( repeatString ( 'goodbye ' , - 1 ) ) . toEqual ( 'ERROR' ) ;
18
18
} ) ;
19
19
test . skip ( 'repeats the string a random amount of times' , function ( ) {
20
20
/*The number is generated by using Math.random to get a value from between
@@ -29,7 +29,7 @@ describe('repeatString', () => {
29
29
/*The .match(/((hey))/g).length is a regex that will count the number of heys
30
30
in the result, which if your function works correctly will equal the number that
31
31
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 ) ;
33
33
} ) ;
34
34
test . skip ( 'works with blank strings' , ( ) => {
35
35
expect ( repeatString ( '' , 10 ) ) . toEqual ( '' ) ;
0 commit comments