Search: runAllTimers => runOnlyPendingTimers (#35509) (#35550)

(cherry picked from commit 8e827337ea)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-06-11 12:08:23 +02:00
committed by GitHub
co-authored by Alex Khomenko
parent 7b10cf8b87
commit ab7efc2bb6
@@ -28,7 +28,7 @@ const setup = (testProps?: Partial<Props>) => {
...testProps,
};
render(<DashboardSearch {...props} />);
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({