Files
30-seconds-of-code/test/take/take.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

12 lines
370 B
JavaScript

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