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.

695 B
Raw Blame
import { leadingEmoji, withoutLeadingEmoji } from './leadingEmoji'

describe('leadingEmoji', () => {
    it.each([
        ['🎉 PostHog App', '🎉', 'PostHog App'],
        ['🎉PostHog App', '🎉', 'PostHog App'],
        ['👩‍💻 Dev team', '👩‍💻', 'Dev team'],
        ['❤️ Fans', '❤️', 'Fans'],
        ['👍🏽 Thumbs', '👍🏽', 'Thumbs'],
        ['🎉', '🎉', '🎉'],
        ['PostHog 🎉', null, 'PostHog 🎉'],
        ['PostHog', null, 'PostHog'],
        ['', null, ''],
    ])('splits %j into %j and %j', (name, emoji, rest) => {
        expect(leadingEmoji(name)).toEqual(emoji)
        expect(withoutLeadingEmoji(name)).toEqual(rest)
    })
})