diff --git a/packages/reactivity/__tests__/effect.spec.ts b/packages/reactivity/__tests__/effect.spec.ts index 9ddd8e05..ec66c2b2 100644 --- a/packages/reactivity/__tests__/effect.spec.ts +++ b/packages/reactivity/__tests__/effect.spec.ts @@ -515,6 +515,16 @@ describe('reactivity/effect', () => { expect(childSpy).toHaveBeenCalledTimes(5) }) + it('should observe json methods', () => { + let dummy = >{} + const obj = reactive>({}) + effect(() => { + dummy = JSON.parse(JSON.stringify(obj)) + }) + obj.a = 1 + expect(dummy.a).toBe(1) + }) + it('should observe class method invocations', () => { class Model { count: number