/**
 * Auto-Test Integration Module
 *
 * Automatically runs tests after code changes and feeds results back to the LLM.
 * Research shows TDD integration improves Pass@1 by 45.97% (ICSE 2024).
 *
 * Supported test frameworks:
 * - Jest (JavaScript/TypeScript)
 * - Mocha (JavaScript/TypeScript)
 * - Vitest (JavaScript/TypeScript)
 * - pytest (Python)
 * - cargo test (Rust)
 * - go test (Go)
 * - RSpec (Ruby)
 */
import { EventEmitter } from "events";
/**
 * Test case result
 */
export interface TestCase {
    name: string;
    suite: string;
    file?: string;
    status: "passed" | "failed" | "skipped" | "pending";
    duration: number;
    error?: string;
    stack?: string;
}
/**
 * Test run result
 */
export interface TestResult {
    success: boolean;
    passed: number;
    failed: number;
    skipped: number;
    total: number;
    duration: number;
    tests: TestCase[];
    coverage?: CoverageResult;
    framework: string;
}
/**
 * Coverage result
 */
export interface CoverageResult {
    lines: number;
    statements: number;
    functions: number;
    branches: number;
}
/**
 * Test framework configuration
 */
export interface TestFrameworkConfig {
    name: string;
    command: string;
    args: string[];
    watchArgs?: string[];
    filePattern: RegExp;
    configFiles: string[];
    parseOutput: (output: string) => Partial<TestResult>;
    detectTestFile: (sourceFile: string) => string[];
}
/**
 * Auto-test configuration
 */
export interface AutoTestConfig {
    enabled: boolean;
    runOnSave: boolean;
    runRelatedTests: boolean;
    collectCoverage: boolean;
    timeout: number;
    maxTestFiles: number;
    watchMode: boolean;
}
/**
 * Default auto-test configuration
 */
export declare const DEFAULT_AUTOTEST_CONFIG: AutoTestConfig;
/**
 * Built-in test framework configurations
 */
export declare const BUILTIN_FRAMEWORKS: Record<string, TestFrameworkConfig>;
/**
 * Auto-Test Manager
 *
 * Manages automatic test execution after code changes.
 */
export declare class AutoTestManager extends EventEmitter {
    private config;
    private detectedFramework;
    private workingDirectory;
    private lastResults;
    constructor(workingDirectory: string, config?: Partial<AutoTestConfig>);
    /**
     * Detect test framework in the project
     */
    private detectFramework;
    /**
     * Run tests
     */
    private runTests;
    /**
     * Run all tests
     */
    runAllTests(): Promise<TestResult>;
    /**
     * Run tests for specific files
     */
    runTestFiles(files: string[]): Promise<TestResult>;
    /**
     * Run tests related to changed source files
     */
    runRelatedTests(sourceFiles: string[]): Promise<TestResult>;
    /**
     * Format test results for LLM context
     */
    formatResultsForLLM(result: TestResult): string;
    /**
     * Get last test results
     */
    getLastResults(): TestResult | null;
    /**
     * Get detected framework
     */
    getDetectedFramework(): string | null;
    /**
     * Get configuration
     */
    getConfig(): AutoTestConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<AutoTestConfig>): void;
    /**
     * Re-detect framework
     */
    refresh(): void;
}
/**
 * Get or create auto-test manager instance
 */
export declare function getAutoTestManager(workingDirectory?: string, config?: Partial<AutoTestConfig>): AutoTestManager;
/**
 * Initialize auto-test manager
 */
export declare function initializeAutoTest(workingDirectory: string, config?: Partial<AutoTestConfig>): AutoTestManager;
