: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 { resolveLayoutMode } from './layoutMode'
describe('resolveLayoutMode', () => {
it.each([
['none', false, false, 'bare'],
['minimal', false, false, 'minimal'],
['embedded', false, false, 'embedded'],
['full', false, false, 'classic'],
['full', false, true, 'classic'],
['full', true, false, 'today-framed'],
['full', true, true, 'today-phone'],
] as const)('maps mode %s with todayRail %s and phoneLayout %s to %s', (mode, todayRail, phoneLayout, expected) => {
expect(resolveLayoutMode({ mode, todayRail, phoneLayout })).toBe(expected)
})
})