diff --git a/src/arrayReverse.test.js b/src/arrayReverse.test.js index cf8ac47..a0c29cd 100644 --- a/src/arrayReverse.test.js +++ b/src/arrayReverse.test.js @@ -8,13 +8,28 @@ describe(`Function 'arrayReverse':`, () => { }); it(`should return an array`, () => { - + expect(arrayReverse(['1', '1', '1'])).toBeInstanceOf(Array); }); it(`should return an empty string if original array consists of an empty string`, () => { + expect(arrayReverse([''])).toEqual(['']); + }); + + it('should reverses a single word', () => { + expect(arrayReverse(['Hell0'])).toEqual(['0lleH']); + }); + + it('should reverses two words and preserves their lengths', () => { expect(arrayReverse(['Mate', 'Academy'])).toEqual(['ymed', 'acAetaM']); }); - // write more tests here + it('should correctly transforms words of different lengths', () => { + expect(arrayReverse(['I', 'am', 'a', 'student!'])) + .toEqual(['!', 'tn', 'e', 'dutsamaI']); + }); + + it('should works with digits and special characters', () => { + expect(arrayReverse(['12$', '#A!'])).toEqual(['!A#', '$21']); + }); });