Files
30-seconds-of-code/test/size/size.test.js
2018-06-18 16:34:04 +03:00

15 lines
373 B
JavaScript

const expect = require('expect');
const size = require('./size.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)
});