diff --git a/test/use-swr-local-mutation.test.tsx b/test/use-swr-local-mutation.test.tsx index 074e6427f..d3875e4ac 100644 --- a/test/use-swr-local-mutation.test.tsx +++ b/test/use-swr-local-mutation.test.tsx @@ -1099,7 +1099,7 @@ describe('useSWR - local mutation', () => { renderWithConfig() fireEvent.click(screen.getByText('mutate')) - await sleep(30) + await act(() => sleep(30)) expect(renderedData).toEqual([undefined, 'loading', 'final']) })