1 |
|
2 |
|
3 |
|
4 | import { Test } from '../Test';
|
5 | import { Group } from '../Group';
|
6 | import { Assert } from '../Assert';
|
7 | import { ICallback, IConfigureOptions } from '../Contracts';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | declare type TestArgs = [Assert, Function];
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | declare type HookArgs = [Function];
|
18 |
|
19 |
|
20 |
|
21 | declare type RunnerGroup = Pick<Group<TestArgs, HookArgs>, Exclude<keyof Group<TestArgs, HookArgs>, 'run' | 'toJSON' | 'test'>>;
|
22 |
|
23 |
|
24 |
|
25 | declare type RunnerTest = Pick<Test<TestArgs>, Exclude<keyof Test<TestArgs>, 'run' | 'toJSON'>>;
|
26 |
|
27 |
|
28 |
|
29 | export declare function test(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
30 |
|
31 |
|
32 |
|
33 | export declare function run(exitProcess?: boolean): Promise<void>;
|
34 | export declare namespace test {
|
35 | |
36 |
|
37 |
|
38 | function group(title: string, callback: (group: RunnerGroup) => void): void;
|
39 | |
40 |
|
41 |
|
42 | function only(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
43 | |
44 |
|
45 |
|
46 |
|
47 | function skip(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
48 | |
49 |
|
50 |
|
51 |
|
52 | function skipInCI(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
53 | |
54 |
|
55 |
|
56 | function runInCI(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
57 | |
58 |
|
59 |
|
60 | function failing(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
61 | |
62 |
|
63 |
|
64 | function configure(options: Partial<IConfigureOptions>): void;
|
65 | |
66 |
|
67 |
|
68 | namespace failing {
|
69 | |
70 |
|
71 |
|
72 | function only(title: string, callback: ICallback<TestArgs>): RunnerTest;
|
73 | }
|
74 | }
|
75 | export {};
|