Skip to content

Commit

Permalink
[React18] Migrated test suites to accommodate changes to testing libr…
Browse files Browse the repository at this point in the history
…ary owned by obs-ai-assistant,security-solution
  • Loading branch information
eokoneyo committed Nov 21, 2024
1 parent 51a84eb commit 0106e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React, { ReactNode } from 'react';
import { QueryClient, QueryClientProvider, useQuery as _useQuery } from '@tanstack/react-query';
import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { useGetDataUsageDataStreams } from './use_get_data_streams';
import { DATA_USAGE_DATA_STREAMS_API_ROUTE } from '../../common';
import { coreMock as mockCore } from '@kbn/core/public/mocks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
* 2.0.
*/

import moment from 'moment';
import React, { ReactNode } from 'react';
import { QueryClient, QueryClientProvider, useQuery as _useQuery } from '@tanstack/react-query';
import { renderHook } from '@testing-library/react-hooks';
import { renderHook } from '@testing-library/react';
import { useGetDataUsageMetrics } from './use_get_usage_metrics';
import { DATA_USAGE_METRICS_API_ROUTE } from '../../common';
import { coreMock as mockCore } from '@kbn/core/public/mocks';
Expand Down Expand Up @@ -42,8 +41,8 @@ jest.mock('../utils/use_kibana', () => {
});

const defaultUsageMetricsRequestBody = {
from: moment().subtract(15, 'minutes').toISOString(),
to: moment().toISOString(),
from: 'now-15m',
to: 'now',
metricTypes: ['ingest_rate'],
dataStreams: ['ds-1'],
};
Expand Down

0 comments on commit 0106e2e

Please sign in to comment.