import { TestFailure, TestCaseDetails, TestSummary } from '../types'; /** * Handles writing test results to JSON files */ export declare class FileHandler { private readonly failuresFilePath; private readonly summaryFilePath; private failuresBuffer; private writeInterval; private isBufferDirty; /** * Creates a new FileHandler instance * @param outputDir - Directory where JSON files will be saved */ constructor(outputDir?: string); /** * Adds a test failure to the failures file * @param failure - The test failure to add */ addFailure(failure: TestFailure): void; /** * Writes test summary and all test cases to files * @param summary - Test run summary * @param allTestCases - All test cases from the run */ writeSummary(summary: TestSummary, allTestCases: TestCaseDetails[]): void; /** * Starts the periodic buffer flush * @private */ private startPeriodicFlush; /** * Stops the periodic buffer flush * @private */ private stopPeriodicFlush; /** * Flushes the failures buffer to disk * @private */ private flushFailuresBuffer; }