Skip to content

Commit

Permalink
Re-apply prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
guigrpa committed Jul 20, 2020
1 parent 7cd39c9 commit 8065903
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/timm.test.js
Expand Up @@ -320,14 +320,14 @@ it('setIn: should allow unsetting an attribute', () => {
// update()
// ------------------------------------------------
it('update: with changes', () => {
const obj2 = timm.update(OBJ, 'b', val => val + 1);
const obj2 = timm.update(OBJ, 'b', (val) => val + 1);
expect(OBJ.b).toBe(2);
expect(obj2).not.toBe(OBJ);
expect(obj2.b).toBe(3);
});

it("update: should return the same object when it hasn't changed", () => {
const obj2 = timm.update(OBJ, 'b', val => val);
const obj2 = timm.update(OBJ, 'b', (val) => val);
expect(obj2).toBe(OBJ);
});

Expand All @@ -345,15 +345,15 @@ it('update: should return a new array when the first parameter is null or undefi
// updateIn()
// ------------------------------------------------
it('updateIn: with changes', () => {
const obj2 = timm.updateIn(OBJ, ['e', 'e1'], val => `${val}x`);
const obj2 = timm.updateIn(OBJ, ['e', 'e1'], (val) => `${val}x`);
expect(OBJ.e.e1).toBe('foo');
expect(obj2).not.toBe(OBJ);
expect(obj2.e.e1).toBe('foox');
expect(obj2.d).toBe(OBJ.d);
});

it("updateIn: should return the same object when it hasn't changed", () => {
const obj2 = timm.updateIn(OBJ, ['e', 'e1'], val => val);
const obj2 = timm.updateIn(OBJ, ['e', 'e1'], (val) => val);
expect(obj2).toBe(OBJ);
});

Expand Down

0 comments on commit 8065903

Please sign in to comment.