/** * Assertion Healer * * Intelligently heals broken assertions in tests. * Supports Jest, Chai, and Node.js assert styles. */ import type { AssertionUpdateResult, AssertionType, SelfHealingConfig } from './types.js'; /** * Parsed assertion information */ interface ParsedAssertion { type: AssertionType; originalAssertion?: string; actual: string; expected: string; negated: boolean; matcher?: string; line: number; column: number; } /** * Assertion healing options */ interface AssertionHealOptions { /** Test file content */ fileContent: string; /** Line number of failed assertion */ lineNumber: number; /** Expected value */ expected: string; /** Actual value received */ actual: string; /** Error message from failure */ errorMessage?: string; /** Test framework (jest, chai, assert) */ framework?: 'jest' | 'chai' | 'assert' | 'auto'; } /** * Assertion Healer class */ export declare class AssertionHealer { private config; constructor(config: SelfHealingConfig); /** * Attempt to heal a broken assertion */ healAssertion(options: AssertionHealOptions): Promise; /** * Parse the assertion from file content */ private parseAssertion; /** * Detect test framework from file content */ private detectFramework; /** * Parse Jest-style assertion */ private parseJestAssertion; /** * Parse Chai-style assertion */ private parseChaiAssertion; /** * Parse Node.js assert-style assertion */ private parseAssertAssertion; /** * Map Jest matcher to assertion type */ private mapJestMatcherToType; /** * Map Chai matcher to assertion type */ private mapChaiMatcherToType; /** * Calculate confidence for healing */ private calculateHealingConfidence; /** * Generate healed assertion */ private generateHealedAssertion; /** * Format a value for use in code */ private formatValue; /** * Calculate similarity between two strings (Levenshtein-based) */ private calculateStringSimilarity; /** * Parse multiple assertions from a file */ parseAssertionsFromFile(content: string): ParsedAssertion[]; } export {};