diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index 6e7ca36..436b3c7 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -7,12 +7,35 @@ describe(`Function 'arrayReverse':`, () => { expect(arrayReverse).toBeInstanceOf(Function); }); - it(`should return an array`, () => {}); + it(`should return an array`, () => { + expect(arrayReverse([''])).toBeInstanceOf(Array); + }); it(`should return an empty string if original array consists of an empty string`, () => { - expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); + expect(arrayReverse([''])).toEqual(['']); + }); + + it(`should work with symbols and numbers`, () => { + expect(arrayReverse(['I', '@m', 'here', 'to', 'ch€ck'])).toEqual([ + 'k', + 'c€', + 'hcot', + 'er', + 'ehm@I', + ]); }); - // write more tests here + it(`should work with one word inside an array`, () => { + expect(arrayReverse(['Hell0'])).toEqual(['0lleH']); + }); + + it(`should respect the amount of letters in words`, () => { + expect(arrayReverse(['Good', 'sentence', 'to', 'reverse'])).toEqual([ + 'esre', + 'verotecn', + 'et', + 'nesdooG', + ]); + }); });