Skip to content

Commit 9cb1412

Browse files
committed
fix: types
1 parent fc09faf commit 9cb1412

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • x-pack/plugins/security_solution/public/timelines/containers

x-pack/plugins/security_solution/public/timelines/containers/index.test.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { DataLoadingState } from '@kbn/unified-data-table';
9-
import { act, waitFor, renderHook } from '@testing-library/react';
9+
import { act, renderHook } from '@testing-library/react-hooks';
1010
import type { TimelineArgs, UseTimelineEventsProps } from '.';
1111
import * as useTimelineEventsModule from '.';
1212
import { SecurityPageName } from '../../../common/constants';
@@ -16,6 +16,7 @@ import { useRouteSpy } from '../../common/utils/route/use_route_spy';
1616
import { useFetchNotes } from '../../notes/hooks/use_fetch_notes';
1717
import { useKibana } from '../../common/lib/kibana';
1818
import { getMockTimelineSearchSubscription } from '../../common/mock/mock_timeline_search_service';
19+
import { waitFor } from '@testing-library/dom';
1920

2021
const { initSortDefault, useTimelineEvents } = useTimelineEventsModule;
2122

@@ -154,7 +155,7 @@ describe('useTimelineEventsHandler', () => {
154155
});
155156

156157
test('should make events search request correctly', async () => {
157-
const { result } = renderHook<[DataLoadingState, TimelineArgs], UseTimelineEventsProps>(
158+
const { result } = renderHook<UseTimelineEventsProps, [DataLoadingState, TimelineArgs]>(
158159
(args) => useTimelineEvents(args),
159160
{
160161
initialProps: props,
@@ -188,8 +189,8 @@ describe('useTimelineEventsHandler', () => {
188189

189190
test('should mock cache for active timeline when switching page', async () => {
190191
const { result, rerender } = renderHook<
191-
[DataLoadingState, TimelineArgs],
192-
UseTimelineEventsProps
192+
UseTimelineEventsProps,
193+
[DataLoadingState, TimelineArgs]
193194
>((args) => useTimelineEvents(args), {
194195
initialProps: props,
195196
});
@@ -231,8 +232,8 @@ describe('useTimelineEventsHandler', () => {
231232

232233
test('Correlation pagination is calling search strategy when switching page', async () => {
233234
const { result, rerender } = renderHook<
234-
[DataLoadingState, TimelineArgs],
235-
UseTimelineEventsProps
235+
UseTimelineEventsProps,
236+
[DataLoadingState, TimelineArgs]
236237
>((args) => useTimelineEvents(args), {
237238
initialProps: {
238239
...props,

0 commit comments

Comments
 (0)