1
- // flow-typed signature: f80f981d039947b3f29f0f437061852a
2
- // flow-typed version: da30fe6876/chai_v3.5 .x/flow_>=v0.25.0
1
+ // flow-typed signature: 5ebfab521cce28c691a4fdfe8992f4e2
2
+ // flow-typed version: da30fe6876/chai_v4.x .x/flow_>=v0.25.0
3
3
4
4
declare module "chai" {
5
5
declare type ExpectChain < T > = {
@@ -30,6 +30,7 @@ declare module "chai" {
30
30
contain : ExpectChain < T > & ( ( value : mixed ) => ExpectChain < T > ) ,
31
31
contains : ExpectChain < T > & ( ( value : mixed ) => ExpectChain < T > ) ,
32
32
33
+ eq : ( value : T ) => ExpectChain < T > ,
33
34
eql : ( value : T ) => ExpectChain < T > ,
34
35
equal : ( value : T ) => ExpectChain < T > ,
35
36
equals : ( value : T ) => ExpectChain < T > ,
@@ -41,6 +42,7 @@ declare module "chai" {
41
42
within : ( start : T & number , finish : T & number ) => ExpectChain < T > ,
42
43
43
44
instanceof : ( constructor : mixed ) => ExpectChain < T > ,
45
+ nested : ExpectChain < T > ,
44
46
property : < P > (
45
47
name: string,
46
48
value?: P
@@ -90,6 +92,7 @@ declare module "chai" {
90
92
extensible: () => ExpectChain < T > ,
91
93
sealed: () => ExpectChain < T > ,
92
94
frozen: () => ExpectChain < T > ,
95
+ NaN: () => ExpectChain < T > ,
93
96
94
97
// chai-immutable
95
98
size: (n: number) => ExpectChain < T > ,
@@ -113,6 +116,7 @@ declare module "chai" {
113
116
rejectedWith: (value: mixed) => Promise < mixed > & ExpectChain < T > ,
114
117
rejected: () => Promise < mixed > & ExpectChain < T > ,
115
118
notify: (callback: () => mixed ) => ExpectChain < T > ,
119
+ fulfilled: () => Promise < mixed > & ExpectChain < T > ,
116
120
117
121
// chai-subset
118
122
containSubset: (obj: Object | Object[]) => ExpectChain < T > ,
@@ -121,10 +125,17 @@ declare module "chai" {
121
125
dispatchedActions: (
122
126
actions: Array< Object | ( ( action : Object ) => any ) >
123
127
) => ExpectChain < T > ,
124
- dispatchedTypes: (actions: Array< string > ) => ExpectChain < T >
128
+ dispatchedTypes: (actions: Array< string > ) => ExpectChain < T > ,
129
+
130
+ // chai-enzyme
131
+ attr: (key: string, val?: any) => ExpectChain < T > ,
132
+ data: (key: string, val?: any) => ExpectChain < T > ,
133
+ prop: (key: string, val?: any) => ExpectChain < T > ,
134
+ state: (key: string, val?: any) => ExpectChain < T > ,
135
+ value: (val: string) => ExpectChain < T >
125
136
} ;
126
137
127
- declare function expect < T > (actual: T): ExpectChain< T > ;
138
+ declare function expect < T > (actual: T, message?: string ): ExpectChain< T > ;
128
139
129
140
declare function use(plugin: (chai: Object, utils: Object) => void ) : void ;
130
141
@@ -248,6 +259,22 @@ declare module "chai" {
248
259
errorMsgMatcher ?: string | RegExp ,
249
260
msg ? : string
250
261
) : void ;
262
+
263
+ static closeTo (
264
+ actual : number ,
265
+ expected : number ,
266
+ delta : number ,
267
+ msg ? : string
268
+ ) : void ;
269
+ static approximately (
270
+ actual : number ,
271
+ expected : number ,
272
+ delta : number ,
273
+ msg ? : string
274
+ ) : void ;
275
+
276
+ // chai-immutable
277
+ static sizeOf ( val : mixed , length : number ) : void ;
251
278
}
252
279
253
280
declare var config: {
0 commit comments