@@ -369,67 +369,6 @@ describe('addRequestDataToEvent', () => {
369
369
}
370
370
} ) ;
371
371
} ) ;
372
-
373
- describe ( 'transaction property' , ( ) => {
374
- describe ( 'for transaction events' , ( ) => {
375
- beforeEach ( ( ) => {
376
- mockEvent . type = 'transaction' ;
377
- } ) ;
378
-
379
- test ( 'extracts method and full route path by default`' , ( ) => {
380
- const parsedRequest : Event = addRequestDataToEvent ( mockEvent , mockReq ) ;
381
-
382
- expect ( parsedRequest . transaction ) . toEqual ( 'POST /routerMountPath/subpath/:parameterName' ) ;
383
- } ) ;
384
-
385
- test ( 'extracts method and full path by default when mountpoint is `/`' , ( ) => {
386
- mockReq . originalUrl = mockReq . originalUrl . replace ( '/routerMountpath' , '' ) ;
387
- mockReq . baseUrl = '' ;
388
-
389
- const parsedRequest : Event = addRequestDataToEvent ( mockEvent , mockReq ) ;
390
-
391
- // `subpath/` is the full path here, because there's no router mount path
392
- expect ( parsedRequest . transaction ) . toEqual ( 'POST /subpath/:parameterName' ) ;
393
- } ) ;
394
-
395
- test ( 'fallback to method and `originalUrl` if route is missing' , ( ) => {
396
- delete mockReq . route ;
397
-
398
- const parsedRequest : Event = addRequestDataToEvent ( mockEvent , mockReq ) ;
399
-
400
- expect ( parsedRequest . transaction ) . toEqual ( 'POST /routerMountPath/subpath/specificValue' ) ;
401
- } ) ;
402
-
403
- test ( 'can extract path only instead if configured' , ( ) => {
404
- const optionsWithPathTransaction = {
405
- include : {
406
- transaction : 'path' ,
407
- } ,
408
- } as const ;
409
-
410
- const parsedRequest : Event = addRequestDataToEvent ( mockEvent , mockReq , optionsWithPathTransaction ) ;
411
-
412
- expect ( parsedRequest . transaction ) . toEqual ( '/routerMountPath/subpath/:parameterName' ) ;
413
- } ) ;
414
-
415
- test ( 'can extract handler name instead if configured' , ( ) => {
416
- const optionsWithHandlerTransaction = {
417
- include : {
418
- transaction : 'handler' ,
419
- } ,
420
- } as const ;
421
-
422
- const parsedRequest : Event = addRequestDataToEvent ( mockEvent , mockReq , optionsWithHandlerTransaction ) ;
423
-
424
- expect ( parsedRequest . transaction ) . toEqual ( 'parameterNameRouteHandler' ) ;
425
- } ) ;
426
- } ) ;
427
- it ( 'transaction is not applied to non-transaction events' , ( ) => {
428
- const parsedRequest : Event = addRequestDataToEvent ( mockEvent , mockReq ) ;
429
-
430
- expect ( parsedRequest . transaction ) . toBeUndefined ( ) ;
431
- } ) ;
432
- } ) ;
433
372
} ) ;
434
373
435
374
describe ( 'extractRequestData' , ( ) => {
0 commit comments