:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { KafkaConsumerInterface } from '~/common/kafka/consumer'
const mockKafkaConsumer = (): jest.Mocked<KafkaConsumerInterface> => ({
connect: jest.fn().mockResolvedValue(undefined),
disconnect: jest.fn().mockResolvedValue(undefined),
isHealthy: jest.fn(),
offsetsStore: jest.fn(),
queryWatermarkOffsets: jest.fn().mockResolvedValue([0, 0]),
committedOffsets: jest.fn().mockResolvedValue([]),
getPartitionsForTopic: jest.fn().mockResolvedValue([]),
})
jest.mock('~/common/kafka/consumer', () => ({
createKafkaConsumer: jest.fn(mockKafkaConsumer),
}))