[FIX] store: change default hash function to better see changes

This commit is contained in:
Géry Debongnie
2019-04-15 16:17:39 +02:00
parent 9f77344c3a
commit 559c51a717
4 changed files with 91 additions and 84 deletions
-12
View File
@@ -5,7 +5,6 @@ import {
memoize,
debounce,
findInTree,
shallowEqual,
patch,
unpatch
} from "../src/utils";
@@ -95,17 +94,6 @@ describe("findInTree", () => {
});
});
describe("shallowEqual", () => {
test("simple comparisons", () => {
const obj1 = {};
expect(shallowEqual(obj1, obj1)).toBe(true);
expect(shallowEqual({}, {})).toBe(true);
expect(shallowEqual({ a: 1 }, {})).toBe(false);
expect(shallowEqual({ a: 1 }, { a: 1 })).toBe(true);
expect(shallowEqual({ a: 1 }, ["a"])).toBe(false);
});
});
describe("patch/unpatch", () => {
test("can monkey patch a class", () => {
class Test {