Skip to content

Commit 0f23988

Browse files
committed
fix tests
1 parent f5fa7bb commit 0f23988

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/astro/test/server/meta.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { vi } from 'vitest';
44
import { getTracingMetaTags, isValidBaggageString } from '../../src/server/meta';
55

66
const mockedSpan = {
7-
toTraceparent: () => '12345678901234567890123456789012-1234567890123456-1',
7+
sampled: true,
8+
traceId: '12345678901234567890123456789012',
9+
spanId: '1234567890123456',
810
transaction: {
911
getDynamicSamplingContext: () => ({
1012
environment: 'production',
@@ -68,7 +70,9 @@ describe('getTracingMetaTags', () => {
6870
const tags = getTracingMetaTags(
6971
// @ts-expect-error - only passing a partial span object
7072
{
71-
toTraceparent: () => '12345678901234567890123456789012-1234567890123456-1',
73+
sampled: true,
74+
traceId: '12345678901234567890123456789012',
75+
spanId: '1234567890123456',
7276
transaction: undefined,
7377
},
7478
mockedScope,
@@ -89,7 +93,9 @@ describe('getTracingMetaTags', () => {
8993
const tags = getTracingMetaTags(
9094
// @ts-expect-error - only passing a partial span object
9195
{
92-
toTraceparent: () => '12345678901234567890123456789012-1234567890123456-1',
96+
sampled: true,
97+
traceId: '12345678901234567890123456789012',
98+
spanId: '1234567890123456',
9399
transaction: undefined,
94100
},
95101
mockedScope,

0 commit comments

Comments
 (0)