File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/tracing-internal/test/browser Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -308,18 +308,20 @@ describe('BrowserTracing', () => {
308308 expect ( mockBeforeNavigation ) . toHaveBeenCalledTimes ( 1 ) ;
309309 } ) ;
310310
311- it ( 'sets transaction name source to default `custom ` if name is not changed' , ( ) => {
311+ it ( 'sets transaction name source to default `url ` if name is not changed' , ( ) => {
312312 const mockBeforeNavigation = jest . fn ( ctx => ( {
313313 ...ctx ,
314314 } ) ) ;
315315 createBrowserTracing ( true , {
316316 beforeNavigate : mockBeforeNavigation ,
317- routingInstrumentation : customInstrumentRouting ,
317+ routingInstrumentation : ( customStartTransaction : ( obj : any ) => void ) => {
318+ customStartTransaction ( { name : 'a/path' , op : 'pageload' , metadata : { source : 'url' } } ) ;
319+ } ,
318320 } ) ;
319321 const transaction = getActiveTransaction ( hub ) as IdleTransaction ;
320322 expect ( transaction ) . toBeDefined ( ) ;
321323 expect ( transaction . name ) . toBe ( 'a/path' ) ;
322- expect ( transaction . metadata . source ) . toBe ( 'custom ' ) ;
324+ expect ( transaction . metadata . source ) . toBe ( 'url ' ) ;
323325
324326 expect ( mockBeforeNavigation ) . toHaveBeenCalledTimes ( 1 ) ;
325327 } ) ;
You can’t perform that action at this time.
0 commit comments