From 1a52fd7ab590b5146f717fda56ccd580205bd351 Mon Sep 17 00:00:00 2001 From: diachkinainna Date: Wed, 9 Jul 2025 10:01:41 +0300 Subject: [PATCH] Solution --- src/arrayReverse.test.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index cf8ac47..392ac57 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -7,14 +7,24 @@ describe(`Function 'arrayReverse':`, () => { expect(arrayReverse).toBeInstanceOf(Function); }); - it(`should return an array`, () => { - - }); - it(`should return an empty string if original array consists of an empty string`, () => { + expect(arrayReverse([''])).toEqual(['']); + }); + + it(`should return ['ymed', 'acAetaM'] + if original array ['Mate', 'Academy']`, () => { expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); }); - // write more tests here + it(`should return ['0lleH'] + if original array ['Hell0']`, () => { + expect(arrayReverse(['Hell0'])).toEqual(['0lleH']); + }); + + it(`should return ['!', 'tn', 'e', 'dutsamaI'] + if original array ['I', 'am', 'a', 'student!']`, () => { + expect(arrayReverse(['I', 'am', 'a', 'student!'])) + .toEqual(['!', 'tn', 'e', 'dutsamaI']); + }); });