7cccacdc51
Implement full repository review mode that detects logical features/modules and reviews them systematically with session persistence for pause/resume capability. Key additions: - RepoScanner: scans codebase and estimates tokens/cost - FeatureAnalyzer: AI-powered detection of logical modules - FeaturePlanner: creates review execution plan - StateManager: persists sessions for resume capability - RepoOrchestrator: executes feature-by-feature reviews - MarkdownReporter: generates review reports New CLI options: --repo, --quick, --deep, --list-sessions, --session, --export, --path, --ignore, --plan-only, --reanalyze Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
766 B
TypeScript
28 lines
766 B
TypeScript
// tests/repo-scanner/types.test.ts
|
|
import { describe, it, expect } from 'vitest'
|
|
import type { RepoStats, FileInfo, ScanOptions } from '../../src/repo-scanner/types'
|
|
|
|
describe('RepoScanner types', () => {
|
|
it('should have correct RepoStats structure', () => {
|
|
const stats: RepoStats = {
|
|
totalFiles: 10,
|
|
totalLines: 500,
|
|
languages: { typescript: 8, javascript: 2 },
|
|
estimatedTokens: 2000,
|
|
estimatedCost: 0.02
|
|
}
|
|
expect(stats.totalFiles).toBe(10)
|
|
})
|
|
|
|
it('should have correct FileInfo structure', () => {
|
|
const file: FileInfo = {
|
|
path: 'src/index.ts',
|
|
relativePath: 'src/index.ts',
|
|
language: 'typescript',
|
|
lines: 100,
|
|
size: 2048
|
|
}
|
|
expect(file.language).toBe('typescript')
|
|
})
|
|
})
|