Skip to content

Commit

Permalink
tests: fix test for proxyRefs
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Sep 15, 2021
1 parent 4141622 commit aa0543c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/reactivity/__tests__/ref.spec.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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", () => {
Expand Down

0 comments on commit aa0543c

Please sign in to comment.