folio
Version:
A customizable test framework to build your own test frameworks. Foundation for the [Playwright test runner](https://github.com/microsoft/playwright-test).
61 lines • 2.04 kB
TypeScript
/**
* Copyright Microsoft Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference types="node" />
import child_process from 'child_process';
import { EventEmitter } from 'events';
import { RunPayload } from './ipc';
import { Config } from './config';
import { Reporter } from './reporter';
import { RunnerSuite } from './runnerTest';
export declare class Dispatcher {
private _workers;
private _freeWorkers;
private _workerClaimers;
private _testById;
private _queue;
private _stopCallback;
readonly _config: Config;
private _suite;
private _reporter;
private _hasWorkerErrors;
private _isStopped;
private _failureCount;
constructor(suite: RunnerSuite, config: Config, reporter: Reporter);
_filesSortedByWorkerHash(): RunPayload[];
run(): Promise<void>;
_dispatchQueue(): Promise<void>;
_runJob(worker: Worker, runPayload: RunPayload): Promise<unknown>;
_obtainWorker(): Promise<Worker>;
_notifyWorkerClaimer(): Promise<void>;
_createWorker(): Promise<Worker>;
stop(): Promise<void>;
private _reportTestEnd;
hasWorkerErrors(): boolean;
}
declare class Worker extends EventEmitter {
process: child_process.ChildProcess;
runner: Dispatcher;
hash: string;
index: number;
stdout: any[];
stderr: any[];
constructor(runner: Dispatcher);
init(): Promise<void>;
run(entry: RunPayload): void;
stop(): void;
}
export {};
//# sourceMappingURL=dispatcher.d.ts.map