diff --git a/02_repeatString/repeatString.spec.js b/02_repeatString/repeatString.spec.js index 912ac20..cd56692 100644 --- a/02_repeatString/repeatString.spec.js +++ b/02_repeatString/repeatString.spec.js @@ -29,7 +29,7 @@ describe('repeatString', () => { /*The .match(/((hey))/g).length is a regex that will count the number of heys in the result, which if your function works correctly will equal the number that was randomly generated. */ - expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(number); + expect(repeatString('hey', number).match(/(hey)/g).length).toEqual(number); }); test.skip('works with blank strings', () => { expect(repeatString('', 10)).toEqual(''); diff --git a/02_repeatString/solution/repeatString-solution.spec.js b/02_repeatString/solution/repeatString-solution.spec.js index e50b3d9..2d1b96f 100644 --- a/02_repeatString/solution/repeatString-solution.spec.js +++ b/02_repeatString/solution/repeatString-solution.spec.js @@ -29,7 +29,7 @@ describe('repeatString', () => { /*The .match(/((hey))/g).length is a regex that will count the number of heys in the result, which if your function works correctly will equal the number that was randomly generated. */ - expect(repeatString('hey', number).match(/((hey))/g).length).toEqual( + expect(repeatString('hey', number).match(/(hey)/g).length).toEqual( number ); });