Skip to content

Commit 41fefac

Browse files
committed
fix test
1 parent 5c27288 commit 41fefac

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

x-pack/legacy/plugins/apm/public/components/app/TraceLink/__test__/TraceLink.test.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
import React from 'react';
76
import { render } from '@testing-library/react';
87
import { shallow } from 'enzyme';
9-
import * as urlParamsHooks from '../../../../hooks/useUrlParams';
10-
import * as hooks from '../../../../hooks/useFetcher';
8+
import React from 'react';
119
import { TraceLink } from '../';
10+
import * as hooks from '../../../../hooks/useFetcher';
11+
import * as urlParamsHooks from '../../../../hooks/useUrlParams';
1212
import { MockApmPluginContextWrapper } from '../../../../utils/testHelpers';
13-
import * as routeConfig from '../../Main/route_config';
14-
import { BreadcrumbRoute } from '../../Main/ProvideBreadcrumbs';
1513

1614
const renderOptions = { wrapper: MockApmPluginContextWrapper };
1715

18-
jest.spyOn(routeConfig, 'getRoutes').mockReturnValue([
19-
{
20-
path: '/services/:serviceName/transactions/view',
21-
name: 'transaction_name'
22-
},
23-
{
24-
path: '/traces',
25-
name: 'traces'
26-
}
27-
] as BreadcrumbRoute[]);
16+
jest.mock('../../Main/route_config', () => ({
17+
routes: [
18+
{
19+
path: '/services/:serviceName/transactions/view',
20+
name: 'transaction_name'
21+
},
22+
{
23+
path: '/traces',
24+
name: 'traces'
25+
}
26+
]
27+
}));
2828

2929
describe('TraceLink', () => {
3030
afterAll(() => {

0 commit comments

Comments
 (0)