62 client tests now passing across 8 test files. Handles duplicate text in
stat cards vs summary tables using getAllByText, and error states via ok:false
mock responses to trigger component-level error messages.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Export ordinal/formatCurrency/formatPayDate for direct testing. Tests cover
pure function formatting, virtual/saved rendering, preview banner, error state,
month navigation (including year wrap), bill display, remaining balance, and
gross/net amounts. Uses vi.useFakeTimers({ toFake: ['Date'] }) to control
current date without faking setTimeout (which would break RTL's waitFor).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set up Vitest for both server (Node + Supertest) and client (jsdom + React
Testing Library). Extract Express app into app.js for testability. Add example
tests covering bills validation, bills route CRUD, ThemeContext, and App nav
rendering. Update CLAUDE.md with testing docs and requirement to write tests
with features.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>