import type { Config } from '../schemas/config.js'; import type { GapPriority } from '../schemas/gap.js'; import type { DependencyGraph } from './dependency-graph.js'; import type { TestFileAnalysis } from '../parsers/test-analyzer.js'; export interface TestFile { path: string; language: string; testMethods: string[]; testedFile?: string; } export interface TestMapping { productionFile: string; testFiles: TestFile[]; coverage: 'full' | 'partial' | 'none' | 'unknown'; } export interface ExistingTestsResult { testFiles: TestFile[]; mappings: Map; stats: { totalTestFiles: number; totalTestMethods: number; mappedProductionFiles: number; unmappedTestFiles: number; }; } /** * Check if a file is a test file based on patterns */ export declare function isTestFile(filePath: string, config: Config): boolean; /** * Scan directory for test files */ export declare function scanForTestFiles(basePath: string, config: Config, targetPaths?: string[]): Promise; /** * Result type for test coverage check with detailed match information * * v2.0: Now includes tier information for semantic coverage detection * - Tier 1: Name-based matching (file names, method names) * - Tier 2: Body analysis (instantiations, method calls found in test body) * - Tier 3: Transitive coverage via dependency graph */ export interface TestCoverageResult { status: 'covered' | 'partial' | 'missing'; matchedTests: string[]; confidence?: 'high' | 'medium' | 'low'; priority?: GapPriority; matchReasons?: string[]; tier?: 1 | 2 | 3; tierReason?: string; } /** * Check if a recommended test already exists (using enhanced fuzzy matching) * * Improvements in v1.3.0: * - Lower word filter threshold (2 chars instead of 3) * - Fallback search across ALL test files when mapping fails * - Match against full recommendation title, not just individual terms * - Return match reasons for debugging */ export declare function checkTestCoverage(recommendation: { title: string; targetFiles: string[]; }, existingTests: ExistingTestsResult): TestCoverageResult; /** * v2.0: Enhanced tiered test coverage check * * Checks coverage using three tiers: * - Tier 3 (highest): Dependency graph - directly tested or transitively covered * - Tier 2: Body analysis - type is instantiated or methods are called in tests * - Tier 1: Name matching - test file/method name matches * * @param symbolName The production symbol to check coverage for * @param existingTests Result from scanForTestFiles * @param options Additional options including dependency graph and test file analyses */ export declare function checkTestCoverageTiered(symbolName: string, existingTests: ExistingTestsResult, options?: { dependencyGraph?: DependencyGraph; testFileAnalyses?: TestFileAnalysis[]; targetFiles?: string[]; }): TestCoverageResult; //# sourceMappingURL=test-scanner.d.ts.map