@@ -42,7 +42,11 @@ describe('instrumentRoutingWithDefaults', () => {
4242 it ( 'starts a pageload transaction' , ( ) => {
4343 instrumentRoutingWithDefaults ( customStartTransaction ) ;
4444 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+ } ) ;
4650 } ) ;
4751
4852 it ( 'does not start a pageload transaction if startTransactionOnPageLoad is false' , ( ) => {
@@ -58,7 +62,11 @@ describe('instrumentRoutingWithDefaults', () => {
5862
5963 it ( 'it is not created automatically' , ( ) => {
6064 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+ } ) ;
6270 } ) ;
6371
6472 it ( 'is created on location change' , ( ) => {
@@ -67,7 +75,11 @@ describe('instrumentRoutingWithDefaults', () => {
6775 expect ( addInstrumentationHandlerType ) . toBe ( 'history' ) ;
6876
6977 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+ } ) ;
7183 } ) ;
7284
7385 it ( 'is not created if startTransactionOnLocationChange is false' , ( ) => {
0 commit comments