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', () => {
571
571
hub ,
572
572
) ;
573
573
574
- const hubSpy = jest . spyOn ( hub . getClient ( ) ! , 'getOptions' ) ;
575
-
576
574
const dynamicSamplingContext = transaction . getDynamicSamplingContext ( ) ;
577
575
578
- expect ( hubSpy ) . not . toHaveBeenCalled ( ) ;
579
576
expect ( dynamicSamplingContext ) . toStrictEqual ( { environment : 'myEnv' } ) ;
580
577
} ) ;
581
578
582
579
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 ,
589
584
} ,
590
- hub ,
591
- ) ;
585
+ sampled : true ,
586
+ } ) ;
592
587
593
588
const getOptionsSpy = jest . spyOn ( hub . getClient ( ) ! , 'getOptions' ) ;
594
589
@@ -598,6 +593,7 @@ describe('Span', () => {
598
593
expect ( dynamicSamplingContext ) . toStrictEqual ( {
599
594
release : '1.0.1' ,
600
595
environment : 'production' ,
596
+ sampled : 'true' ,
601
597
sample_rate : '0.56' ,
602
598
trace_id : expect . any ( String ) ,
603
599
transaction : 'tx' ,
You can’t perform that action at this time.
0 commit comments