Skip to content

Commit 39c3a98

Browse files
koba04shuding
authored andcommitted
test: fix an act warning (#1888)
1 parent 7cef58d commit 39c3a98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/use-swr-local-mutation.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ describe('useSWR - local mutation', () => {
10991099

11001100
renderWithConfig(<Page />)
11011101
fireEvent.click(screen.getByText('mutate'))
1102-
await sleep(30)
1102+
await act(() => sleep(30))
11031103

11041104
expect(renderedData).toEqual([undefined, 'loading', 'final'])
11051105
})

0 commit comments

Comments
 (0)