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.

717 B
Raw Blame
import { experimentActorsFunnelStep } from './experimentPersonsModal'

describe('experimentActorsFunnelStep', () => {
    it.each([
        ['exposure step conversions map to step 0', 0, true, 0],
        ['exposure step drop-offs are not queryable', 0, false, null],
        ['first metric step conversions map to step 1', 1, true, 1],
        ['first metric step drop-offs map to step -1', 1, false, -1],
        ['second metric step conversions map to step 2', 2, true, 2],
        ['second metric step drop-offs map to step -2', 2, false, -2],
    ])('%s', (_name, stepIndex, converted, expected) => {
        expect(experimentActorsFunnelStep(stepIndex as number, converted as boolean)).toBe(expected)
    })
})