/** * Bun test lens for Bun's built-in test runner */ import { BaseLens } from '../base/BaseLens.js'; import { LensResult, ExecuteResult } from '../../types/index.js'; /** * Coverage info for a single file */ interface BunCoverageFile { file: string; functionCoverage: number; lineCoverage: number; uncoveredLines: string; } /** * Parsed Bun test output */ interface BunTestParsedOutput { passed: number; failed: number; skipped: number; totalTests: number; totalFiles: number; expectCalls: number; duration: number; testFiles: string[]; failures: BunTestFailure[]; coverageFiles: BunCoverageFile[]; totalFunctionCoverage: number; totalLineCoverage: number; } /** * Bun test failure info */ interface BunTestFailure { file: string; testName: string; message: string; line?: number; } /** * Lens for Bun's built-in test runner */ export declare class BunTestLens extends BaseLens { readonly name = "bun-test"; readonly description = "Bun test runner"; readonly languages: string[]; readonly supportedTools: string[]; readonly requirements: import("../..").LensRequirements; private pathMapper?; /** * Calculate quality score (0-100) from Bun test results * * Scoring algorithm: * - Base score from test pass rate: (passedTests / totalTests) × 100 * - Penalty for skipped tests: -0.5 per skipped test * - Floor at 0, cap at 100 */ static calculateQualityScore(result: LensResult): number; /** * Parse Bun test output * * Bun test outputs: * - "X pass" for passed tests * - "Y fail" for failed tests * - "Z skip" for skipped tests * - "N expect() calls" for assertion count * - "Ran N tests across M files. [time]" as summary * - Test file paths in format "path/to/file.test.ts:" */ parse(output: ExecuteResult): BunTestParsedOutput; /** * Format Bun test results to standard format */ format(parsed: BunTestParsedOutput): LensResult; /** * Get or create path mapper */ private getPathMapper; } export {}; //# sourceMappingURL=BunTestLens.d.ts.map