From 8e827337ea79728914da8542f6ddcfc6cab3aa23 Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Fri, 11 Jun 2021 12:45:18 +0300 Subject: [PATCH] Search: runAllTimers => runOnlyPendingTimers (#35509) --- .../app/features/search/components/DashboardSearch.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/search/components/DashboardSearch.test.tsx b/public/app/features/search/components/DashboardSearch.test.tsx index 9130d0976bf..5941f160e8d 100644 --- a/public/app/features/search/components/DashboardSearch.test.tsx +++ b/public/app/features/search/components/DashboardSearch.test.tsx @@ -28,7 +28,7 @@ const setup = (testProps?: Partial) => { ...testProps, }; render(); - jest.runAllTimers(); + jest.runOnlyPendingTimers(); }; /** @@ -63,7 +63,7 @@ describe('DashboardSearch', () => { const input = await screen.findByPlaceholderText('Search dashboards by name'); await act((async () => { await fireEvent.input(input, { target: { value: 'Test' } }); - jest.runAllTimers(); + jest.runOnlyPendingTimers(); }) as any); expect(mockSearch).toHaveBeenCalledWith({