File tree 1 file changed +2
-4
lines changed
packages/tracing/test/browser
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -236,9 +236,8 @@ describe('BrowserTracing', () => {
236
236
describe ( 'idleTimeout' , ( ) => {
237
237
it ( 'is created by default' , ( ) => {
238
238
createBrowserTracing ( true , { routingInstrumentation : customInstrumentRouting } ) ;
239
- const mockFinish = jest . fn ( ) ;
240
239
const transaction = getActiveTransaction ( hub ) as IdleTransaction ;
241
- transaction . finish = mockFinish ;
240
+ const mockFinish = jest . spyOn ( transaction , 'finish' ) ;
242
241
243
242
const span = transaction . startChild ( ) ; // activities = 1
244
243
span . finish ( ) ; // activities = 0
@@ -252,9 +251,8 @@ describe('BrowserTracing', () => {
252
251
253
252
it ( 'can be a custom value' , ( ) => {
254
253
createBrowserTracing ( true , { idleTimeout : 2000 , routingInstrumentation : customInstrumentRouting } ) ;
255
- const mockFinish = jest . fn ( ) ;
256
254
const transaction = getActiveTransaction ( hub ) as IdleTransaction ;
257
- transaction . finish = mockFinish ;
255
+ const mockFinish = jest . spyOn ( transaction , 'finish' ) ;
258
256
259
257
const span = transaction . startChild ( ) ; // activities = 1
260
258
span . finish ( ) ; // activities = 0
You can’t perform that action at this time.
0 commit comments