Skip to content

Commit 93b4f9c

Browse files
committed
fix tests
1 parent 84c4952 commit 93b4f9c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/node/test/handlers.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)