import Macroable from '@poppinss/macroable';
import { type Suite } from './suite/main.ts';
import { type Emitter } from './emitter.ts';
import { type ReporterContract, type RunnerSummary } from './types.ts';
import { SummaryBuilder } from './summary_builder.ts';
/**
 * The Runner class exposes the API to register test suites and execute
 * them sequentially.
 *
 * @example
 * const runner = new Runner(emitter)
 * const suite = new Suite('unit', emitter)
 *
 * runner.add(suite)
 * runner.registerReporter(reporters.list)
 *
 * await runner.exec()
 */
export declare class Runner<Context extends Record<any, any>> extends Macroable {
    #private;
    /**
     * Summary builder is used to create the tests summary reported by
     * multiple reporters. Each report contains a key-value pair
     */
    summaryBuilder: SummaryBuilder;
    /**
     * A collection of suites
     */
    suites: Suite<Context>[];
    /**
     * Registered tests reporter
     */
    reporters: Set<ReporterContract>;
    constructor(emitter: Emitter);
    /**
     * Know if one or more suites have failed
     */
    get failed(): boolean;
    /**
     * Add a suite to the runner
     */
    add(suite: Suite<Context>): this;
    /**
     * Tap into each suite and configure it
     */
    onSuite(callback: (suite: Suite<Context>) => void): this;
    /**
     * Enable/disable the bail mode. In bail mode, all
     * upcoming suites/groups/tests will be skipped
     * when the current test fails
     */
    bail(toggle?: boolean): this;
    /**
     * Register a tests reporter
     */
    registerReporter(reporter: ReporterContract): this;
    /**
     * Get tests summary
     */
    getSummary(): RunnerSummary;
    /**
     * Start the test runner process. The method emits
     * "runner:start" event
     */
    start(): Promise<void>;
    /**
     * Execute runner suites
     */
    exec(): Promise<void>;
    /**
     * End the runner process. Emits "runner:end" event
     */
    end(): Promise<void>;
}
