Skip to content

Commit

Permalink
test: fix an act warning (vercel#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 authored and himanshiLt committed Jun 10, 2022
1 parent 2a574e2 commit 9aaf718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/use-swr-local-mutation.test.tsx
Expand Up @@ -1099,7 +1099,7 @@ describe('useSWR - local mutation', () => {

renderWithConfig(<Page />)
fireEvent.click(screen.getByText('mutate'))
await sleep(30)
await act(() => sleep(30))

expect(renderedData).toEqual([undefined, 'loading', 'final'])
})
Expand Down

0 comments on commit 9aaf718

Please sign in to comment.