fix: differenceBy.md --> update differenceBy.test.js

This commit is contained in:
Bejamin Schachter
2019-03-05 12:26:06 -05:00
parent 13717dbb42
commit 675d281422
2 changed files with 6 additions and 6 deletions

View File

@ -5,8 +5,8 @@ test('differenceBy is a Function', () => {
expect(differenceBy).toBeInstanceOf(Function);
});
test('Works using a native function and numbers', () => {
expect(differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([1.2]);
expect(differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor)).toEqual([1]);
});
test('Works with arrow function and objects', () => {
expect(differenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x)).toEqual([{ x: 2 }]);
expect(differenceBy([{ x: 2 }, { x: 1 }], [{ x: 1 }], v => v.x)).toEqual([2]);
});