File tree 2 files changed +24
-16
lines changed
core/test/lib/integrations
2 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 1
- import { EventProcessor , Event } from '@sentry/types' ;
1
+ import { Event , EventProcessor } from '@sentry/types' ;
2
2
3
3
import { InboundFilters , InboundFiltersOptions } from '../../../src/integrations/inboundfilters' ;
4
4
Original file line number Diff line number Diff line change
1
+ import { Event } from '@sentry/types' ;
2
+
1
3
import { _shouldDropEvent } from '../src/dedupe' ;
2
4
3
5
/** JSDoc */
4
6
function clone < T > ( data : T ) : T {
5
7
return JSON . parse ( JSON . stringify ( data ) ) ;
6
8
}
7
9
8
- const messageEvent = {
10
+ const messageEvent : Event = {
9
11
fingerprint : [ 'MrSnuffles' ] ,
10
12
message : 'PickleRick' ,
11
- stacktrace : {
12
- frames : [
13
- {
14
- colno : 1 ,
15
- filename : 'filename.js' ,
16
- function : 'function' ,
17
- lineno : 1 ,
18
- } ,
13
+ exception : {
14
+ values : [
19
15
{
20
- colno : 2 ,
21
- filename : 'filename.js' ,
22
- function : 'function' ,
23
- lineno : 2 ,
16
+ stacktrace : {
17
+ frames : [
18
+ {
19
+ colno : 1 ,
20
+ filename : 'filename.js' ,
21
+ function : 'function' ,
22
+ lineno : 1 ,
23
+ } ,
24
+ {
25
+ colno : 2 ,
26
+ filename : 'filename.js' ,
27
+ function : 'function' ,
28
+ lineno : 2 ,
29
+ } ,
30
+ ] ,
31
+ } ,
24
32
} ,
25
33
] ,
26
34
} ,
27
35
} ;
28
- const exceptionEvent = {
36
+ const exceptionEvent : Event = {
29
37
exception : {
30
38
values : [
31
39
{
@@ -70,7 +78,7 @@ describe('Dedupe', () => {
70
78
it ( 'should not drop if events have same messages, but different stacktraces' , ( ) => {
71
79
const eventA = clone ( messageEvent ) ;
72
80
const eventB = clone ( messageEvent ) ;
73
- eventB . stacktrace . frames [ 0 ] . colno = 1337 ;
81
+ eventB . exception . values [ 0 ] . stacktrace . frames [ 0 ] . colno = 1337 ;
74
82
expect ( _shouldDropEvent ( eventA , eventB ) ) . toBe ( false ) ;
75
83
} ) ;
76
84
You can’t perform that action at this time.
0 commit comments