Commit Graph
5 Commits
Author SHA1 Message Date
kaitranntt 84ec43430d fix: resolve test import paths and vi.mock hoisting issues
- Fix import paths (5 '../' → 4 '../' for src imports)
- Fix test-utils import path (2 '../' → 3 '../')
- Fix vi.mock hoisting by inlining mock function
- Fix mockData scope in Privacy Mode test
- Fix test assertions (getByRole → querySelector, getByText → getAllByText)
- Add barrel export for getProjectDisplayName utility
2026-01-23 16:17:23 -05:00
Joseph Mearman c5911dde38 test: add project name display tests
- Add comprehensive tests for getProjectDisplayName function
- Test various path structures including worktrees, nested projects, and edge cases
- Include regression tests for the reported bug cases
- Create separate utility file for better testability

Fixes session stats display where wrong fragments were shown
Related to: #348 (quota display), #103 (context display)
2026-01-22 07:17:38 +00:00
kaitranntt 7b80dccdd3 fix(persist): add rate limiting, tests, and code quality improvements
- Add express-rate-limit to restore endpoint (5 req/min)
- Add JSDoc documentation to RestoreMutex class
- Extract magic numbers to named constants in BackupsSection
- Add unit tests for persist-routes.ts (23 tests)
- Add unit tests for BackupsSection component (28 tests)

Addresses PR #339 code review feedback.
2026-01-14 17:59:15 -05:00
kaitranntt a011908b3c fix(ui): show min Claude quota instead of avg all models
Main quota bar now displays minimum of Claude model quotas rather
than averaging all models. Accurately reflects primary constraint.

Changes:
- Add getMinClaudeQuota() utility in utils.ts (DRY)
- Apply fix to both account-card.tsx and account-item.tsx
- Add comprehensive test suite (23 tests covering edge cases)

Before: 99% (avg of Claude 95% + Gemini 100%...)
After: 95% (min of Claude models)
2026-01-01 14:44:30 -05:00
kaitranntt 3fca9338f9 test(ui): add vitest testing infrastructure with 99 unit tests
- add vitest, jsdom, testing-library, msw dependencies
- create test setup: vitest-setup.ts, test-utils.tsx, msw-handlers.ts
- add 99 unit tests covering settings, analytics, auth-monitor utils
- configure 90% coverage thresholds on pure-logic files
- add test scripts: test, test:run, test:coverage, test:ui
2025-12-21 03:28:34 -05:00