test: add unit and integration test suites

- Extract evaluateCondition + rule types into src/lib/rules.ts for testability
- 48 unit tests for evaluateCondition (all fields/operators) and formatCategory
- 21 integration tests for getTransactions filters and getParticipantBalances
- Vitest configs for unit (vitest.config.ts) and integration (vitest.integration.config.ts)
- setup-test-db.sh creates personal_test DB from production schema via pg_dump
- Use vi.doMock + dynamic import pattern to isolate test DB from Prisma singleton
This commit is contained in:
2026-04-01 19:59:29 +11:00
parent 7491e70a15
commit 1296555f17
12 changed files with 2036 additions and 74 deletions
+1249 -5
View File
File diff suppressed because it is too large Load Diff