interface FlexibleTestResult { id: string; title: string; fullTitle: string; duration?: number; currentRetry?: number; speed?: 'fast' | 'medium' | 'slow' | string; fileId?: string; sourceContext?: { startLine: number; endLine: number; code: string; codeBase64?: string; }; errId?: string; status?: 'passed' | 'failed' | 'pending'; state?: 'passed' | 'failed' | 'pending'; timestamp: string; contextId?: string; suiteId?: string; err?: { message: string; stack?: string; expected?: any; actual?: any; }; code?: { file: string; line: number; column: number; sourceContent: string; }; } interface FlexibleConsoleLogEntry { id: string; type: 'log' | 'info' | 'warn' | 'error' | 'debug' | 'trace'; timestamp: string; content: string | string[] | any; contentBase64: string; testId?: string; suiteId?: string; } interface IDRYSuiteResult { id: string; title: string; fullTitle: string; fileId?: string; root: boolean; duration?: number; testIds: string[]; suiteIds: string[]; hookIds: string[]; timestamp: string; consoleLogIds?: string[]; } interface IHookResult { id: string; title: string; hookType: 'before' | 'after' | 'beforeEach' | 'afterEach'; suiteId?: string; status: 'passed' | 'failed'; duration?: number; errId?: string; timestamp: string; consoleLogIds?: string[]; } interface ITestError { id: string; message: string; messageBase64?: string; stack?: string; stackBase64?: string; actual?: any; actualBase64?: string; expected?: any; expectedBase64?: string; operator?: string; type?: string; code?: string; stackFrames?: any[]; sourceContext?: { startLine: number; endLine: number; code: string; codeBase64: string; }; } interface FlexibleTestReport { stats: { suites: number; tests: number; passes: number; failures: number; pending: number; duration: number; start: string; end: string; startTime?: number; endTime?: number; }; environment: { platform?: string; node?: string; browser?: string | null; userAgent?: string; browserVersion?: string; }; rootSuiteId: string; suites: { [id: string]: IDRYSuiteResult; }; tests: { [id: string]: FlexibleTestResult; }; hooks?: { [id: string]: IHookResult; }; files?: { [id: string]: any; }; errors?: { [id: string]: ITestError; }; contexts?: { [id: string]: any; }; consoleLogs: { [id: string]: FlexibleConsoleLogEntry; }; consoleLogIds: string[]; passIds: string[]; failIds: string[]; pendingIds: string[]; externalReferences?: { errors?: string; consoleLogs?: string; sourceFiles?: string; }; } type TestReport = FlexibleTestReport; type TestSuite = IDRYSuiteResult; type TestCase = FlexibleTestResult; type ConsoleLogEntry = FlexibleConsoleLogEntry; type TestError = ITestError; type TestHook = IHookResult; interface RenderOptions { expandFailures: boolean; expandPasses: boolean; expandPending: boolean; showConsoleLogs: boolean; showPassDetails: boolean; theme: 'light' | 'dark'; debug?: boolean; } interface SuiteWithChildren extends TestSuite { tests: TestCase[]; suites: SuiteWithChildren[]; hooks?: TestHook[]; } declare class ReportRenderer { private container; private report; private processor; private options; constructor(options?: Partial); render(containerId: string, reportData: TestReport): void; private applyExpansionSettings; } declare class ReportProcessor { private report; constructor(reportData: TestReport); /** * Get hierarchy of test suites in tree structure */ getTestSuiteTree(): SuiteWithChildren; /** * Build hierarchical structure of test suites */ private buildSuiteHierarchy; /** * Get all tests by state */ getTestsByState(state: 'passed' | 'failed' | 'pending'): TestCase[]; /** * Get console logs for a specific test */ getConsoleLogsForTest(testId: string): ConsoleLogEntry[]; /** * Get error details for a test */ getErrorForTest(test: TestCase): TestError | undefined; /** * Get duration in human-readable format */ getFormattedDuration(duration: number | undefined): string; /** * Format timestamp to readable date */ formatTimestamp(timestamp: string | number | undefined): string; /** * Get summary statistics */ getSummary(): { duration: string; startTime: string; endTime: string; passRate: string; suites: number; tests: number; passes: number; failures: number; pending: number; start: string; end: string; }; } /** * Render a Mocha detailed test report in the specified container * @param containerId - ID of the HTML element that will contain the report * @param data - Test report data in the TestReport format * @param options - Optional rendering options */ declare function renderTestReport(containerId: string, data: TestReport, options?: Partial): void; export { ReportProcessor, ReportRenderer, renderTestReport }; export type { ConsoleLogEntry, FlexibleConsoleLogEntry, FlexibleTestReport, FlexibleTestResult, IDRYSuiteResult, IHookResult, ITestError, RenderOptions, SuiteWithChildren, TestCase, TestError, TestHook, TestReport, TestSuite };