Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

1 import {describe,expect,it} from 'vitest';import {renderToStaticMarkup} from 'react-dom/server';import {ReportSummary} from './components';import {buildReportCsv} from './actions';
2 describe('reports UI',()=>{it('renders real totals',()=>{const html=renderToStaticMarkup(<ReportSummary summary={{count:2,totalIrr:3000,settledIrr:2000}}/>);expect(html).toContain('۳٬۰۰۰');expect(html).toContain('۲٬۰۰۰')});it('exports only supplied visible rows',()=>{const csv=buildReportCsv('t1',[{tenantId:'t1',reference:'R1',state:'SETTLED',amountIrr:100},{tenantId:'t2',reference:'OTHER',state:'SETTLED',amountIrr:999}]);expect(csv).toContain('R1');expect(csv).not.toContain('OTHER')})});