mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Search: runAllTimers => runOnlyPendingTimers (#35509)
This commit is contained in:
parent
97a59a4855
commit
8e827337ea
@ -28,7 +28,7 @@ const setup = (testProps?: Partial<Props>) => {
|
|||||||
...testProps,
|
...testProps,
|
||||||
};
|
};
|
||||||
render(<DashboardSearch {...props} />);
|
render(<DashboardSearch {...props} />);
|
||||||
jest.runAllTimers();
|
jest.runOnlyPendingTimers();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,7 +63,7 @@ describe('DashboardSearch', () => {
|
|||||||
const input = await screen.findByPlaceholderText('Search dashboards by name');
|
const input = await screen.findByPlaceholderText('Search dashboards by name');
|
||||||
await act((async () => {
|
await act((async () => {
|
||||||
await fireEvent.input(input, { target: { value: 'Test' } });
|
await fireEvent.input(input, { target: { value: 'Test' } });
|
||||||
jest.runAllTimers();
|
jest.runOnlyPendingTimers();
|
||||||
}) as any);
|
}) as any);
|
||||||
|
|
||||||
expect(mockSearch).toHaveBeenCalledWith({
|
expect(mockSearch).toHaveBeenCalledWith({
|
||||||
|
Loading…
Reference in New Issue
Block a user