I think it should be 'randomly' instead of 'randomaly' on line31.
This commit is contained in:
kennotfindsymbol
2024-01-19 19:19:49 +08:00
committed by GitHub
parent b8b1ae4eda
commit e7f5d91bd1
@@ -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('hey', number).match(/((hey))/g).length).toEqual( expect(repeatString('hey', number).match(/((hey))/g).length).toEqual(
number number
); );