Test files linted

This commit is contained in:
Angelos Chalaris
2018-08-03 10:39:26 +03:00
parent 5ef1fab5fd
commit cc7b76d0b3
153 changed files with 754 additions and 463 deletions

View File

@ -11,8 +11,10 @@ test('Returns the maximum of an array', () => {
expect(reduceWhich([1, 3, 2], (a, b) => b - a)).toBe(3);
});
test('Returns the object with the minimum specified value in an array', () => {
expect(reduceWhich(
[{ name: 'Tom', age: 12 }, { name: 'Jack', age: 18 }, { name: 'Lucy', age: 9 }],
(a, b) => a.age - b.age
)).toEqual({name: "Lucy", age: 9});
expect(
reduceWhich(
[{ name: 'Tom', age: 12 }, { name: 'Jack', age: 18 }, { name: 'Lucy', age: 9 }],
(a, b) => a.age - b.age
)
).toEqual({ name: 'Lucy', age: 9 });
});