Files
30-seconds-of-code/test/takeRight/takeRight.test.js
Angelos Chalaris 17fb304f04 Codacy issue fixes
2018-06-18 21:18:53 +03:00

13 lines
414 B
JavaScript

const expect = require('expect');
const takeRight = require('./takeRight.js');
test('takeRight is a Function', () => {
expect(takeRight).toBeInstanceOf(Function);
});
test('Returns an array with n elements removed from the end', () => {
expect(takeRight([1, 2, 3], 2)).toEqual([2, 3]);
});
test('Returns an array with n elements removed from the end', () => {
expect(takeRight([1, 2, 3])).toEqual([3]);
});