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

11 lines
352 B
JavaScript

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