File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -571,24 +571,19 @@ describe('Span', () => {
571571 hub ,
572572 ) ;
573573
574- const hubSpy = jest . spyOn ( hub . getClient ( ) ! , 'getOptions' ) ;
575-
576574 const dynamicSamplingContext = transaction . getDynamicSamplingContext ( ) ;
577575
578- expect ( hubSpy ) . not . toHaveBeenCalled ( ) ;
579576 expect ( dynamicSamplingContext ) . toStrictEqual ( { environment : 'myEnv' } ) ;
580577 } ) ;
581578
582579 test ( 'should return new DSC, if no DSC was provided during transaction creation' , ( ) => {
583- const transaction = new Transaction (
584- {
585- name : 'tx' ,
586- metadata : {
587- sampleRate : 0.56 ,
588- } ,
580+ const transaction = new Transaction ( {
581+ name : 'tx' ,
582+ metadata : {
583+ sampleRate : 0.56 ,
589584 } ,
590- hub ,
591- ) ;
585+ sampled : true ,
586+ } ) ;
592587
593588 const getOptionsSpy = jest . spyOn ( hub . getClient ( ) ! , 'getOptions' ) ;
594589
@@ -598,6 +593,7 @@ describe('Span', () => {
598593 expect ( dynamicSamplingContext ) . toStrictEqual ( {
599594 release : '1.0.1' ,
600595 environment : 'production' ,
596+ sampled : 'true' ,
601597 sample_rate : '0.56' ,
602598 trace_id : expect . any ( String ) ,
603599 transaction : 'tx' ,
You can’t perform that action at this time.
0 commit comments