index.spec.jsx 936 B

123456789101112131415161718192021222324252627282930
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import CrashContent from 'sentry/components/events/interfaces/crashContent';
  3. import {withMeta} from 'sentry/components/events/meta/metaProxy';
  4. import {OrganizationContext} from 'sentry/views/organizationContext';
  5. describe('CrashContent', function () {
  6. const exc = TestStubs.ExceptionWithMeta({platform: 'cocoa'});
  7. const event = TestStubs.Event();
  8. const organization = TestStubs.Organization();
  9. const proxiedExc = withMeta(exc);
  10. it('renders with meta data', function () {
  11. const wrapper = render(
  12. <OrganizationContext.Provider value={organization}>
  13. <CrashContent
  14. projectId="sentry"
  15. stackView="full"
  16. stackType="original"
  17. event={event}
  18. newestFirst
  19. exception={proxiedExc.exception}
  20. />
  21. </OrganizationContext.Provider>
  22. );
  23. expect(wrapper.container).toSnapshot();
  24. });
  25. });