We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58ecb04 commit 07a373aCopy full SHA for 07a373a
frontends/main/src/app-pages/HomePage/HomePage.test.tsx
@@ -17,10 +17,16 @@ import {
17
import invariant from "tiny-invariant"
18
import * as routes from "@/common/urls"
19
import { assertHeadings } from "ol-test-utilities"
20
-import { useFeatureFlagEnabled } from "posthog-js/react"
+import { useFeatureFlagEnabled, usePostHog } from "posthog-js/react"
21
22
jest.mock("posthog-js/react")
23
const mockedUseFeatureFlagEnabled = jest.mocked(useFeatureFlagEnabled)
24
+const mockedPostHogCapture = jest.fn()
25
+jest.mock("posthog-js/react")
26
+jest.mocked(usePostHog).mockReturnValue(
27
+ // @ts-expect-error Not mocking all of posthog
28
+ { capture: mockedPostHogCapture },
29
+)
30
31
const assertLinksTo = (
32
el: HTMLElement,
0 commit comments