Skip to content
/ kibana Public
forked from elastic/kibana

Commit

Permalink
Remove APM stacktrace snapshots (elastic#79543)
Browse files Browse the repository at this point in the history
* Remove APM stacktrace snapshots

These are not necessary and have caused problems for other contributors. Replace the snapshots with tests that check for errors or the structure of the results.

Move the test files out of the __test__ directory and rename the directory to __fixtures__.

# Conflicts:
#	x-pack/plugins/apm/public/components/shared/Stacktrace/__test__/__snapshots__/Stackframe.test.tsx.snap
  • Loading branch information
smith committed Oct 6, 2020
1 parent ffaa26e commit c622892
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 481 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

import React from 'react';
import { ReactWrapper, shallow } from 'enzyme';
import { Stackframe } from '../../../../../typings/es_schemas/raw/fields/stackframe';
import { mountWithTheme } from '../../../../utils/testHelpers';
import { Stackframe as StackframeComponent } from '../Stackframe';
import stacktracesMock from './stacktraces.json';
import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe';
import { mountWithTheme } from '../../../utils/testHelpers';
import { Stackframe as StackframeComponent } from './Stackframe';
import stacktracesMock from './__fixtures__/stacktraces.json';

jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => {
return {
Expand All @@ -27,8 +27,12 @@ describe('Stackframe', () => {
);
});

it('should render correctly', () => {
expect(wrapper).toMatchSnapshot();
it('renders', () => {
expect(() =>
mountWithTheme(
<StackframeComponent id="test" stackframe={stacktracesMock[0]} />
)
).not.toThrowError();
});

it('should render FrameHeading, Context and Variables', () => {
Expand Down
Loading

0 comments on commit c622892

Please sign in to comment.