Additional tests

This commit is contained in:
Angelos Chalaris
2018-10-31 21:04:22 +02:00
parent abd66ccc0a
commit b123d9fe53
5 changed files with 28 additions and 0 deletions

View File

@ -10,3 +10,9 @@ test('Returns the nth element of an array.', () => {
test('Returns the nth element of an array.', () => {
expect(nthElement(['a', 'b', 'c'], -3)).toBe('a');
});
test('Returns the nth element of an array.', () => {
expect(nthElement(['a', 'b', 'c'], -1)).toBe('c');
});
test('Returns the nth element of an array.', () => {
expect(nthElement(['a', 'b', 'c'])).toBe('a');
});