diff --git a/src/__tests__/site-apps.ts b/src/__tests__/site-apps.ts index 6fe5191bf..cba04acaa 100644 --- a/src/__tests__/site-apps.ts +++ b/src/__tests__/site-apps.ts @@ -59,11 +59,11 @@ describe('SiteApps', () => { } posthog = createPostHog(defaultConfig) - ;(posthog._addCaptureHook = jest.fn((cb) => { + posthog._addCaptureHook = jest.fn((cb) => { emitCaptureEvent = cb return removeCaptureHook - })), - (posthog.on = jest.fn()) + }) + posthog.on = jest.fn() posthog.capture = jest.fn() posthog._send_request = jest.fn().mockImplementation(({ callback }) => callback?.({ config: {} })) logger.error = jest.fn()