Merge pull request #433 from manny53365/fix-typo-in-test-case

corrected typo in the test case for 02_repeatString
This commit is contained in:
Eric Olkowski
2024-02-09 08:53:24 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ describe('repeatString', () => {
/*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 randomly generated. */ 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', () => { test.skip('works with blank strings', () => {
expect(repeatString('', 10)).toEqual(''); expect(repeatString('', 10)).toEqual('');
@@ -29,7 +29,7 @@ describe('repeatString', () => {
/*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 randomly generated. */ was randomly generated. */
expect(repeatString('hey', number).match(/((hey))/g).length).toEqual( expect(repeatString('hey', number).match(/(hey)/g).length).toEqual(
number number
); );
}); });