Skip to content

Commit

Permalink
fixing TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jul 10, 2020
1 parent 0a841bf commit d02e2f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 0 additions & 1 deletion x-pack/plugins/infra/public/metrics_overview_fetchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import { isFinite, isNumber, sum } from 'lodash';
import moment from 'moment';
import { FetchDataParams, MetricsFetchDataResponse } from '../../observability/public';
import {
SnapshotMetricInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as fetcherHook from '../../../../hooks/use_fetcher';
import { render } from '../../../../utils/test_helper';
import { APMSection } from './';
import { response } from './mock_data/apm.mock';
import moment from 'moment';

describe('APMSection', () => {
it('renders with transaction series and stats', () => {
Expand All @@ -18,7 +19,10 @@ describe('APMSection', () => {
});
const { getByText, queryAllByTestId } = render(
<APMSection
absoluteTime={{ start: '2020-06-29T11:38:23.747Z', end: '2020-06-29T12:08:23.748Z' }}
absoluteTime={{
start: moment('2020-06-29T11:38:23.747Z').valueOf(),
end: moment('2020-06-29T12:08:23.748Z').valueOf(),
}}
relativeTime={{ start: 'now-15m', end: 'now' }}
bucketSize="60s"
/>
Expand All @@ -38,7 +42,10 @@ describe('APMSection', () => {
});
const { getByText, queryAllByText, getByTestId } = render(
<APMSection
absoluteTime={{ start: '2020-06-29T11:38:23.747Z', end: '2020-06-29T12:08:23.748Z' }}
absoluteTime={{
start: moment('2020-06-29T11:38:23.747Z').valueOf(),
end: moment('2020-06-29T12:08:23.748Z').valueOf(),
}}
relativeTime={{ start: 'now-15m', end: 'now' }}
bucketSize="60s"
/>
Expand Down
5 changes: 3 additions & 2 deletions x-pack/plugins/observability/public/data_handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { registerDataHandler, getDataHandler } from './data_handler';
import moment from 'moment';

const params = {
absoluteTime: {
start: '2020-07-02T13:25:11.629Z',
end: '2020-07-09T13:25:11.629Z',
start: moment('2020-07-02T13:25:11.629Z').valueOf(),
end: moment('2020-07-09T13:25:11.629Z').valueOf(),
},
relativeTime: {
start: 'now-15m',
Expand Down

0 comments on commit d02e2f1

Please sign in to comment.