import { describe, expect, it } from 'vitest'; import { defaultFinancialSummary, htmlToPlainText } from './financial-document'; describe('financial document helpers', () => { it('creates a short readable summary from imported HTML', () => { expect(htmlToPlainText('
公益项目执行情况
')).toBe( '年度报告公益项目执行情况', ); expect(defaultFinancialSummary(`${'财'.repeat(130)}
`)).toHaveLength(120); }); });