From fe5a83556cca86e91936b96a1f3843d685e630b4 Mon Sep 17 00:00:00 2001 From: Viktoriia Pylypko Date: Thu, 10 Jul 2025 19:20:35 +0300 Subject: [PATCH] Solution --- src/arrayReverse.test.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index cf8ac47..e4f8eda 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -8,13 +8,20 @@ describe(`Function 'arrayReverse':`, () => { }); it(`should return an array`, () => { - + expect(Array.isArray(arrayReverse(['abc']))).toBe(true); }); - it(`should return an empty string - if original array consists of an empty string`, () => { + it(`should reverse all characters`, () => { expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); }); + it('should reverse a single word', () => { + expect(arrayReverse(['JavaScript'])).toEqual(['tpircSavaJ']); + }); + + it('should return an empty array if input is empty', () => { + expect(arrayReverse([])).toEqual([]); + }); + // write more tests here });