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.

729 B
Raw Blame
import type { ChatSessionStatus } from '@/model/types'
import { lightColors as colors } from '@/ui/theme'

import { sessionStatusDisplay } from './sessionStatus'

describe('session status display', () => {
    test.each<[ChatSessionStatus, string, string]>([
        ['working', 'Working', colors.blue],
        ['queued', 'Queued', colors.blue],
        ['starting', 'Starting', colors.blue],
        ['failed', 'Failed', colors.orange],
        ['completed', 'Completed', colors.tertiary],
        ['stopped', 'Stopped', colors.tertiary],
        ['idle', 'Idle', colors.tertiary],
    ])('%s shows %s', (status, label, dotColor) => {
        expect(sessionStatusDisplay(status, colors)).toEqual({ label, dotColor })
    })
})