MCPcopy
hub / github.com/PostHog/posthog / useMocks

Function useMocks

frontend/src/mocks/jest.ts:7–7  ·  view source on GitHub ↗
(mocks: Mocks)

Source from the content-addressed store, hash-verified

5
6export const mswServer = setupServer(...handlers)
7export const useMocks = (mocks: Mocks): void => mswServer.use(...mocksToHandlers(mocks))
8
9window.confirm = jest.fn()
10

Calls 2

mocksToHandlersFunction · 0.90
useMethod · 0.45

Tested by 4

mockBillingFunction · 0.72
useInsightMocksFunction · 0.72
useAnnotationsMocksFunction · 0.72
testSetupFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…