1
1
/* eslint-disable @typescript-eslint/unbound-method */
2
2
import { BrowserClient } from '@sentry/browser' ;
3
3
import { Hub , makeMain } from '@sentry/hub' ;
4
- import { TransactionSamplingMethod } from '@sentry/types' ;
5
4
import * as utilsModule from '@sentry/utils' ; // for mocking
6
5
import { logger } from '@sentry/utils' ;
7
6
@@ -221,7 +220,7 @@ describe('Hub', () => {
221
220
hub . startTransaction ( { name : 'dogpark' , sampled : true } ) ;
222
221
223
222
expect ( Transaction . prototype . setMetadata ) . toHaveBeenCalledWith ( {
224
- transactionSampling : { method : TransactionSamplingMethod . Explicit } ,
223
+ transactionSampling : { method : 'explicitly_set' } ,
225
224
} ) ;
226
225
} ) ;
227
226
@@ -232,7 +231,7 @@ describe('Hub', () => {
232
231
hub . startTransaction ( { name : 'dogpark' } ) ;
233
232
234
233
expect ( Transaction . prototype . setMetadata ) . toHaveBeenCalledWith ( {
235
- transactionSampling : { method : TransactionSamplingMethod . Sampler , rate : 0.1121 } ,
234
+ transactionSampling : { method : 'client_sampler' , rate : 0.1121 } ,
236
235
} ) ;
237
236
} ) ;
238
237
@@ -242,7 +241,7 @@ describe('Hub', () => {
242
241
hub . startTransaction ( { name : 'dogpark' , parentSampled : true } ) ;
243
242
244
243
expect ( Transaction . prototype . setMetadata ) . toHaveBeenCalledWith ( {
245
- transactionSampling : { method : TransactionSamplingMethod . Inheritance } ,
244
+ transactionSampling : { method : 'inheritance' } ,
246
245
} ) ;
247
246
} ) ;
248
247
@@ -252,7 +251,7 @@ describe('Hub', () => {
252
251
hub . startTransaction ( { name : 'dogpark' } ) ;
253
252
254
253
expect ( Transaction . prototype . setMetadata ) . toHaveBeenCalledWith ( {
255
- transactionSampling : { method : TransactionSamplingMethod . Rate , rate : 0.1121 } ,
254
+ transactionSampling : { method : 'client_rate' , rate : 0.1121 } ,
256
255
} ) ;
257
256
} ) ;
258
257
} ) ;
0 commit comments