From 129b9ee19ecd95b0ca579047080bc80705a83890 Mon Sep 17 00:00:00 2001 From: daiwei Date: Mon, 18 Nov 2024 11:26:37 +0800 Subject: [PATCH] chore: update test --- packages/reactivity/__tests__/reactive.spec.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/reactivity/__tests__/reactive.spec.ts b/packages/reactivity/__tests__/reactive.spec.ts index 47673ddd9..a7e71cfbd 100644 --- a/packages/reactivity/__tests__/reactive.spec.ts +++ b/packages/reactivity/__tests__/reactive.spec.ts @@ -113,14 +113,15 @@ describe('reactivity/reactive', () => { }) // #8647 - test('observing nest reactive in set', () => { + test('observing Set with reactive initial value', () => { const observed = reactive({}) const observedSet = reactive(new Set([observed])) + + expect(observedSet.has(observed)).toBe(true) expect(observedSet.size).toBe(1) - if (observedSet.has(observed)) { - // expect nothing happens - observedSet.add(observed) - } + + // expect nothing happens + observedSet.add(observed) expect(observedSet.size).toBe(1) })