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.

581 B
Raw Blame
import { formatFreezeExposureDuration } from 'products/experiments/frontend/freezeExposureDuration'

describe('formatFreezeExposureDuration', () => {
    test.each([
        [0.5, 'a few seconds'],
        [4.9, 'a few seconds'],
        [7.4, 'about 7 seconds'],
        [9.6, 'about 10 seconds'],
        [23, 'about 25 seconds'],
        [58, 'about 1 minute'],
        [73, 'about 1 minute 10 seconds'],
        [122, 'about 2 minutes'],
    ])('%s seconds reads as "%s"', (seconds, expected) => {
        expect(formatFreezeExposureDuration(seconds)).toBe(expected)
    })
})