@@ -361,6 +361,7 @@ describe('Scope', () => {
361361 const scope = new Scope ( ) ;
362362 const span = {
363363 fake : 'span' ,
364+ spanContext : ( ) => ( { } ) ,
364365 toJSON : ( ) => ( { origin : 'manual' } ) ,
365366 } as any ;
366367 scope . setSpan ( span ) ;
@@ -374,6 +375,7 @@ describe('Scope', () => {
374375 const scope = new Scope ( ) ;
375376 const span = {
376377 fake : 'span' ,
378+ spanContext : ( ) => ( { } ) ,
377379 toJSON : ( ) => ( { a : 'b' } ) ,
378380 } as any ;
379381 scope . setSpan ( span ) ;
@@ -392,6 +394,7 @@ describe('Scope', () => {
392394 const scope = new Scope ( ) ;
393395 const transaction = {
394396 fake : 'span' ,
397+ spanContext : ( ) => ( { } ) ,
395398 toJSON : ( ) => ( { a : 'b' } ) ,
396399 name : 'fake transaction' ,
397400 getDynamicSamplingContext : ( ) => ( { } ) ,
@@ -407,9 +410,15 @@ describe('Scope', () => {
407410 test ( 'adds `transaction` tag when span on scope' , async ( ) => {
408411 expect . assertions ( 1 ) ;
409412 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+ } ;
411419 const span = {
412420 fake : 'span' ,
421+ spanContext : ( ) => ( { } ) ,
413422 toJSON : ( ) => ( { a : 'b' } ) ,
414423 transaction,
415424 } as any ;
0 commit comments