Skip to content

: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.

570 B
Raw Blame
import { mcpAnalyticsSetupPrompt } from './mcpAnalyticsSetupPrompt'

describe('mcpAnalyticsSetupPrompt', () => {
    it.each(['https://us.posthog.com', 'https://eu.posthog.com', 'https://analytics.example.com'])(
        'targets the selected project on %s',
        (origin) => {
            const prompt = mcpAnalyticsSetupPrompt(123, origin)
            expect(prompt).toContain(`project 123 at ${origin}`)
            expect(prompt).toContain(`${origin}/project/123/mcp-analytics/activity`)
            expect(prompt).not.toContain('/project/2/')
        }
    )
})