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.

837 B
Raw Blame
import { signalCardSourceLine } from './signalCardSourceLine'

describe('signalCardSourceLine', () => {
    test.each([
        ['a filed report reads as a team member', 'user_authored', 'cross_source_issue', undefined, 'Team member'],
        [
            'a scout finding names its scout',
            'signals_scout',
            'cross_source_issue',
            { skill_name: 'signals-scout-error-tracking' },
            'Scout · Error tracking',
        ],
        [
            'an unknown source falls back to its identifiers',
            'new_source',
            'some_type',
            undefined,
            'new source · some type',
        ],
    ])('%s', (_name, source_product, source_type, extra, expected) => {
        expect(signalCardSourceLine({ source_product, source_type, extra })).toBe(expected)
    })
})