-
Notifications
You must be signed in to change notification settings - Fork 7
/
chai-iterator.d.ts
49 lines (38 loc) · 1.58 KB
/
chai-iterator.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
declare global {
namespace Chai {
interface Assert {
isIterable(val: any, msg?: string): void;
isNotIterable(val: any, msg?: string): void;
iteratesOver(act: any, exp: Iterable<any>, msg?: string): void;
doesNotIterateOver(act: any, exp: Iterable<any>, msg?: string): void;
deepIteratesOver(act: any, exp: Iterable<any>, msg?: string): void;
doesNotDeepIterateOver(act: any, exp: Iterable<any>, msg?: string): void;
iteratesFrom(act: any, exp: Iterable<any>, msg?: string): void;
doesNotIterateFrom(act: any, exp: Iterable<any>, msg?: string): void;
deepIteratesFrom(act: any, exp: Iterable<any>, msg?: string): void;
doesNotDeepIterateFrom(act: any, exp: Iterable<any>, msg?: string): void;
iteratesUntil(act: any, exp: Iterable<any>, msg?: string): void;
doesNotIterateUntil(act: any, exp: Iterable<any>, msg?: string): void;
deepIteratesUntil(act: any, exp: Iterable<any>, msg?: string): void;
doesNotDeepIterateUntil(act: any, exp: Iterable<any>, msg?: string): void;
}
interface Assertion {
iterable: Assertion;
iterate: {
for: Assertion;
over(values: Iterable<any>): Assertion;
from(values: Iterable<any>): Assertion;
until(values: Iterable<any>): Assertion;
};
}
interface Deep {
iterate: {
over(values: Iterable<any>): Assertion;
from(values: Iterable<any>): Assertion;
until(values: Iterable<any>): Assertion;
};
}
}
}
declare function chaiIterator(chai: any, utils: any): void;
export = chaiIterator;