forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
expectations.d.ts
60 lines (40 loc) · 1.29 KB
/
expectations.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Type definitions for expectations.js 0.2.5
// Project: https://github.com/spmason/expectations
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var expect:Expectations.IExpectations;
declare namespace Expectations {
interface IExpectations {
(value:any):Expect;
addAssertion(name:string, matcher:Function):void;
}
interface IAssertions {
pass(message?:string):any;
fail(message:string):any;
}
class Expect {
value:any;
assertions:IAssertions;
expr:any;
parent:Expect;
not:Expect;
constructor(value:any, assertions?:IAssertions, expr?:any, parent?:Expect);
generateMessage(value:any, expr:any, toDo:string, otherVal?:any):string;
toEqual(val:any):any;
toNotEqual(val:any):any;
toBe(val:any):any;
toBeTruthy():any;
toBeFalsey():any;
toBeFalsy():any;
toBeGreaterThan(val:any):any;
toBeLessThan(val:any):any;
toContain(val:any):any;
toMatch(val:any):any;
toBeDefined():any;
toBeUndefined():any;
toBeNull():any;
toThrow():any;
pass():any;
fail(why?:string, what?:any):any;
}
}