@@ -39,8 +39,8 @@ describe('instrumentHydratedRouter', () => {
39
39
} ;
40
40
( globalThis as any ) . __reactRouterDataRouter = mockRouter ;
41
41
42
- mockPageloadSpan = { updateName : vi . fn ( ) , setAttribute : vi . fn ( ) } ;
43
- mockNavigationSpan = { updateName : vi . fn ( ) , setAttribute : vi . fn ( ) } ;
42
+ mockPageloadSpan = { updateName : vi . fn ( ) , setAttribute : vi . fn ( ) , setAttributes : vi . fn ( ) } ;
43
+ mockNavigationSpan = { updateName : vi . fn ( ) , setAttribute : vi . fn ( ) , setAttributes : vi . fn ( ) } ;
44
44
45
45
( core . getActiveSpan as any ) . mockReturnValue ( mockPageloadSpan ) ;
46
46
( core . getRootSpan as any ) . mockImplementation ( ( span : any ) => span ) ;
@@ -66,7 +66,7 @@ describe('instrumentHydratedRouter', () => {
66
66
it ( 'updates pageload transaction name if needed' , ( ) => {
67
67
instrumentHydratedRouter ( ) ;
68
68
expect ( mockPageloadSpan . updateName ) . toHaveBeenCalled ( ) ;
69
- expect ( mockPageloadSpan . setAttribute ) . toHaveBeenCalled ( ) ;
69
+ expect ( mockPageloadSpan . setAttributes ) . toHaveBeenCalled ( ) ;
70
70
} ) ;
71
71
72
72
it ( 'creates navigation transaction on navigate' , ( ) => {
@@ -89,7 +89,7 @@ describe('instrumentHydratedRouter', () => {
89
89
( core . getActiveSpan as any ) . mockReturnValue ( mockNavigationSpan ) ;
90
90
callback ( newState ) ;
91
91
expect ( mockNavigationSpan . updateName ) . toHaveBeenCalled ( ) ;
92
- expect ( mockNavigationSpan . setAttribute ) . toHaveBeenCalled ( ) ;
92
+ expect ( mockNavigationSpan . setAttributes ) . toHaveBeenCalled ( ) ;
93
93
} ) ;
94
94
95
95
it ( 'does not update navigation transaction on state change to loading' , ( ) => {
@@ -106,6 +106,6 @@ describe('instrumentHydratedRouter', () => {
106
106
( core . getActiveSpan as any ) . mockReturnValue ( mockNavigationSpan ) ;
107
107
callback ( newState ) ;
108
108
expect ( mockNavigationSpan . updateName ) . not . toHaveBeenCalled ( ) ;
109
- expect ( mockNavigationSpan . setAttribute ) . not . toHaveBeenCalled ( ) ;
109
+ expect ( mockNavigationSpan . setAttributes ) . not . toHaveBeenCalled ( ) ;
110
110
} ) ;
111
111
} ) ;
0 commit comments