@@ -320,50 +320,6 @@ describe('Span', () => {
320
320
expect ( spanTwo . toJSON ( ) . parent_span_id ) . toEqual ( transaction . toJSON ( ) . span_id ) ;
321
321
} ) ;
322
322
} ) ;
323
-
324
- describe ( 'hub.startSpan' , ( ) => {
325
- test ( 'finish a transaction' , ( ) => {
326
- const spy = jest . spyOn ( hub as any , 'captureEvent' ) as any ;
327
- // @ts -ignore
328
- const transaction = hub . startSpan ( { name : 'test' } ) ;
329
- transaction . finish ( ) ;
330
- expect ( spy ) . toHaveBeenCalled ( ) ;
331
- expect ( spy . mock . calls [ 0 ] [ 0 ] . spans ) . toHaveLength ( 0 ) ;
332
- expect ( spy . mock . calls [ 0 ] [ 0 ] . timestamp ) . toBeTruthy ( ) ;
333
- expect ( spy . mock . calls [ 0 ] [ 0 ] . start_timestamp ) . toBeTruthy ( ) ;
334
- expect ( spy . mock . calls [ 0 ] [ 0 ] . contexts . trace ) . toEqual ( transaction . getTraceContext ( ) ) ;
335
- } ) ;
336
-
337
- test ( 'finish a transaction (deprecated way)' , ( ) => {
338
- const spy = jest . spyOn ( hub as any , 'captureEvent' ) as any ;
339
- // @ts -ignore
340
- const transaction = hub . startSpan ( { transaction : 'test' } ) ;
341
- transaction . finish ( ) ;
342
- expect ( spy ) . toHaveBeenCalled ( ) ;
343
- expect ( spy . mock . calls [ 0 ] [ 0 ] . spans ) . toHaveLength ( 0 ) ;
344
- expect ( spy . mock . calls [ 0 ] [ 0 ] . timestamp ) . toBeTruthy ( ) ;
345
- expect ( spy . mock . calls [ 0 ] [ 0 ] . start_timestamp ) . toBeTruthy ( ) ;
346
- expect ( spy . mock . calls [ 0 ] [ 0 ] . contexts . trace ) . toEqual ( transaction . getTraceContext ( ) ) ;
347
- } ) ;
348
-
349
- test ( 'startSpan with Span on the Scope should be a child' , ( ) => {
350
- const spy = jest . spyOn ( hub as any , 'captureEvent' ) as any ;
351
- const transaction = hub . startTransaction ( { name : 'test' } ) ;
352
- const child1 = transaction . startChild ( ) ;
353
- hub . configureScope ( scope => {
354
- scope . setSpan ( child1 ) ;
355
- } ) ;
356
-
357
- const child2 = hub . startSpan ( { } ) ;
358
- child1 . finish ( ) ;
359
- child2 . finish ( ) ;
360
- transaction . finish ( ) ;
361
-
362
- expect ( spy ) . toHaveBeenCalled ( ) ;
363
- expect ( spy . mock . calls [ 0 ] [ 0 ] . spans ) . toHaveLength ( 2 ) ;
364
- expect ( child2 . parentSpanId ) . toEqual ( child1 . spanId ) ;
365
- } ) ;
366
- } ) ;
367
323
} ) ;
368
324
369
325
describe ( 'getTraceContext' , ( ) => {
0 commit comments