Updated the test system
This commit is contained in:
9
test/call.test.js
Normal file
9
test/call.test.js
Normal file
@ -0,0 +1,9 @@
|
||||
const expect = require('expect');
|
||||
const {call} = require('./_30s.js');
|
||||
|
||||
test('call is a Function', () => {
|
||||
expect(call).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Calls function on given object', () => {
|
||||
expect(call('map', x => x * 2)([1, 2, 3])).toEqual([2, 4, 6]);
|
||||
});
|
||||
Reference in New Issue
Block a user