From 656139c64feaff7a52b1e2716c736384e32e7865 Mon Sep 17 00:00:00 2001 From: Dmytro Koriahin Date: Fri, 22 Aug 2025 16:05:54 +0300 Subject: [PATCH] add task solution --- src/arrayReverse.test.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index cf8ac47..8278ca9 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -7,14 +7,18 @@ describe(`Function 'arrayReverse':`, () => { expect(arrayReverse).toBeInstanceOf(Function); }); - it(`should return an array`, () => { - + it(`should return a reverse array`, () => { + expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); }); it(`should return an empty string if original array consists of an empty string`, () => { - expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); + expect(arrayReverse(['Mate', 'Academy', ''])) + .toEqual(['ymed', 'acAetaM', '']); }); - // write more tests here + it(`should return reverse array`, () => { + expect(arrayReverse(['I', 'am', 'a', 'student!'])) + .toEqual(['!', 'tn', 'e', 'dutsamaI']); + }); });