/// import * as pool from "../browser-pool"; import { BrowserRunner } from "./browser-runner"; import { InterceptedEvent, RunnerSyncEvent, Interceptor, InterceptData } from "../events"; import { RunnableEmitter } from "./types"; import WorkersRegistry from "../utils/workers-registry"; import PromiseGroup from "./promise-group"; import { TestCollection } from "../test-collection"; import { Config } from "../config"; import type { runTest, cancel } from "../worker"; import type { Stats as RunnerStats } from "../stats"; import EventEmitter from "events"; import { Test } from "../types"; import type { ProfilerRuntimeLike } from "../profiler/runtime/types"; interface WorkerMethods { runTest: typeof runTest; cancel: typeof cancel; } export interface Workers extends EventEmitter, WorkerMethods { } type MapOfMethods> = { [K in T[number]]: (...args: Array) => Promise | unknown; }; type RegisterWorkers> = EventEmitter & MapOfMethods; interface RunnerRunOptions { shouldDisableSelectivity?: boolean; } /** * Part of Public API: * @link https://testplane.io/docs/v8/reference/testplane-events/#runner_start */ export declare class MainRunner extends RunnableEmitter { protected config: Config; protected interceptors: Interceptor[]; protected browserPool: pool.BrowserPool | null; protected activeBrowserRunners: Map; protected running: PromiseGroup; protected runned: boolean; protected cancelled: boolean; protected workersRegistry: WorkersRegistry; protected workers: Workers | null; protected profiler: ProfilerRuntimeLike; private _cancelError; constructor(config: Config, interceptors: Interceptor[], profiler?: ProfilerRuntimeLike); init(): void; _isRunning(): boolean; run(testCollection: TestCollection, stats: RunnerStats, opts?: RunnerRunOptions): Promise; addTestToRun(test: Test, browserId: string): boolean; protected _runTests(testCollection: TestCollection, opts?: RunnerRunOptions): Promise; protected _addTestToBrowserRunner(test: Test, browserId: string): BrowserRunner; protected _createBrowserRunner(browserId: string): BrowserRunner; protected _waitBrowserRunnerTestsCompletion(runner: BrowserRunner): Promise; protected getEventsToPassthrough(): RunnerSyncEvent[]; protected getEventsToIntercept(): InterceptedEvent[]; protected interceptEvents(runner: BrowserRunner, events: InterceptedEvent[]): void; protected applyInterceptors({ event, data }: Partial | undefined, interceptors: Interceptor[]): Partial; cancel(error: Error): void; registerWorkers>(workerFilepath: string, exportedMethods: T): RegisterWorkers; } export {};