UNPKG

904 BTypeScriptView Raw
1/**
2 * @module Core
3 */
4/// <reference types="node" />
5import { IOptions } from '../Contracts';
6import { Group } from '../Group';
7import { EventEmitter } from 'events';
8/**
9 * Runner class is used for defining global properties
10 * and run all the tests inside the group.
11 */
12export declare class Runner<T extends any[], H extends any[]> {
13 private _groups;
14 private _options;
15 private _reporterFn;
16 constructor(_groups: Group<T, H>[], _options: IOptions);
17 /**
18 * Returns a boolean telling if any of the groups or it's tests
19 * has errors.
20 */
21 get hasErrors(): boolean;
22 /**
23 * Define a set of test groups to use
24 */
25 useGroups(groups: Group<T, H>[]): this;
26 /**
27 * Define custom reporter
28 */
29 reporter(fn: (emitter: EventEmitter) => void): this;
30 /**
31 * Run all the tests inside the registered groups
32 */
33 run(): Promise<void>;
34}