diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index 6e7ca36..33185ed 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -7,12 +7,28 @@ describe(`Function 'arrayReverse':`, () => { expect(arrayReverse).toBeInstanceOf(Function); }); - it(`should return an array`, () => {}); + it(`returns an array`, () => { + expect(arrayReverse([''])).toBeInstanceOf(Array); + }); - it(`should return an empty string - if original array consists of an empty string`, () => { - expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); + it(`returns an empty string inside array for an empty string input`, () => { + expect(arrayReverse([''])).toEqual(['']); + }); + + it(`reverses characters in a single-word array`, () => { + expect(arrayReverse(['Hello'])).toEqual(['olleH']); }); - // write more tests here + it(`reverses and restructures multi-element arrays`, () => { + expect(arrayReverse(['I', 'am', 'a', 'student!'])).toEqual([ + '!', + 'tn', + 'e', + 'dutsamaI', + ]); + }); + + it(`reverses and splits phrases correctly`, () => { + expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); + }); });