From fc7f1fa0609ad4c958dfc6cb8425d6cfce0915ed Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 28 Jul 2021 09:55:53 +0200 Subject: [PATCH] test: add skipped test --- __tests__/storeSetup.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/__tests__/storeSetup.spec.ts b/__tests__/storeSetup.spec.ts index 24a11ef5..14d0eda7 100644 --- a/__tests__/storeSetup.spec.ts +++ b/__tests__/storeSetup.spec.ts @@ -72,6 +72,20 @@ describe('store with setup syntax', () => { expect(spy).toHaveBeenCalledTimes(1) }) + // TODO: could be fixed by using computed or getters + setters in store + it.skip('state refs can be watched', async () => { + const store = useStore() + const spy = jest.fn() + watch(() => store.name, spy) + expect(spy).not.toHaveBeenCalled() + const nameRef = ref('Ed') + store._p.state.value[store.$id].name = nameRef + // @ts-ignore + // store.$state.name = nameRef + await nextTick() + expect(spy).toHaveBeenCalledTimes(1) + }) + it('unwraps refs', () => { const name = ref('Eduardo') const counter = ref(0) -- 2.47.2