@@ -180,16 +180,16 @@ describe('InboundFilters', () => {
180180  describe ( '_isSentryError' ,  ( )  =>  { 
181181    it ( 'should work as expected' ,  ( )  =>  { 
182182      const  eventProcessor  =  createInboundFiltersEventProcessor ( ) ; 
183-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( MESSAGE_EVENT ) ; 
184-       expect ( eventProcessor ( EXCEPTION_EVENT ) ) . toBe ( EXCEPTION_EVENT ) ; 
185-       expect ( eventProcessor ( SENTRY_EVENT ) ) . toBe ( null ) ; 
183+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( MESSAGE_EVENT ) ; 
184+       expect ( eventProcessor ( EXCEPTION_EVENT ,   { } ) ) . toBe ( EXCEPTION_EVENT ) ; 
185+       expect ( eventProcessor ( SENTRY_EVENT ,   { } ) ) . toBe ( null ) ; 
186186    } ) ; 
187187
188188    it ( 'should be configurable' ,  ( )  =>  { 
189189      const  eventProcessor  =  createInboundFiltersEventProcessor ( {  ignoreInternal : false  } ) ; 
190-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( MESSAGE_EVENT ) ; 
191-       expect ( eventProcessor ( EXCEPTION_EVENT ) ) . toBe ( EXCEPTION_EVENT ) ; 
192-       expect ( eventProcessor ( SENTRY_EVENT ) ) . toBe ( SENTRY_EVENT ) ; 
190+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( MESSAGE_EVENT ) ; 
191+       expect ( eventProcessor ( EXCEPTION_EVENT ,   { } ) ) . toBe ( EXCEPTION_EVENT ) ; 
192+       expect ( eventProcessor ( SENTRY_EVENT ,   { } ) ) . toBe ( SENTRY_EVENT ) ; 
193193    } ) ; 
194194  } ) ; 
195195
@@ -198,29 +198,29 @@ describe('InboundFilters', () => {
198198      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
199199        ignoreErrors : [ 'capture' ] , 
200200      } ) ; 
201-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( null ) ; 
201+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( null ) ; 
202202    } ) ; 
203203
204204    it ( 'string filter with exact match' ,  ( )  =>  { 
205205      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
206206        ignoreErrors : [ 'captureMessage' ] , 
207207      } ) ; 
208-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( null ) ; 
208+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( null ) ; 
209209    } ) ; 
210210
211211    it ( 'regexp filter with partial match' ,  ( )  =>  { 
212212      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
213213        ignoreErrors : [ / c a p t u r e / ] , 
214214      } ) ; 
215-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( null ) ; 
215+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( null ) ; 
216216    } ) ; 
217217
218218    it ( 'regexp filter with exact match' ,  ( )  =>  { 
219219      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
220220        ignoreErrors : [ / ^ c a p t u r e M e s s a g e $ / ] , 
221221      } ) ; 
222-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( null ) ; 
223-       expect ( eventProcessor ( MESSAGE_EVENT_2 ) ) . toBe ( MESSAGE_EVENT_2 ) ; 
222+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( null ) ; 
223+       expect ( eventProcessor ( MESSAGE_EVENT_2 ,   { } ) ) . toBe ( MESSAGE_EVENT_2 ) ; 
224224    } ) ; 
225225
226226    it ( 'prefers message when both message and exception are available' ,  ( )  =>  { 
@@ -231,42 +231,42 @@ describe('InboundFilters', () => {
231231        ...EXCEPTION_EVENT , 
232232        ...MESSAGE_EVENT , 
233233      } ; 
234-       expect ( eventProcessor ( event ) ) . toBe ( null ) ; 
234+       expect ( eventProcessor ( event ,   { } ) ) . toBe ( null ) ; 
235235    } ) ; 
236236
237237    it ( 'can use multiple filters' ,  ( )  =>  { 
238238      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
239239        ignoreErrors : [ 'captureMessage' ,  / S y n t a x E r r o r / ] , 
240240      } ) ; 
241-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( null ) ; 
242-       expect ( eventProcessor ( EXCEPTION_EVENT ) ) . toBe ( null ) ; 
241+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( null ) ; 
242+       expect ( eventProcessor ( EXCEPTION_EVENT ,   { } ) ) . toBe ( null ) ; 
243243    } ) ; 
244244
245245    it ( 'uses default filters' ,  ( )  =>  { 
246246      const  eventProcessor  =  createInboundFiltersEventProcessor ( ) ; 
247-       expect ( eventProcessor ( SCRIPT_ERROR_EVENT ) ) . toBe ( null ) ; 
247+       expect ( eventProcessor ( SCRIPT_ERROR_EVENT ,   { } ) ) . toBe ( null ) ; 
248248    } ) ; 
249249
250250    describe ( 'on exception' ,  ( )  =>  { 
251251      it ( 'uses exception data when message is unavailable' ,  ( )  =>  { 
252252        const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
253253          ignoreErrors : [ 'SyntaxError: unidentified ? at line 1337' ] , 
254254        } ) ; 
255-         expect ( eventProcessor ( EXCEPTION_EVENT ) ) . toBe ( null ) ; 
255+         expect ( eventProcessor ( EXCEPTION_EVENT ,   { } ) ) . toBe ( null ) ; 
256256      } ) ; 
257257
258258      it ( 'can match on exception value' ,  ( )  =>  { 
259259        const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
260260          ignoreErrors : [ / u n i d e n t i f i e d   \? / ] , 
261261        } ) ; 
262-         expect ( eventProcessor ( EXCEPTION_EVENT ) ) . toBe ( null ) ; 
262+         expect ( eventProcessor ( EXCEPTION_EVENT ,   { } ) ) . toBe ( null ) ; 
263263      } ) ; 
264264
265265      it ( 'can match on exception type' ,  ( )  =>  { 
266266        const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
267267          ignoreErrors : [ / ^ S y n t a x E r r o r / ] , 
268268        } ) ; 
269-         expect ( eventProcessor ( EXCEPTION_EVENT ) ) . toBe ( null ) ; 
269+         expect ( eventProcessor ( EXCEPTION_EVENT ,   { } ) ) . toBe ( null ) ; 
270270      } ) ; 
271271    } ) ; 
272272  } ) ; 
@@ -276,78 +276,78 @@ describe('InboundFilters', () => {
276276      const  eventProcessorDeny  =  createInboundFiltersEventProcessor ( { 
277277        denyUrls : [ 'https://awesome-analytics.io' ] , 
278278      } ) ; 
279-       expect ( eventProcessorDeny ( MESSAGE_EVENT_WITH_STACKTRACE ) ) . toBe ( null ) ; 
279+       expect ( eventProcessorDeny ( MESSAGE_EVENT_WITH_STACKTRACE ,   { } ) ) . toBe ( null ) ; 
280280    } ) ; 
281281
282282    it ( 'should allow denyUrls to take precedence' ,  ( )  =>  { 
283283      const  eventProcessorBoth  =  createInboundFiltersEventProcessor ( { 
284284        allowUrls : [ 'https://awesome-analytics.io' ] , 
285285        denyUrls : [ 'https://awesome-analytics.io' ] , 
286286      } ) ; 
287-       expect ( eventProcessorBoth ( MESSAGE_EVENT_WITH_STACKTRACE ) ) . toBe ( null ) ; 
287+       expect ( eventProcessorBoth ( MESSAGE_EVENT_WITH_STACKTRACE ,   { } ) ) . toBe ( null ) ; 
288288    } ) ; 
289289
290290    it ( 'should filter captured message based on its stack trace using regexp filter' ,  ( )  =>  { 
291291      const  eventProcessorDeny  =  createInboundFiltersEventProcessor ( { 
292292        denyUrls : [ / a w e s o m e - a n a l y t i c s \. i o / ] , 
293293      } ) ; 
294-       expect ( eventProcessorDeny ( MESSAGE_EVENT_WITH_STACKTRACE ) ) . toBe ( null ) ; 
294+       expect ( eventProcessorDeny ( MESSAGE_EVENT_WITH_STACKTRACE ,   { } ) ) . toBe ( null ) ; 
295295    } ) ; 
296296
297297    it ( 'should not filter captured messages with no stacktraces' ,  ( )  =>  { 
298298      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
299299        denyUrls : [ 'https://awesome-analytics.io' ] , 
300300      } ) ; 
301-       expect ( eventProcessor ( MESSAGE_EVENT ) ) . toBe ( MESSAGE_EVENT ) ; 
301+       expect ( eventProcessor ( MESSAGE_EVENT ,   { } ) ) . toBe ( MESSAGE_EVENT ) ; 
302302    } ) ; 
303303
304304    it ( 'should filter captured exception based on its stack trace using string filter' ,  ( )  =>  { 
305305      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
306306        denyUrls : [ 'https://awesome-analytics.io' ] , 
307307      } ) ; 
308-       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ) ) . toBe ( null ) ; 
308+       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ,   { } ) ) . toBe ( null ) ; 
309309    } ) ; 
310310
311311    it ( 'should filter captured exception based on its stack trace using regexp filter' ,  ( )  =>  { 
312312      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
313313        denyUrls : [ / a w e s o m e - a n a l y t i c s \. i o / ] , 
314314      } ) ; 
315-       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ) ) . toBe ( null ) ; 
315+       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ,   { } ) ) . toBe ( null ) ; 
316316    } ) ; 
317317
318318    it ( "should not filter events that don't match the filtered values" ,  ( )  =>  { 
319319      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
320320        denyUrls : [ 'some-other-domain.com' ] , 
321321      } ) ; 
322-       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ) ) . toBe ( EXCEPTION_EVENT_WITH_FRAMES ) ; 
322+       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ,   { } ) ) . toBe ( EXCEPTION_EVENT_WITH_FRAMES ) ; 
323323    } ) ; 
324324
325325    it ( 'should be able to use multiple filters' ,  ( )  =>  { 
326326      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
327327        denyUrls : [ 'some-other-domain.com' ,  / a w e s o m e - a n a l y t i c s \. i o / ] , 
328328      } ) ; 
329-       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ) ) . toBe ( null ) ; 
329+       expect ( eventProcessor ( EXCEPTION_EVENT_WITH_FRAMES ,   { } ) ) . toBe ( null ) ; 
330330    } ) ; 
331331
332332    it ( 'should not fail with malformed event event' ,  ( )  =>  { 
333333      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
334334        denyUrls : [ 'https://awesome-analytics.io' ] , 
335335      } ) ; 
336-       expect ( eventProcessor ( MALFORMED_EVENT ) ) . toBe ( MALFORMED_EVENT ) ; 
336+       expect ( eventProcessor ( MALFORMED_EVENT ,   { } ) ) . toBe ( MALFORMED_EVENT ) ; 
337337    } ) ; 
338338
339339    it ( 'should search for script names when there is an anonymous callback at the last frame' ,  ( )  =>  { 
340340      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
341341        denyUrls : [ 'https://awesome-analytics.io/some/file.js' ] , 
342342      } ) ; 
343-       expect ( eventProcessor ( MESSAGE_EVENT_WITH_ANON_LAST_FRAME ) ) . toBe ( null ) ; 
343+       expect ( eventProcessor ( MESSAGE_EVENT_WITH_ANON_LAST_FRAME ,   { } ) ) . toBe ( null ) ; 
344344    } ) ; 
345345
346346    it ( 'should search for script names when the last frame is from native code' ,  ( )  =>  { 
347347      const  eventProcessor  =  createInboundFiltersEventProcessor ( { 
348348        denyUrls : [ 'https://awesome-analytics.io/some/file.js' ] , 
349349      } ) ; 
350-       expect ( eventProcessor ( MESSAGE_EVENT_WITH_NATIVE_LAST_FRAME ) ) . toBe ( null ) ; 
350+       expect ( eventProcessor ( MESSAGE_EVENT_WITH_NATIVE_LAST_FRAME ,   { } ) ) . toBe ( null ) ; 
351351    } ) ; 
352352  } ) ; 
353353} ) ; 
0 commit comments