histoire
Version:
A fast story book powered by Vite
24 lines • 1.14 kB
TypeScript
/** Finished specs out of the specs of one Vitest run. */
export interface HistoireSpecProgress {
/** Specs that finished. */
completed: number;
/** Specs in the run. */
total: number;
}
/** Progress of a test run: story collection (one spec per story), then assertions (one per variant). */
export interface HistoireTestRunProgress extends HistoireSpecProgress {
/** Current phase. */
phase: 'collect' | 'run';
}
/**
* Vitest options appending a reporter that reports finished specs (test modules), to spread
* after the run options. Each attempt restarts the count. Without a listener it is empty,
* since an explicit `reporters: undefined` breaks Vitest config resolution.
* @param reporters Reporters configured for the run; Vitest's `default` when absent.
* @param total Number of specs in the run.
* @param onProgress Receives counts after the run starts and after every finished spec.
*/
export declare function progressReporterOptions(reporters: unknown, total: number, onProgress?: (progress: HistoireSpecProgress) => void): {
reporters?: any;
};
//# sourceMappingURL=progress-reporter.d.ts.map