import { describe, it, expect } from 'vitest'; import { stripMarkdownForCommit } from '../shared/git/git-commit-message.js'; describe('stripMarkdownForCommit', () => { it('strips fixed-set emoji prefixes (legacy bots)', () => { expect(stripMarkdownForCommit('โš ๏ธ Fix the handler')).toBe('Fix the handler'); expect(stripMarkdownForCommit('โœ… Add validation')).toBe('Add validation'); }); it('strips arbitrary extended pictographic prefix (Unicode property)', () => { // U+1F6A8 POLICE CARS REVOLVING LIGHT โ€” unlikely to be in the fixed alternation list expect(stripMarkdownForCommit('\u{1F6A8} Alert: fix null check')).toBe('Alert: fix null check'); }); it('strips ZWJ emoji sequences at start', () => { const family = '๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Family plan: update docs'; expect(stripMarkdownForCommit(family)).toBe('Family plan: update docs'); }); });