Skip to content

Commit

Permalink
Remove APM stacktrace snapshots (#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__.
  • Loading branch information
smith authored Oct 6, 2020
1 parent f340d71 commit bfa704d
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 bfa704d

Please sign in to comment.