japa
Version:
Lean test runner for Node.js
35 lines (34 loc) • 904 B
TypeScript
/**
* @module Core
*/
/// <reference types="node" />
import { IOptions } from '../Contracts';
import { Group } from '../Group';
import { EventEmitter } from 'events';
/**
* Runner class is used for defining global properties
* and run all the tests inside the group.
*/
export declare class Runner<T extends any[], H extends any[]> {
private _groups;
private _options;
private _reporterFn;
constructor(_groups: Group<T, H>[], _options: IOptions);
/**
* Returns a boolean telling if any of the groups or it's tests
* has errors.
*/
get hasErrors(): boolean;
/**
* Define a set of test groups to use
*/
useGroups(groups: Group<T, H>[]): this;
/**
* Define custom reporter
*/
reporter(fn: (emitter: EventEmitter) => void): this;
/**
* Run all the tests inside the registered groups
*/
run(): Promise<void>;
}