Skip to content

Commit

Permalink
test: fix an act warning (#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 authored and shuding committed Apr 10, 2022
1 parent 7cef58d commit 39c3a98
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 39c3a98

Please sign in to comment.