-
Notifications
You must be signed in to change notification settings - Fork 92
/
mocha.d.ts
46 lines (35 loc) · 1.28 KB
/
mocha.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// BDD
declare var describe : IMochaDescribeWithSkip;
declare var it: IMochaTestWithSkip;
declare var before : IMochaTest;
declare var after : IMochaTest;
declare var beforeEach : IMochaTest;
declare var afterEach : IMochaTest;
interface IMochaDescribe {
(title: string, cb?: () => void) : void;
}
interface IMochaDescribeWithSkip extends IMochaDescribe {
skip : IMochaDescribe;
only : IMochaDescribe;
}
interface IMochaTest {
(cb?: () => void) : void;
(cb?: (done:(err? : Error) => void) => void) : void;
(title: string, cb?: () => void) : void;
(title: string, cb?: (done:(err? : Error) => void) => void) : void;
}
interface IMochaTestWithSkip extends IMochaTest {
skip : IMochaTest;
only : IMochaTest;
}
// TDD
declare function suite(title: string, cb: () => void);
declare function test(title: string, cb: () => void);
declare function test(title: string, cb: (done:() => void) => void);
declare function setup(title: string, cb: () => void);
declare function teardown(title: string, cb: () => void);
declare function suite(cb: () => void);
declare function test(cb: () => void);
declare function test(cb: (done:() => void) => void);
declare function setup(cb: () => void);
declare function teardown(cb: () => void);