From aa0543c33386eafdf326ccd124b9450077cff241 Mon Sep 17 00:00:00 2001 From: cuixiaorui Date: Wed, 15 Sep 2021 17:11:30 +0800 Subject: [PATCH] tests: fix test for proxyRefs --- src/reactivity/__tests__/ref.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reactivity/__tests__/ref.spec.ts b/src/reactivity/__tests__/ref.spec.ts index 529519f..e79fbe6 100644 --- a/src/reactivity/__tests__/ref.spec.ts +++ b/src/reactivity/__tests__/ref.spec.ts @@ -1,6 +1,6 @@ import { effect } from "../src/effect"; import { reactive } from "../src/reactive"; -import { isRef, proxyRefs, ref, unRef } from "../src/ref"; +import { isRef, ref, unRef,proxyRefs } from "../src/ref"; describe("ref", () => { it("should be reactive", () => { const a = ref(1); @@ -44,8 +44,9 @@ describe("ref", () => { expect(proxyUser.age).toBe(10); expect(proxyUser.name).toBe("xiaohong"); - proxyUser.age = 20; + (proxyUser as any).age = 20; expect(proxyUser.age).toBe(20); + expect(user.age.value).toBe(20); }); it("isRef", () => {