File tree Expand file tree Collapse file tree 2 files changed +24
-16
lines changed
core/test/lib/integrations Expand file tree Collapse file tree 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' ;
22
33import { InboundFilters , InboundFiltersOptions } from '../../../src/integrations/inboundfilters' ;
44
Original file line number Diff line number Diff line change 1+ import { Event } from '@sentry/types' ;
2+
13import { _shouldDropEvent } from '../src/dedupe' ;
24
35/** JSDoc */
46function clone < T > ( data : T ) : T {
57 return JSON . parse ( JSON . stringify ( data ) ) ;
68}
79
8- const messageEvent = {
10+ const messageEvent : Event = {
911 fingerprint : [ 'MrSnuffles' ] ,
1012 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 : [
1915 {
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+ } ,
2432 } ,
2533 ] ,
2634 } ,
2735} ;
28- const exceptionEvent = {
36+ const exceptionEvent : Event = {
2937 exception : {
3038 values : [
3139 {
@@ -70,7 +78,7 @@ describe('Dedupe', () => {
7078 it ( 'should not drop if events have same messages, but different stacktraces' , ( ) => {
7179 const eventA = clone ( messageEvent ) ;
7280 const eventB = clone ( messageEvent ) ;
73- eventB . stacktrace . frames [ 0 ] . colno = 1337 ;
81+ eventB . exception . values [ 0 ] . stacktrace . frames [ 0 ] . colno = 1337 ;
7482 expect ( _shouldDropEvent ( eventA , eventB ) ) . toBe ( false ) ;
7583 } ) ;
7684
You can’t perform that action at this time.
0 commit comments