Test cleanup and fixes [a-b]

This commit is contained in:
Angelos Chalaris
2018-06-18 15:54:48 +03:00
parent a78f5db260
commit 026c65a5e6
151 changed files with 753 additions and 373 deletions

View File

@@ -1,10 +1,9 @@
const expect = require('expect');
const bifurcateBy = require('./bifurcateBy.js');
test('bifurcateBy is a Function', () => {
test('bifurcateBy is a Function', () => {
expect(bifurcateBy).toBeInstanceOf(Function);
});
t.deepEqual(bifurcateBy([ 'beep', 'boop', 'foo', 'bar' ], x => x[0] === 'b'), [ ['beep', 'boop', 'bar'], ['foo'] ], 'Splits the collection into two groups');
test('Splits the collection into two groups', () => {
expect(bifurcateBy([ 'beep', 'boop', 'foo', 'bar' ], x => x[0] === 'b')).toEqual([ ['beep', 'boop', 'bar'], ['foo'] ]);
});