diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index cf8ac47..860ca9c 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -16,5 +16,26 @@ describe(`Function 'arrayReverse':`, () => { expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); }); - // write more tests here + it(`should reverse single word`, () => { + expect(arrayReverse(['Hell0'])).toEqual(['0lleH']); + }); + + it(`should reverse multiple words preserving lengths`, () => { + expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); + + expect(arrayReverse(['I', 'am', 'a', 'student!'])) + .toEqual(['!', 'tn', 'e', 'dutsamaI']); + }); + + it(`should handle words with numbers and special characters`, () => { + expect(arrayReverse(['123', '!@#'])).toEqual(['#@!', '321']); + }); + + it(`should handle single-character words`, () => { + expect(arrayReverse(['a', 'b', 'c'])).toEqual(['c', 'b', 'a']); + }); + + it(`should handle empty strings inside array`, () => { + expect(arrayReverse(['', 'abc', ''])).toEqual(['', 'cba', '']); + }); });