/** * E2E Test Runner - Reporters Index * * Barrel exports and factory function for creating reporters */ import type { ReporterConfig } from '../types'; import { BaseReporter, type ReporterOptions } from './base.reporter'; export { BaseReporter, createReporterEvent } from './base.reporter'; export type { ReporterOptions, SuiteStartData, SuiteEndData, TestStartData, TestEndData, PhaseStartData, PhaseEndData, StepStartData, StepEndData, } from './base.reporter'; export { ConsoleReporter } from './console.reporter'; export { JUnitReporter } from './junit.reporter'; export { HTMLReporter } from './html.reporter'; export { JSONReporter, createMinimalJSONOutput } from './json.reporter'; export type { JSONReportOutput, JSONTestResult, JSONPhaseResult, JSONStepResult } from './json.reporter'; /** * Reporter type union */ export type ReporterType = 'console' | 'junit' | 'html' | 'json'; /** * Reporter factory options */ export interface ReporterFactoryOptions extends ReporterOptions { environmentName?: string; } /** * Factory function to create reporter instances * * @param type - The type of reporter to create * @param config - Reporter configuration from e2e.config.yaml * @param options - Additional options for the reporter * @returns Reporter instance */ export declare function createReporter(type: ReporterType | string, config?: Partial, options?: ReporterFactoryOptions): BaseReporter; /** * Create multiple reporters from configuration * * @param configs - Array of reporter configurations * @param options - Shared options for all reporters * @returns Array of reporter instances */ export declare function createReporters(configs: ReporterConfig[], options?: ReporterFactoryOptions): BaseReporter[]; /** * Reporter manager for handling multiple reporters */ export declare class ReporterManager { private reporters; constructor(reporters?: BaseReporter[]); /** * Add a reporter */ addReporter(reporter: BaseReporter): void; /** * Get all reporters */ getReporters(): BaseReporter[]; /** * Broadcast an event to all reporters */ broadcast(method: K, data: Parameters unknown ? (...args: P) => unknown : never>[0]): void; /** * Emit suite start event to all reporters */ onSuiteStart(data: Parameters[0]): void; /** * Emit suite end event to all reporters */ onSuiteEnd(data: Parameters[0]): void; /** * Emit test start event to all reporters */ onTestStart(data: Parameters[0]): void; /** * Emit test end event to all reporters */ onTestEnd(data: Parameters[0]): void; /** * Emit phase start event to all reporters */ onPhaseStart(data: Parameters[0]): void; /** * Emit phase end event to all reporters */ onPhaseEnd(data: Parameters[0]): void; /** * Emit step start event to all reporters */ onStepStart(data: Parameters[0]): void; /** * Emit step end event to all reporters */ onStepEnd(data: Parameters[0]): void; /** * Generate reports from all reporters */ generateReports(result: Parameters[0]): Promise; } /** * Create a reporter manager from configuration */ export declare function createReporterManager(configs: ReporterConfig[], options?: ReporterFactoryOptions): ReporterManager; /** * Get available reporter types */ export declare function getAvailableReporterTypes(): ReporterType[]; /** * Validate reporter type */ export declare function isValidReporterType(type: string): type is ReporterType; //# sourceMappingURL=index.d.ts.map