Skip to content

Commit 17e753a

Browse files
committed
Tests to make sure propagateTraceparent is getting passed
1 parent 797db07 commit 17e753a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/core/test/sdk.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,28 @@ describe('Tests the SDK functionality', () => {
11581158
});
11591159
});
11601160

1161+
it('propagateTraceparent is false by default', () => {
1162+
init({});
1163+
1164+
const actualOptions = usedOptions();
1165+
expect(actualOptions).toEqual(
1166+
expect.objectContaining({
1167+
propagateTraceparent: false,
1168+
})
1169+
)
1170+
});
1171+
1172+
it('propagateTraceparent is getting passed to the client', () => {
1173+
init({propagateTraceparent: true});
1174+
1175+
const actualOptions = usedOptions();
1176+
expect(actualOptions).toEqual(
1177+
expect.objectContaining({
1178+
propagateTraceparent: true,
1179+
})
1180+
)
1181+
})
1182+
11611183
function expectIntegration(name: string): void {
11621184
const actualOptions = usedOptions();
11631185
const actualIntegrations = actualOptions?.integrations;

0 commit comments

Comments
 (0)