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.

778 B
Raw Blame
import { SupportNavBadge } from 'products/conversations/frontend/components/SupportNavBadge'

import { getCustomIcon } from './customIconRegistry'

describe('customIconRegistry', () => {
    it.each<[string | undefined, boolean]>([
        ['/support', true],
        ['/support/tickets', true],
        ['/project/1/support/tickets?status=open', true],
        ['/support?status=open', true],
        ['/business-knowledge', false],
        ['/project/1/business-knowledge', false],
        ['/my-tickets', false],
        ['/support-other', false],
        [undefined, false],
    ])('only shows the Support unread count for Support links (%s)', (href, hasBadge) => {
        expect(getCustomIcon('conversations', href)).toBe(hasBadge ? SupportNavBadge : undefined)
    })
})