File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ describe('tracingHandler', () => {
290
290
291
291
sentryTracingMiddleware ( req , res , next ) ;
292
292
293
- const transaction = ( res as any ) . __sentry_transaction ;
293
+ const transaction = ( res as any ) . __sentry_transaction as Transaction ;
294
294
295
295
expect ( getPropagationContext ( ) ) . toEqual ( {
296
296
traceId : '12312012123120121231201212312012' ,
@@ -301,9 +301,10 @@ describe('tracingHandler', () => {
301
301
} ) ;
302
302
303
303
// since we have no tracesSampler defined, the default behavior (inherit if possible) applies
304
- expect ( transaction . traceId ) . toEqual ( '12312012123120121231201212312012' ) ;
305
- expect ( transaction . parentSpanId ) . toEqual ( '1121201211212012' ) ;
306
- expect ( transaction . sampled ) . toEqual ( false ) ;
304
+ expect ( transaction . spanContext ( ) . traceId ) . toEqual ( '12312012123120121231201212312012' ) ;
305
+ expect ( spanToJSON ( transaction ) . parent_span_id ) . toEqual ( '1121201211212012' ) ;
306
+ expect ( spanIsSampled ( transaction ) ) . toEqual ( false ) ;
307
+ // eslint-disable-next-line deprecation/deprecation
307
308
expect ( transaction . metadata ?. dynamicSamplingContext ) . toStrictEqual ( { } ) ;
308
309
} ) ;
309
310
You can’t perform that action at this time.
0 commit comments