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

@ -5,10 +5,14 @@ test('transform is a Function', () => {
expect(transform).toBeInstanceOf(Function);
});
test('Transforms an object', () => {
expect(transform(
{ a: 1, b: 2, c: 1 },
(r, v, k) => {
(r[v] || (r[v] = [])).push(k);
return r;
},{})).toEqual({ '1': ['a', 'c'], '2': ['b'] });
expect(
transform(
{ a: 1, b: 2, c: 1 },
(r, v, k) => {
(r[v] || (r[v] = [])).push(k);
return r;
},
{}
)
).toEqual({ '1': ['a', 'c'], '2': ['b'] });
});