/** * Types for spec-driven test generation. * * These types flow through the test-generator pipeline: * parseScenarios → matchThenClauses → renderTests → writeTestFiles * and the coverage pipeline: * analyzeTestCoverage → TestCoverageReport */ export type TestFramework = 'vitest' | 'playwright' | 'pytest' | 'gtest' | 'catch2' | 'junit' | 'gotest'; /** Maps framework → generated file extension */ export declare const FRAMEWORK_EXTENSIONS: Record; /** A lightweight reference to an implementation function (from mapping.json) */ export interface FunctionRef { name: string; file: string; line?: number; confidence: 'llm' | 'semantic' | 'heuristic'; } /** One extracted scenario from a spec file */ export interface ParsedScenario { domain: string; specFile: string; requirement: string; scenarioName: string; given: string[]; when: string[]; then: string[]; mappedFunctions: FunctionRef[]; skip: boolean; skipReason?: string; tags: string[]; priority: 'high' | 'normal' | 'low'; } /** One matched assertion line, formatted for a specific framework */ export interface MatchedAssertion { /** Human-readable assertion source code for the given framework */ line: string; /** Which THEN clause this came from (0-indexed) */ thenIndex: number; /** true = matched by pattern engine; false = LLM-generated; undefined = placeholder */ fromPattern?: boolean; } /** A fully rendered test file ready to be written to disk */ export interface GeneratedTestFile { /** Output path relative to rootPath, e.g. spec-tests/auth/user-login.spec.ts */ outputPath: string; domain: string; framework: TestFramework; scenarios: ParsedScenario[]; content: string; isNew: boolean; } export interface TestOptions { framework: TestFramework | 'auto'; domains: string[]; output: string; merge: boolean; dryRun: boolean; useLlm: boolean; limit?: number; coverage: boolean; discover: boolean; minCoverage?: number; testDirs: string[]; json: boolean; quiet: boolean; verbose: boolean; } export interface CoveredScenario { domain: string; requirement: string; scenarioName: string; testFile: string; discoveredBy: 'tag' | 'semantic'; similarity?: number; } export interface UncoveredScenario { domain: string; requirement: string; scenarioName: string; specFile: string; } export interface DomainCoverage { total: number; covered: number; percent: number; hasDrift: boolean; } export interface TestCoverageReport { timestamp: string; totalScenarios: number; taggedScenarios: number; discoveredScenarios: number; coveredScenarios: number; coveragePercent: number; byDomain: Record; covered: CoveredScenario[]; uncovered: UncoveredScenario[]; staleDomains: string[]; belowThreshold: boolean; minCoverage?: number; } //# sourceMappingURL=test-generator.d.ts.map