Summary
Add unit tests for the core utility functions that power DonFlow.
Priority targets
formatCurrency() / getCurrency() — locale-aware formatting
classifyMerchant() — merchant name → category mapping
detectCsvFormat() — auto-detection of bank CSV formats
calculateDrift() — plan vs actual variance calculation
Stack
- Vitest (already compatible with Vite)
- Testing Library for component tests (optional, separate issue)
Why
Core financial calculations must be correct. Tests prevent regressions on drift detection and currency formatting.
Summary
Add unit tests for the core utility functions that power DonFlow.
Priority targets
formatCurrency()/getCurrency()— locale-aware formattingclassifyMerchant()— merchant name → category mappingdetectCsvFormat()— auto-detection of bank CSV formatscalculateDrift()— plan vs actual variance calculationStack
Why
Core financial calculations must be correct. Tests prevent regressions on drift detection and currency formatting.