@@ -42,7 +42,11 @@ describe('instrumentRoutingWithDefaults', () => {
42
42
it ( 'starts a pageload transaction' , ( ) => {
43
43
instrumentRoutingWithDefaults ( customStartTransaction ) ;
44
44
expect ( customStartTransaction ) . toHaveBeenCalledTimes ( 1 ) ;
45
- expect ( customStartTransaction ) . toHaveBeenLastCalledWith ( { name : 'blank' , op : 'pageload' } ) ;
45
+ expect ( customStartTransaction ) . toHaveBeenLastCalledWith ( {
46
+ name : 'blank' ,
47
+ op : 'pageload' ,
48
+ metadata : { source : 'url' } ,
49
+ } ) ;
46
50
} ) ;
47
51
48
52
it ( 'does not start a pageload transaction if startTransactionOnPageLoad is false' , ( ) => {
@@ -58,7 +62,11 @@ describe('instrumentRoutingWithDefaults', () => {
58
62
59
63
it ( 'it is not created automatically' , ( ) => {
60
64
instrumentRoutingWithDefaults ( customStartTransaction ) ;
61
- expect ( customStartTransaction ) . not . toHaveBeenLastCalledWith ( { name : 'blank' , op : 'navigation' } ) ;
65
+ expect ( customStartTransaction ) . not . toHaveBeenLastCalledWith ( {
66
+ name : 'blank' ,
67
+ op : 'navigation' ,
68
+ metadata : { source : 'url' } ,
69
+ } ) ;
62
70
} ) ;
63
71
64
72
it ( 'is created on location change' , ( ) => {
@@ -67,7 +75,11 @@ describe('instrumentRoutingWithDefaults', () => {
67
75
expect ( addInstrumentationHandlerType ) . toBe ( 'history' ) ;
68
76
69
77
expect ( customStartTransaction ) . toHaveBeenCalledTimes ( 2 ) ;
70
- expect ( customStartTransaction ) . toHaveBeenLastCalledWith ( { name : 'blank' , op : 'navigation' } ) ;
78
+ expect ( customStartTransaction ) . toHaveBeenLastCalledWith ( {
79
+ name : 'blank' ,
80
+ op : 'navigation' ,
81
+ metadata : { source : 'url' } ,
82
+ } ) ;
71
83
} ) ;
72
84
73
85
it ( 'is not created if startTransactionOnLocationChange is false' , ( ) => {
0 commit comments