Files
baserow/web-frontend/test/helpers/posthog.js

12 lines
239 B
JavaScript

import { vi } from 'vitest'
const posthog = { capture: vi.fn() }
export const providePosthog = (nuxtApp) => {
if (!('$posthog' in nuxtApp)) {
nuxtApp.provide('posthog', posthog)
}
posthog.capture.mockClear()
return posthog
}