Updated the test system
This commit is contained in:
12
test/size.test.js
Normal file
12
test/size.test.js
Normal file
@ -0,0 +1,12 @@
|
||||
const expect = require('expect');
|
||||
const {size} = require('./_30s.js');
|
||||
|
||||
test('size is a Function', () => {
|
||||
expect(size).toBeInstanceOf(Function);
|
||||
});
|
||||
test('Get size of arrays, objects or strings.', () => {
|
||||
expect(size([1, 2, 3, 4, 5])).toBe(5);
|
||||
});
|
||||
test('Get size of arrays, objects or strings.', () => {
|
||||
expect(size({ one: 1, two: 2, three: 3 })).toBe(3);
|
||||
});
|
||||
Reference in New Issue
Block a user