diff --git a/02_repeatString/repeatString.spec.js b/02_repeatString/repeatString.spec.js index cd56692..c9e8d6e 100644 --- a/02_repeatString/repeatString.spec.js +++ b/02_repeatString/repeatString.spec.js @@ -5,16 +5,16 @@ describe('repeatString', () => { expect(repeatString('hey', 3)).toEqual('heyheyhey'); }); test.skip('repeats the string many times', () => { - expect(repeatString('hey', 10)).toEqual('heyheyheyheyheyheyheyheyheyhey'); + expect(repeatString('hello', 10)).toEqual('hellohellohellohellohellohellohellohellohellohello'); }); test.skip('repeats the string 1 times', () => { - expect(repeatString('hey', 1)).toEqual('hey'); + expect(repeatString('hi', 1)).toEqual('hi'); }); test.skip('repeats the string 0 times', () => { - expect(repeatString('hey', 0)).toEqual(''); + expect(repeatString('bye', 0)).toEqual(''); }); test.skip('returns ERROR with negative numbers', () => { - expect(repeatString('hey', -1)).toEqual('ERROR'); + expect(repeatString('goodbye', -1)).toEqual('ERROR'); }); test.skip('repeats the string a random amount of times', function () { /*The number is generated by using Math.random to get a value from between @@ -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('odin', number).match(/((odin))/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 2d1b96f..1cffa2e 100644 --- a/02_repeatString/solution/repeatString-solution.spec.js +++ b/02_repeatString/solution/repeatString-solution.spec.js @@ -5,16 +5,16 @@ describe('repeatString', () => { expect(repeatString('hey', 3)).toEqual('heyheyhey'); }); test('repeats the string many times', () => { - expect(repeatString('hey', 10)).toEqual('heyheyheyheyheyheyheyheyheyhey'); + expect(repeatString('hello', 10)).toEqual('hellohellohellohellohellohellohellohellohellohello'); }); test('repeats the string 1 times', () => { - expect(repeatString('hey', 1)).toEqual('hey'); + expect(repeatString('hi', 1)).toEqual('hi'); }); test('repeats the string 0 times', () => { - expect(repeatString('hey', 0)).toEqual(''); + expect(repeatString('bye', 0)).toEqual(''); }); test('returns ERROR with negative numbers', () => { - expect(repeatString('hey', -1)).toEqual('ERROR'); + expect(repeatString('goodbye', -1)).toEqual('ERROR'); }); test('repeats the string a random amount of times', function () { /*The number is generated by using Math.random to get a value from between @@ -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('odin', number).match(/((odin))/g).length).toEqual( number ); });