From ac337e2538221320c7fc421e26666ff69169ce60 Mon Sep 17 00:00:00 2001 From: Gheric Speiginer Date: Wed, 15 May 2024 22:07:59 -0700 Subject: [PATCH] Update Complex.tsx --- core/src/__tests__/Complex.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/__tests__/Complex.tsx b/core/src/__tests__/Complex.tsx index 06e63d1..368c57d 100644 --- a/core/src/__tests__/Complex.tsx +++ b/core/src/__tests__/Complex.tsx @@ -228,7 +228,7 @@ test('scoped: should reinitialize when parent state changes', async () => { test('should synchronize unsubscription and reinitialization when source/store changes', async () => { const initialStore = hookstate(0); - const newStore = hookstate(1); + const newStore = hookstate(42); let renderTimes = 0; const { result, rerender } = renderHook(({ source }) => { @@ -249,7 +249,7 @@ test('should synchronize unsubscription and reinitialization when source/store c rerender({ source: newStore }); expect(renderTimes).toBe(3); - expect(result.current.get()).toBe(1); // Should reinitialize to new store's value + expect(result.current.get()).toBe(42); // Should reinitialize to new store's value }); test('local: should reinitialize when initial state changes', async () => {