Skip to content

Commit 0a65366

Browse files
committed
Fix test
1 parent b5c94d0 commit 0a65366

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sdk/highlight-run/src/index.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ const sessionData = {
1414
sessionStartTime: new Date().getTime(),
1515
}
1616

17+
vi.mock('./client/graph/generated/operations', () => ({
18+
getSdk: () => ({
19+
initializeSession: vi.fn().mockResolvedValue({
20+
initializeSession: {
21+
secure_id: sessionData.sessionSecureID,
22+
project_id: sessionData.projectID,
23+
sampling: {},
24+
},
25+
}),
26+
}),
27+
}))
28+
1729
// Temporarily set the backendUrl to staging for all tests.
1830
const backendUrl = 'https://pub.observability.ld-stg.launchdarkly.com/'
1931

0 commit comments

Comments
 (0)