Additional tests

This commit is contained in:
Angelos Chalaris
2018-11-10 13:04:37 +02:00
parent 409f9d6c08
commit 996dcdc22d
12 changed files with 58 additions and 1 deletions

View File

@ -4,3 +4,8 @@ const {throttle} = require('./_30s.js');
test('throttle is a Function', () => {
expect(throttle).toBeInstanceOf(Function);
});
test('throttle returns a function', () => {
let throttled = throttle(x => x, 100000);
expect(throttled).toBeInstanceOf(Function);
expect(throttled(10)).toBe(undefined);
});