Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/arrayReverse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});