Files
30-seconds-of-code/test/mostPerformant.test.js
Angelos Chalaris 80b42c56e5 Additional tests
2018-11-07 15:16:14 +02:00

13 lines
430 B
JavaScript

const expect = require('expect');
const {mostPerformant} = require('./_30s.js');
test('mostPerformant is a Function', () => {
expect(mostPerformant).toBeInstanceOf(Function);
});
test('mostPerformant returns a number', () => {
expect(typeof mostPerformant([Math.max, Math.min])).toBe('number');
});
test('mostPerformant returns a number', () => {
expect(typeof mostPerformant([Math.max, Math.min], 10)).toBe('number');
});