From 9c0aa088c6508dab8d0294539cb24be518d7fdee Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Fri, 14 Jan 2022 17:28:55 +0100 Subject: [PATCH] test: remove flaky focus test case (#1793) --- test/use-swr-focus.test.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/use-swr-focus.test.tsx b/test/use-swr-focus.test.tsx index b27b0639d..24c2cf4ed 100644 --- a/test/use-swr-focus.test.tsx +++ b/test/use-swr-focus.test.tsx @@ -195,11 +195,7 @@ describe('useSWR - focus', () => { await focusWindow() // wait for throttle intervals await act(() => sleep(150)) - // trigger revalidation - await focusWindow() - await waitForNextTick() - await act(() => sleep(100)) - await screen.findByText('data: 5') + await screen.findByText('data: 4') }) it('should revalidate on focus even with custom cache', async () => {