@@ -32,6 +32,19 @@ const eventWithThirdAndFirstPartyFrames: Event = {
32
32
function : 'function' ,
33
33
lineno : 2 ,
34
34
} ,
35
+ // The following frames are native/built-in frames which should be ignored by the integration
36
+ {
37
+ function : 'Array.forEach' ,
38
+ filename : '<anonymous>' ,
39
+ abs_path : '<anonymous>' ,
40
+ in_app : true ,
41
+ } ,
42
+ {
43
+ function : 'async Promise.all' ,
44
+ filename : 'index 1' ,
45
+ abs_path : 'index 1' ,
46
+ in_app : true ,
47
+ } ,
35
48
] ,
36
49
} ,
37
50
type : 'SyntaxError' ,
@@ -51,14 +64,25 @@ const eventWithOnlyFirstPartyFrames: Event = {
51
64
colno : 1 ,
52
65
filename : __filename ,
53
66
function : 'function' ,
54
- lineno : 1 ,
55
67
} ,
56
68
{
57
- colno : 2 ,
58
69
filename : __filename ,
59
70
function : 'function' ,
60
71
lineno : 2 ,
61
72
} ,
73
+ // The following frames are native/built-in frames which should be ignored by the integration
74
+ {
75
+ function : 'Array.forEach' ,
76
+ filename : '<anonymous>' ,
77
+ abs_path : '<anonymous>' ,
78
+ in_app : true ,
79
+ } ,
80
+ {
81
+ function : 'async Promise.all' ,
82
+ filename : 'index 1' ,
83
+ abs_path : 'index 1' ,
84
+ in_app : true ,
85
+ } ,
62
86
] ,
63
87
} ,
64
88
type : 'SyntaxError' ,
@@ -86,6 +110,19 @@ const eventWithOnlyThirdPartyFrames: Event = {
86
110
function : 'function' ,
87
111
lineno : 2 ,
88
112
} ,
113
+ // The following frames are native/built-in frames which should be ignored by the integration
114
+ {
115
+ function : 'Array.forEach' ,
116
+ filename : '<anonymous>' ,
117
+ abs_path : '<anonymous>' ,
118
+ in_app : true ,
119
+ } ,
120
+ {
121
+ function : 'async Promise.all' ,
122
+ filename : 'index 1' ,
123
+ abs_path : 'index 1' ,
124
+ in_app : true ,
125
+ } ,
89
126
] ,
90
127
} ,
91
128
type : 'SyntaxError' ,
@@ -112,7 +149,7 @@ describe('ThirdPartyErrorFilter', () => {
112
149
} ) ;
113
150
114
151
describe ( 'drop-error-if-contains-third-party-frames' , ( ) => {
115
- it ( 'should keep event if there are exclusively first-party frames' , async ( ) => {
152
+ it ( 'keeps event if there are exclusively first-party frames' , async ( ) => {
116
153
const integration = thirdPartyErrorFilterIntegration ( {
117
154
behaviour : 'drop-error-if-contains-third-party-frames' ,
118
155
filterKeys : [ 'some-key' ] ,
@@ -123,7 +160,7 @@ describe('ThirdPartyErrorFilter', () => {
123
160
expect ( result ) . toBeDefined ( ) ;
124
161
} ) ;
125
162
126
- it ( 'should drop event if there is at least one third-party frame' , async ( ) => {
163
+ it ( 'drops event if there is at least one third-party frame' , async ( ) => {
127
164
const integration = thirdPartyErrorFilterIntegration ( {
128
165
behaviour : 'drop-error-if-contains-third-party-frames' ,
129
166
filterKeys : [ 'some-key' ] ,
@@ -134,7 +171,7 @@ describe('ThirdPartyErrorFilter', () => {
134
171
expect ( result ) . toBe ( null ) ;
135
172
} ) ;
136
173
137
- it ( 'should drop event if all frames are third-party frames' , async ( ) => {
174
+ it ( 'drops event if all frames are third-party frames' , async ( ) => {
138
175
const integration = thirdPartyErrorFilterIntegration ( {
139
176
behaviour : 'drop-error-if-contains-third-party-frames' ,
140
177
filterKeys : [ 'some-key' ] ,
@@ -147,7 +184,7 @@ describe('ThirdPartyErrorFilter', () => {
147
184
} ) ;
148
185
149
186
describe ( 'drop-error-if-exclusively-contains-third-party-frames' , ( ) => {
150
- it ( 'should keep event if there are exclusively first-party frames' , async ( ) => {
187
+ it ( 'keeps event if there are exclusively first-party frames' , async ( ) => {
151
188
const integration = thirdPartyErrorFilterIntegration ( {
152
189
behaviour : 'drop-error-if-exclusively-contains-third-party-frames' ,
153
190
filterKeys : [ 'some-key' ] ,
@@ -158,7 +195,7 @@ describe('ThirdPartyErrorFilter', () => {
158
195
expect ( result ) . toBeDefined ( ) ;
159
196
} ) ;
160
197
161
- it ( 'should keep event if there is at least one first-party frame' , async ( ) => {
198
+ it ( 'keeps event if there is at least one first-party frame' , async ( ) => {
162
199
const integration = thirdPartyErrorFilterIntegration ( {
163
200
behaviour : 'drop-error-if-exclusively-contains-third-party-frames' ,
164
201
filterKeys : [ 'some-key' ] ,
@@ -169,7 +206,7 @@ describe('ThirdPartyErrorFilter', () => {
169
206
expect ( result ) . toBeDefined ( ) ;
170
207
} ) ;
171
208
172
- it ( 'should drop event if all frames are third-party frames' , async ( ) => {
209
+ it ( 'drops event if all frames are third-party frames' , async ( ) => {
173
210
const integration = thirdPartyErrorFilterIntegration ( {
174
211
behaviour : 'drop-error-if-exclusively-contains-third-party-frames' ,
175
212
filterKeys : [ 'some-key' ] ,
@@ -182,7 +219,7 @@ describe('ThirdPartyErrorFilter', () => {
182
219
} ) ;
183
220
184
221
describe ( 'apply-tag-if-contains-third-party-frames' , ( ) => {
185
- it ( 'should not tag event if exclusively contains first-party frames' , async ( ) => {
222
+ it ( "doesn't tag event if exclusively contains first-party frames" , async ( ) => {
186
223
const integration = thirdPartyErrorFilterIntegration ( {
187
224
behaviour : 'apply-tag-if-contains-third-party-frames' ,
188
225
filterKeys : [ 'some-key' ] ,
@@ -193,7 +230,7 @@ describe('ThirdPartyErrorFilter', () => {
193
230
expect ( result ?. tags ?. third_party_code ) . toBeUndefined ( ) ;
194
231
} ) ;
195
232
196
- it ( 'should tag event if contains at least one third-party frame' , async ( ) => {
233
+ it ( 'tags event if contains at least one third-party frame' , async ( ) => {
197
234
const integration = thirdPartyErrorFilterIntegration ( {
198
235
behaviour : 'apply-tag-if-contains-third-party-frames' ,
199
236
filterKeys : [ 'some-key' ] ,
@@ -204,7 +241,7 @@ describe('ThirdPartyErrorFilter', () => {
204
241
expect ( result ?. tags ) . toMatchObject ( { third_party_code : true } ) ;
205
242
} ) ;
206
243
207
- it ( 'should tag event if contains exclusively third-party frames' , async ( ) => {
244
+ it ( 'tags event if contains exclusively third-party frames' , async ( ) => {
208
245
const integration = thirdPartyErrorFilterIntegration ( {
209
246
behaviour : 'apply-tag-if-contains-third-party-frames' ,
210
247
filterKeys : [ 'some-key' ] ,
@@ -217,7 +254,7 @@ describe('ThirdPartyErrorFilter', () => {
217
254
} ) ;
218
255
219
256
describe ( 'apply-tag-if-exclusively-contains-third-party-frames' , ( ) => {
220
- it ( 'should not tag event if exclusively contains first-party frames' , async ( ) => {
257
+ it ( "doesn't tag event if exclusively contains first-party frames" , async ( ) => {
221
258
const integration = thirdPartyErrorFilterIntegration ( {
222
259
behaviour : 'apply-tag-if-exclusively-contains-third-party-frames' ,
223
260
filterKeys : [ 'some-key' ] ,
@@ -228,7 +265,7 @@ describe('ThirdPartyErrorFilter', () => {
228
265
expect ( result ?. tags ?. third_party_code ) . toBeUndefined ( ) ;
229
266
} ) ;
230
267
231
- it ( 'should not tag event if contains at least one first-party frame' , async ( ) => {
268
+ it ( "doesn't tag event if contains at least one first-party frame" , async ( ) => {
232
269
const integration = thirdPartyErrorFilterIntegration ( {
233
270
behaviour : 'apply-tag-if-exclusively-contains-third-party-frames' ,
234
271
filterKeys : [ 'some-key' ] ,
@@ -239,7 +276,7 @@ describe('ThirdPartyErrorFilter', () => {
239
276
expect ( result ?. tags ?. third_party_code ) . toBeUndefined ( ) ;
240
277
} ) ;
241
278
242
- it ( 'should tag event if contains exclusively third-party frames' , async ( ) => {
279
+ it ( 'tags event if contains exclusively third-party frames' , async ( ) => {
243
280
const integration = thirdPartyErrorFilterIntegration ( {
244
281
behaviour : 'apply-tag-if-exclusively-contains-third-party-frames' ,
245
282
filterKeys : [ 'some-key' ] ,
0 commit comments