Files
30-seconds-of-code/test/takeRight/takeRight.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

11 lines
380 B
JavaScript

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