Update 02_repeatString/solution/repeatString-solution.spec.js

Co-authored-by: Nikita Revenco <154856872+nikitarevenco@users.noreply.github.com>
This commit is contained in:
Kumang Subba
2024-03-24 07:09:52 +02:00
committed by GitHub
parent 7a097ac960
commit 9a5cdecf5b
@@ -28,7 +28,7 @@ describe('repeatString', () => {
const number = Math.floor(Math.random() * 1000); const number = Math.floor(Math.random() * 1000);
/*The .match(/((hey))/g).length is a regex that will count the number of heys /*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 in the result, which if your function works correctly will equal the number that
was randomaly generated. */ was randomly generated. */
expect(repeatString('odin', number).match(/((odin))/g).length).toEqual( expect(repeatString('odin', number).match(/((odin))/g).length).toEqual(
number number
); );