feat(finance): add financial disclosure publishing
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
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('<h1>年度报告</h1><p>公益项目执行情况</p>')).toBe(
|
||||
'年度报告公益项目执行情况',
|
||||
);
|
||||
expect(defaultFinancialSummary(`<p>${'财'.repeat(130)}</p>`)).toHaveLength(120);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user