Additional tests
This commit is contained in:
@ -16,3 +16,6 @@ test('Returns true for a promise-like object', () => {
|
||||
test('Returns false for an empty object', () => {
|
||||
expect(isPromiseLike({})).toBeFalsy();
|
||||
});
|
||||
test('Returns false for a normal function', () => {
|
||||
expect(isPromiseLike(Math.max)).toBeFalsy();
|
||||
});
|
||||
|
||||
@ -4,3 +4,9 @@ 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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user