Skip to content

Commit

Permalink
[7.x] Remove APM stacktrace snapshots (elastic#79543) (elastic#79700)
Browse files Browse the repository at this point in the history
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

* Snapshot update
  • Loading branch information
smith authored Oct 7, 2020
1 parent 8472a86 commit 7b5ef20
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2,113 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 7b5ef20

Please sign in to comment.