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 committed Mar 12, 2022
1 parent 1bdec37 commit e734efe
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 e734efe

Please sign in to comment.