Final fixes, all tests running
This commit is contained in:
@ -5,7 +5,7 @@ test('chunk is a Function', () => {
|
||||
expect(chunk).toBeInstanceOf(Function);
|
||||
});
|
||||
test('chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] ', () => {
|
||||
expect(chunk([1, 2, 3, 4, 5], 2)).toEqual([[1,2],[3,4][5]]);
|
||||
expect(chunk([1, 2, 3, 4, 5], 2)).toEqual([[1,2],[3,4],[5]]);
|
||||
});
|
||||
test('chunk([]) returns []', () => {
|
||||
expect(chunk([])).toEqual([])
|
||||
@ -20,13 +20,13 @@ test('chunk(string, 2) returns [ st, ri, ng ]', () => {
|
||||
expect(chunk('string', 2)).toEqual( [ 'st', 'ri', 'ng' ])
|
||||
});
|
||||
test('chunk() throws an error', () => {
|
||||
expect(chunk()).toThrow();
|
||||
expect(() => {chunk();}).toThrow();
|
||||
});
|
||||
test('chunk(undefined) throws an error', () => {
|
||||
expect(chunk(undefined)).toThrow();
|
||||
expect(() => {chunk(undefined);}).toThrow();
|
||||
});
|
||||
test('chunk(null) throws an error', () => {
|
||||
expect(chunk(null)).toThrow();
|
||||
expect(() => {chunk(null);}).toThrow();
|
||||
});
|
||||
let start = new Date().getTime();
|
||||
chunk('This is a string', 2);
|
||||
|
||||
Reference in New Issue
Block a user