-
Notifications
You must be signed in to change notification settings - Fork 3
/
matchers.d.ts
38 lines (34 loc) · 1.37 KB
/
matchers.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
type VerticalAlignment = 'top' | 'center' | 'bottom';
type HorizontalAlignment = 'left' | 'center' | 'right';
interface Options {
tolerance?: number;
distance?: number;
}
declare namespace Chai {
export interface Assertion {
present(): Assertion;
absent(): Assertion;
// Layout matchers
insideOf(boundaries: Element): Assertion;
outsideOf(boundaries: Element): Assertion;
widerThan(comparedTo: Element): Assertion;
higherThan(comparedTo: Element): Assertion;
biggerThan(comparedTo: Element): Assertion;
verticallyAligned(alignment: VerticalAlignment, tolerance?: number): Assertion;
horizontallyAligned(alignment: HorizontalAlignment, tolerance?: number): Assertion;
inHorizontalSequence(options?: Options): Assertion;
inVerticalSequence(options?: Options): Assertion;
width: Assertion;
height: Assertion;
left: Assertion;
right: Assertion;
top: Assertion;
bottom: Assertion;
greaterThan(value: number | Date | Element): Assertion;
lessThan(value: number | Date | Element): Assertion;
least(value: number | Date | Element): Assertion;
most(value: number | Date | Element): Assertion;
below(value: number | Date | Element): Assertion;
above(value: number | Date | Element): Assertion;
}
}