From e08518ae110858ee47686059ddd6c6fefb9351a5 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Fri, 6 Dec 2024 13:07:10 -0600 Subject: [PATCH] Fix `act` related issues in `test/hooks/useSelector.spec.tsx` --- test/hooks/useSelector.spec.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/hooks/useSelector.spec.tsx b/test/hooks/useSelector.spec.tsx index e5ff66d51..d802e8e97 100644 --- a/test/hooks/useSelector.spec.tsx +++ b/test/hooks/useSelector.spec.tsx @@ -509,7 +509,11 @@ describe('React', () => { , ) - const doDispatch = () => normalStore.dispatch({ type: '' }) + const doDispatch = () => { + rtl.act(() => { + normalStore.dispatch({ type: '' }) + }) + } expect(doDispatch).not.toThrowError() spy.mockRestore()