import { it, expect } from 'vitest' import { ledgerCellPreview } from './qaLedgerRendering' it('bounds clipped cell text without modifying full original strings or splitting Unicode', () => { const original = '测试🎵'.repeat(5000) const preview = ledgerCellPreview(original) expect([...preview].length).toBeLessThanOrEqual(401) expect(preview.endsWith('…')).toBe(true) expect(original).toBe('测试🎵'.repeat(5000)) expect(ledgerCellPreview('短问题')).toBe('短问题') })