From 7512dd60bdd714b3b157ed7ca3c75e1c9b489b68 Mon Sep 17 00:00:00 2001 From: Manny Rodriguez Date: Thu, 8 Feb 2024 22:20:22 +0530 Subject: [PATCH] corrected typo in the test case --- 02_repeatString/repeatString.spec.js | 2 +- 02_repeatString/solution/repeatString-solution.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ); });