Files
novalon-website/test-framework/shared/utils/reporting/EnhancedTestReporter.ts
T
zhangxiang 602ed6a671 test(hooks): finalize mutation test improvements and release acceptance
- Raise use-swipe-gesture mutation score to 66.13% (target 65%+)
- Maintain use-reduced-motion mutation score at 76.32% (target 50%+)
- Fix use-reduced-motion.ts ESLint set-state-in-effect warning
- Add UJ-10 deep searcher journey (category browse → article read → content discovery)
- Add 40 new test files (analytics, detail, sections, ui, lib components)
- Update test-strategy-plan.md to v2.0 (sync test count to 1591)
- Sync README.md with final release metrics

Quality gates: TS 0 errors, ESLint 0 errors, 121 suites / 1591 tests passed
2026-08-02 19:39:27 +08:00

45 lines
1.3 KiB
TypeScript

// @ts-nocheck
import { TestResult, TrendReport, PerformanceBaseline as PerformanceBaselineType, CoverageReport } from '../../types/reporting';
import { TrendAnalyzer } from './TrendAnalyzer';
import { PerformanceBaseline } from './PerformanceBaseline';
export class EnhancedTestReporter {
private results: TestResult[] = [];
private trendAnalyzer: TrendAnalyzer;
private performanceBaseline: PerformanceBaseline;
constructor() {
this.trendAnalyzer = new TrendAnalyzer();
this.performanceBaseline = new PerformanceBaseline();
}
addResult(result: TestResult): void {
this.results.push(result);
}
generateTrendReport(): TrendReport {
return this.trendAnalyzer.analyze(this.results);
}
generatePerformanceBaseline(): PerformanceBaselineType {
return this.performanceBaseline.calculate(this.results);
}
generateCoverageReport(): CoverageReport {
const totalTests = this.results.length;
const passed = this.results.filter(r => r.status === 'passed').length;
const failed = this.results.filter(r => r.status === 'failed').length;
const skipped = this.results.filter(r => r.status === 'skipped').length;
return { totalTests, passed, failed, skipped };
}
getResults(): TestResult[] {
return this.results;
}
clearResults(): void {
this.results = [];
}
}