forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jasmine-expect.d.ts
92 lines (85 loc) · 3.52 KB
/
jasmine-expect.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Type definitions for jasmine-expect 2.0.0-beta2
// Project: https://github.com/JamieMason/Jasmine-Matchers
// Definitions by: UserPixel <https://github.com/UserPixel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../jasmine/jasmine.d.ts" />
declare namespace jasmine {
interface Matchers {
// These functions are written in the order defined in the src directory of jasmine-matchers
// The type system is used smartly whenever it can provide value (by looking at the code of every matcher)
toBeAfter(otherDate: Date): boolean; //
toBeArray(): boolean; //
toBeArrayOfBooleans(): boolean; //
toBeArrayOfNumbers(): boolean;
toBeArrayOfObjects(): boolean;
toBeArrayOfSize(size: number): boolean;
toBeArrayOfStrings(): boolean;
toBeBefore(otherDate: Date): boolean; //
toBeBoolean(): boolean;
toBeCalculable(): boolean;
toBeDate(): boolean;
toBeEmptyArray(): boolean;
toBeEmptyObject(): boolean;
toBeEmptyString(): boolean;
toBeEvenNumber(): boolean;
toBeFalse(): boolean;
toBeFunction(): boolean;
toBeHtmlString(): boolean;
toBeIso8601(): boolean;
toBeJsonString(): boolean;
toBeLongerThan(other: string): boolean;
toBeNonEmptyArray(): boolean;
toBeNonEmptyObject(): boolean;
toBeNonEmptyString(): boolean;
toBeNumber(): boolean;
toBeObject(): boolean;
toBeOddNumber(): boolean;
toBeSameLengthAs(other: string): boolean;
toBeShorterThan(other: string): boolean;
toBeString(): boolean;
toBeTrue(): boolean;
toBeWhitespace(): boolean;
toBeWholeNumber(): boolean;
toBeWithinRange(floor: number, ceiling: number): boolean;
toEndWith(subString: string): boolean;
toHaveArray(key: string): boolean;
toHaveArrayOfBooleans(key: string): boolean;
toHaveArrayOfNumbers(key: string): boolean;
toHaveArrayOfObjects(key: string): boolean;
toHaveArrayOfSize(key: string, size?: number): boolean;
toHaveArrayOfStrings(key: string): boolean;
toHaveBoolean(key: string): boolean;
toHaveCalculable(key: string): boolean;
toHaveDate(key: string): boolean;
toHaveDateAfter(key: string, otherDate: Date): boolean;
toHaveDateBefore(key: string, otherDate: Date): boolean;
toHaveEmptyArray(key: string): boolean;
toHaveEmptyObject(key: string): boolean;
toHaveEmptyString(key: string): boolean;
toHaveEvenNumber(key: string): boolean;
toHaveFalse(key: string): boolean;
toHaveHtmlString(key: string): boolean;
toHaveIso8601(key: string): boolean;
toHaveJsonString(key: string): boolean;
toHaveMember(key: string): boolean;
toHaveMethod(key: string): boolean;
toHaveNonEmptyArray(key: string): boolean;
toHaveNonEmptyObject(key: string): boolean;
toHaveNonEmptyString(key: string): boolean;
toHaveNumber(key: string): boolean;
toHaveNumberWithinRange(key: string, floor: number, ceiling: number): boolean;
toHaveObject(key: string): boolean;
toHaveOddNumber(key: string): boolean;
toHaveString(key: string): boolean;
toHaveStringLongerThan(key: string, other: string): boolean;
toHaveStringSameLengthAs(key: string, other: string): boolean;
toHaveStringShorterThan(key: string, other: string): boolean;
toHaveTrue(key: string): boolean;
toHaveWhitespaceString(key: string): boolean;
toHaveWholeNumber(key: string): boolean;
toImplement(api: {}): boolean;
toStartWith(subString: string): boolean;
toThrowAnyError(): boolean;
toThrowErrorOfType(type: string): boolean;
}
}