@@ -361,6 +361,7 @@ describe('Scope', () => {
361
361
const scope = new Scope ( ) ;
362
362
const span = {
363
363
fake : 'span' ,
364
+ spanContext : ( ) => ( { } ) ,
364
365
toJSON : ( ) => ( { origin : 'manual' } ) ,
365
366
} as any ;
366
367
scope . setSpan ( span ) ;
@@ -374,6 +375,7 @@ describe('Scope', () => {
374
375
const scope = new Scope ( ) ;
375
376
const span = {
376
377
fake : 'span' ,
378
+ spanContext : ( ) => ( { } ) ,
377
379
toJSON : ( ) => ( { a : 'b' } ) ,
378
380
} as any ;
379
381
scope . setSpan ( span ) ;
@@ -392,6 +394,7 @@ describe('Scope', () => {
392
394
const scope = new Scope ( ) ;
393
395
const transaction = {
394
396
fake : 'span' ,
397
+ spanContext : ( ) => ( { } ) ,
395
398
toJSON : ( ) => ( { a : 'b' } ) ,
396
399
name : 'fake transaction' ,
397
400
getDynamicSamplingContext : ( ) => ( { } ) ,
@@ -407,9 +410,15 @@ describe('Scope', () => {
407
410
test ( 'adds `transaction` tag when span on scope' , async ( ) => {
408
411
expect . assertions ( 1 ) ;
409
412
const scope = new Scope ( ) ;
410
- const transaction = { name : 'fake transaction' , getDynamicSamplingContext : ( ) => ( { } ) } ;
413
+ const transaction = {
414
+ name : 'fake transaction' ,
415
+ spanContext : ( ) => ( { } ) ,
416
+ toJSON : ( ) => ( { description : 'fake transaction' } ) ,
417
+ getDynamicSamplingContext : ( ) => ( { } ) ,
418
+ } ;
411
419
const span = {
412
420
fake : 'span' ,
421
+ spanContext : ( ) => ( { } ) ,
413
422
toJSON : ( ) => ( { a : 'b' } ) ,
414
423
transaction,
415
424
} as any ;
0 commit comments