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', () => {
290290
291291 sentryTracingMiddleware ( req , res , next ) ;
292292
293- const transaction = ( res as any ) . __sentry_transaction ;
293+ const transaction = ( res as any ) . __sentry_transaction as Transaction ;
294294
295295 expect ( getPropagationContext ( ) ) . toEqual ( {
296296 traceId : '12312012123120121231201212312012' ,
@@ -301,9 +301,10 @@ describe('tracingHandler', () => {
301301 } ) ;
302302
303303 // 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
307308 expect ( transaction . metadata ?. dynamicSamplingContext ) . toStrictEqual ( { } ) ;
308309 } ) ;
309310
You can’t perform that action at this time.
0 commit comments