Updated the test system
This commit is contained in:
9
test/unary.test.js
Normal file
9
test/unary.test.js
Normal file
@ -0,0 +1,9 @@
|
||||
const expect = require('expect');
|
||||
const {unary} = require('./_30s.js');
|
||||
|
||||
test('unary is a Function', () => {
|
||||
expect(unary).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Discards arguments after the first one', () => {
|
||||
expect(['6', '8', '10'].map(unary(parseInt))).toEqual([6, 8, 10]);
|
||||
});
|
||||
Reference in New Issue
Block a user