diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index 6e7ca36..177a92e 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -7,12 +7,20 @@ describe(`Function 'arrayReverse':`, () => { expect(arrayReverse).toBeInstanceOf(Function); }); - it(`should return an array`, () => {}); + it(`should reverse a single word`, () => { + expect(arrayReverse(['Hell0'])).toEqual(['0lleH']); + }); - it(`should return an empty string - if original array consists of an empty string`, () => { + it(`should reverse multiple words preserving their original lengths`, () => { expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); }); - // write more tests here + it(`should handle a sentence with single letters and punctuation`, () => { + expect(arrayReverse(['I', 'am', 'a', 'student!'])).toEqual([ + '!', + 'tn', + 'e', + 'dutsamaI', + ]); + }); });