Commit 6ccd233
test: comprehensive unit tests for factory and restore packages
- factory: 80 tests covering buildExternalDeps (dedup, sort, filtering),
buildCouplingMaps (dedup, edge cases), buildCriticalFiles (cross-domain,
cap, sort, within-domain dedup), buildDomainHealthList (coupling maps,
sorted deps), detectCircularDeps (both rel types, dedup), scoreStatus
(all three statuses, precedence), generateRecommendations (all priority
levels, thresholds, sorting), CouplingStatus (all thresholds), Analyze
(full pipeline, language precedence), RenderHealth, RenderRunPrompt
(8 phases, goal, guardrails), RenderImprovePrompt
- restore: 67 tests covering CountTokens (char/word estimation),
isHorizontalRule, entryPointPriority (all 5 levels), detectLanguages
(aggregation, sort, cap, unknowns), buildDomains (sort, cap, key file
priority, root grouping), localTopFiles (dedup, cap, priority),
computeCriticalFiles (cross-domain, sort, cap, dedup), buildDomainSection
(all fields), FromSupermodelIR (language precedence, DependsOn mapping,
subdomain conversion, critical files), Render (nil guard, budget, token
count accuracy, truncation, ClaudeMD, cycles cap), truncateToTokenBudget
(fallback, budget compliance), ReadClaudeMD (absent, truncation),
DetectExternalDeps (all 6 manifest formats, cap), BuildProjectGraph
(language detection, domains, deps, context cancellation, README desc)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent a4d6c24 commit 6ccd233
2 files changed
+2182
-0
lines changed
0 commit comments