mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
62 lines
1.5 KiB
TypeScript
62 lines
1.5 KiB
TypeScript
import {EventFixture} from 'sentry-fixture/event';
|
|
import {ProjectFixture} from 'sentry-fixture/project';
|
|
|
|
import {render} from 'sentry-test/reactTestingLibrary';
|
|
|
|
import {CrashContent} from 'sentry/components/events/interfaces/crashContent';
|
|
import {withMeta} from 'sentry/components/events/meta/metaProxy';
|
|
import {StackType, StackView} from 'sentry/types/stacktrace';
|
|
|
|
function ExceptionWithMeta(params = {}) {
|
|
return {
|
|
level: 'error',
|
|
platform: 'python',
|
|
exception: {
|
|
values: [
|
|
{
|
|
type: 'ValueError',
|
|
value: 'python err A949AE01EBB07300D62AE0178F0944DD21F8C98C err',
|
|
module: 'exceptions',
|
|
stacktrace: {
|
|
frames: [],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
_meta: {
|
|
exception: {
|
|
values: {
|
|
0: {
|
|
value: {
|
|
'': {
|
|
len: 29,
|
|
rem: [['device_id', 'p', 11, 51]],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
...params,
|
|
};
|
|
}
|
|
|
|
describe('CrashContent', function () {
|
|
const exc = ExceptionWithMeta();
|
|
const proxiedExc = withMeta(exc);
|
|
|
|
it('renders with meta data', function () {
|
|
render(
|
|
<CrashContent
|
|
stackView={StackView.FULL}
|
|
stackType={StackType.ORIGINAL}
|
|
event={EventFixture()}
|
|
newestFirst
|
|
exception={(proxiedExc as any).exception}
|
|
projectSlug={ProjectFixture().slug}
|
|
hasHierarchicalGrouping={false}
|
|
/>
|
|
);
|
|
});
|
|
});
|