import Macroable from '@poppinss/macroable'; import { type Suite } from './suite/main.js'; import { type Emitter } from './emitter.js'; /** * The WebRunner class exposes the API to register test suites and execute * them sequentially in the browser. */ export declare class WebRunner extends Macroable { #private; /** * A collection of suites */ suites: Suite[]; /** * A flag determining if the runner is configured to list all the tests * instead of running them */ get isList(): boolean; /** * Constructor * * @param emitter - Emitter to use */ constructor(emitter: Emitter); /** * Know if one or more suites have failed */ get failed(): boolean; /** * Add a suite to the runner * * @param suite - Suite to add * @returns This runner instance */ add(suite: Suite): this; /** * Tap into each suite and configure it * * @param callback - Callback to configure each suite * @returns This runner instance */ onSuite(callback: (suite: Suite) => void): this; /** * Enable/disable the bail mode. In bail mode, all * upcoming suites/groups/tests will be skipped * when the current test fails * * @param toggle - Whether to enable or disable bail mode * @returns This runner instance */ bail(toggle?: boolean): this; /** * Start the test runner process. The method emits * "runner:start" event * * @returns Promise that resolves when the runner starts */ start(): Promise; exec(): Promise; /** * End the runner process. Emits "runner:end" event */ end(): Promise; /** * Executes the list command. * * @returns Promise that resolves when the list is executed */ protected executeList(): Promise; /** * Executes the test command. * * @returns Promise that resolves when the test is executed */ protected executeTest(): Promise; }