1 |
|
2 |
|
3 | export interface ITestCase {
|
4 | (testCase: { [property: string]: ITestBody | ITestGroup | void }): void;
|
5 | }
|
6 | export declare var testCase: ITestCase;
|
7 |
|
8 | export interface Test {
|
9 | done: ICallbackFunction;
|
10 | expect(num: number): void;
|
11 |
|
12 |
|
13 | fail(actual: any, expected: any, message: string, operator: string): void;
|
14 | assert(value: any, message: string): void;
|
15 | ok(value: any, message?: string): void;
|
16 | equal(actual: any, expected: any, message?: string): void;
|
17 | notEqual(actual: any, expected: any, message?: string): void;
|
18 | deepEqual(actual: any, expected: any, message?: string): void;
|
19 | notDeepEqual(actual: any, expected: any, message?: string): void;
|
20 | strictEqual(actual: any, expected: any, message?: string): void;
|
21 | notStrictEqual(actual: any, expected: any, message?: string): void;
|
22 | throws(block: any, error?: any, message?: string): void;
|
23 | doesNotThrow(block: any, error?: any, message?: string): void;
|
24 | ifError(value: any): void;
|
25 |
|
26 |
|
27 | equals(actual: any, expected: any, message?: string): void;
|
28 | same(actual: any, expected: any, message?: string): void;
|
29 | }
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | export interface ITestBody {
|
46 | (callback: Test): void;
|
47 | }
|
48 |
|
49 | export interface ITestGroup {
|
50 |
|
51 | setUp?: ((callback: ICallbackFunction) => void) | undefined;
|
52 | /** The tearDown function is run after each test calls test.done() */
|
53 | tearDown?: ((callback: ICallbackFunction) => void) | undefined;
|
54 | [property: string]: ITestGroup | ITestBody | ((callback: ICallbackFunction) => void) | undefined;
|
55 | }
|
56 |
|
57 | export interface ICallbackFunction {
|
58 | (err?: any): void;
|
59 | }
|
60 |
|
\ | No newline at end of file |