@japa/runner
Version:
A simple yet powerful testing framework for Node.js
31 lines (30 loc) • 969 B
TypeScript
import { Suite, Emitter, TestContext, Refiner } from '../modules/core/main.js';
import type { Config, TestExecutor, RunnerSummary } from '../src/types.js';
/**
* Runner factory exposes the API to run dummy suites, groups and tests.
* You might want to use the factory for testing reporters and
* plugins usage
*/
export declare class RunnerFactory {
#private;
/**
* Configure runner
*/
configure(config: Config, argv?: string[]): this;
/**
* Define a custom emitter instance to use
*/
useEmitter(emitter: Emitter): this;
/**
* Run a test using the runner
*/
runTest(title: string, callback: TestExecutor<TestContext, undefined>): Promise<RunnerSummary>;
/**
* Enable/disable the bail mode
*/
bail(toggle?: boolean): this;
/**
* Run dummy tests. You might use
*/
runSuites(suites: (emitter: Emitter, refiner: Refiner, file?: string) => Suite[]): Promise<RunnerSummary>;
}