[REF] observer: refactor observer using proxy

closes #253
This commit is contained in:
Géry Debongnie
2019-08-20 15:34:13 +02:00
parent f9f730ab7b
commit fd0fb5be00
8 changed files with 294 additions and 347 deletions
+2 -3
View File
@@ -474,12 +474,11 @@ describe("basic use", () => {
describe("advanced state properties", () => {
test("state in the store is reference equal after mutation", async () => {
const state = {};
const mutations = {
donothing() {}
};
const store = new Store({ state, mutations });
expect(store.state).toBe(state);
const store = new Store({ state:{}, mutations });
const state = store.state;
store.commit("donothing");
expect(store.state).toBe(state);
});