Description
Current test coverage is extremely low, far below the 80% target mentioned in agents-docs/CONFIG.md:
| Metric |
Current |
Target |
| Branches |
14% |
80% |
| Functions |
16% |
80% |
| Lines |
25% |
80% |
| Statements |
24% |
80% |
Untested Components (0% coverage)
Chat.tsx — No unit tests
AIHarness.tsx — No unit tests
ExportPanel.tsx — No unit tests
MindMapView.tsx — No unit tests
GraphView.tsx — No unit tests
ErrorBoundary.tsx — No unit tests
ThemeSwitcher.tsx — No unit tests
MobileDrawer.tsx — No unit tests
DbProvider.tsx — No unit tests
openrouter.ts / kilo.ts — No unit tests (LLM providers)
- CLI (
cli/index.ts, cli/db.ts) — Zero test coverage
Partially Tested
search.ts — Semantic search/embeddings not tested
nlp.ts — Only basic tests, no edge cases
resolver.ts — Limited error path testing
Recommended Approach
- Phase 1 (Target: 50%): Add tests for all untested components with critical paths
- Phase 2 (Target: 65%): Add edge case tests and error path coverage
- Phase 3 (Target: 80%): Add comprehensive integration tests
Priority Test Targets
- ExportPanel (security-critical — XSS)
- AIHarness (complex async logic)
- Chat (user-facing feature)
- CLI commands
- LLM providers (mock API calls)
Acceptance Criteria
Description
Current test coverage is extremely low, far below the 80% target mentioned in
agents-docs/CONFIG.md:Untested Components (0% coverage)
Chat.tsx— No unit testsAIHarness.tsx— No unit testsExportPanel.tsx— No unit testsMindMapView.tsx— No unit testsGraphView.tsx— No unit testsErrorBoundary.tsx— No unit testsThemeSwitcher.tsx— No unit testsMobileDrawer.tsx— No unit testsDbProvider.tsx— No unit testsopenrouter.ts/kilo.ts— No unit tests (LLM providers)cli/index.ts,cli/db.ts) — Zero test coveragePartially Tested
search.ts— Semantic search/embeddings not testednlp.ts— Only basic tests, no edge casesresolver.ts— Limited error path testingRecommended Approach
Priority Test Targets
Acceptance Criteria
test:coverageand reports results