@@ -24,7 +24,7 @@ describe('Storage', function () {
24
24
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
25
25
await firebase . firestore ( ) . settings ( 'foo' ) ;
26
26
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
27
- } catch ( e ) {
27
+ } catch ( e : any ) {
28
28
return expect ( e . message ) . toContain ( "'settings' must be an object" ) ;
29
29
}
30
30
} ) ;
@@ -34,7 +34,7 @@ describe('Storage', function () {
34
34
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
35
35
await firebase . firestore ( ) . settings ( { foo : 'bar' } ) ;
36
36
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
37
- } catch ( e ) {
37
+ } catch ( e : any ) {
38
38
return expect ( e . message ) . toContain ( "'settings.foo' is not a valid settings field" ) ;
39
39
}
40
40
} ) ;
@@ -44,7 +44,7 @@ describe('Storage', function () {
44
44
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
45
45
await firebase . firestore ( ) . settings ( { cacheSizeBytes : 'foo' } ) ;
46
46
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
47
- } catch ( e ) {
47
+ } catch ( e : any ) {
48
48
return expect ( e . message ) . toContain ( "'settings.cacheSizeBytes' must be a number value" ) ;
49
49
}
50
50
} ) ;
@@ -53,7 +53,7 @@ describe('Storage', function () {
53
53
try {
54
54
await firebase . firestore ( ) . settings ( { cacheSizeBytes : 123 } ) ;
55
55
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
56
- } catch ( e ) {
56
+ } catch ( e : any ) {
57
57
return expect ( e . message ) . toContain ( "'settings.cacheSizeBytes' the minimum cache size" ) ;
58
58
}
59
59
} ) ;
@@ -69,7 +69,7 @@ describe('Storage', function () {
69
69
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
70
70
await firebase . firestore ( ) . settings ( { host : 123 } ) ;
71
71
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
72
- } catch ( e ) {
72
+ } catch ( e : any ) {
73
73
return expect ( e . message ) . toContain ( "'settings.host' must be a string value" ) ;
74
74
}
75
75
} ) ;
@@ -78,7 +78,7 @@ describe('Storage', function () {
78
78
try {
79
79
await firebase . firestore ( ) . settings ( { host : '' } ) ;
80
80
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
81
- } catch ( e ) {
81
+ } catch ( e : any ) {
82
82
return expect ( e . message ) . toContain ( "'settings.host' must not be an empty string" ) ;
83
83
}
84
84
} ) ;
@@ -88,7 +88,7 @@ describe('Storage', function () {
88
88
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
89
89
await firebase . firestore ( ) . settings ( { persistence : 'true' } ) ;
90
90
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
91
- } catch ( e ) {
91
+ } catch ( e : any ) {
92
92
return expect ( e . message ) . toContain ( "'settings.persistence' must be a boolean value" ) ;
93
93
}
94
94
} ) ;
@@ -98,7 +98,7 @@ describe('Storage', function () {
98
98
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
99
99
await firebase . firestore ( ) . settings ( { ssl : 'true' } ) ;
100
100
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
101
- } catch ( e ) {
101
+ } catch ( e : any ) {
102
102
return expect ( e . message ) . toContain ( "'settings.ssl' must be a boolean value" ) ;
103
103
}
104
104
} ) ;
@@ -108,7 +108,7 @@ describe('Storage', function () {
108
108
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
109
109
await firestore ( ) . settings ( { ignoreUndefinedProperties : 'bogus' } ) ;
110
110
return Promise . reject ( new Error ( 'Should throw' ) ) ;
111
- } catch ( e ) {
111
+ } catch ( e : any ) {
112
112
return expect ( e . message ) . toContain ( "ignoreUndefinedProperties' must be a boolean value." ) ;
113
113
}
114
114
} ) ;
@@ -118,7 +118,7 @@ describe('Storage', function () {
118
118
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
119
119
await firestore ( ) . settings ( { serverTimestampBehavior : 'bogus' } ) ;
120
120
return Promise . reject ( new Error ( 'Should throw' ) ) ;
121
- } catch ( e ) {
121
+ } catch ( e : any ) {
122
122
return expect ( e . message ) . toContain (
123
123
"serverTimestampBehavior' must be one of 'estimate', 'previous', 'none'" ,
124
124
) ;
@@ -132,7 +132,7 @@ describe('Storage', function () {
132
132
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
133
133
await firebase . firestore ( ) . runTransaction ( 'foo' ) ;
134
134
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
135
- } catch ( e ) {
135
+ } catch ( e : any ) {
136
136
return expect ( e . message ) . toContain ( "'updateFunction' must be a function" ) ;
137
137
}
138
138
} ) ;
@@ -149,7 +149,7 @@ describe('Storage', function () {
149
149
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
150
150
firebase . firestore ( ) . collectionGroup ( 123 ) ;
151
151
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
152
- } catch ( e ) {
152
+ } catch ( e : any ) {
153
153
return expect ( e . message ) . toContain ( "'collectionId' must be a string value" ) ;
154
154
}
155
155
} ) ;
@@ -158,7 +158,7 @@ describe('Storage', function () {
158
158
try {
159
159
firebase . firestore ( ) . collectionGroup ( '' ) ;
160
160
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
161
- } catch ( e ) {
161
+ } catch ( e : any ) {
162
162
return expect ( e . message ) . toContain ( "'collectionId' must be a non-empty string" ) ;
163
163
}
164
164
} ) ;
@@ -167,7 +167,7 @@ describe('Storage', function () {
167
167
try {
168
168
firebase . firestore ( ) . collectionGroup ( `someCollection/bar` ) ;
169
169
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
170
- } catch ( e ) {
170
+ } catch ( e : any ) {
171
171
return expect ( e . message ) . toContain ( "'collectionId' must not contain '/'" ) ;
172
172
}
173
173
} ) ;
@@ -179,7 +179,7 @@ describe('Storage', function () {
179
179
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
180
180
firebase . firestore ( ) . collection ( 123 ) ;
181
181
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
182
- } catch ( e ) {
182
+ } catch ( e : any ) {
183
183
return expect ( e . message ) . toContain ( "'collectionPath' must be a string value" ) ;
184
184
}
185
185
} ) ;
@@ -188,7 +188,7 @@ describe('Storage', function () {
188
188
try {
189
189
firebase . firestore ( ) . collection ( '' ) ;
190
190
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
191
- } catch ( e ) {
191
+ } catch ( e : any ) {
192
192
return expect ( e . message ) . toContain ( "'collectionPath' must be a non-empty string" ) ;
193
193
}
194
194
} ) ;
@@ -197,7 +197,7 @@ describe('Storage', function () {
197
197
try {
198
198
firebase . firestore ( ) . collection ( `firestore/bar` ) ;
199
199
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
200
- } catch ( e ) {
200
+ } catch ( e : any ) {
201
201
return expect ( e . message ) . toContain ( "'collectionPath' must point to a collection" ) ;
202
202
}
203
203
} ) ;
@@ -215,7 +215,7 @@ describe('Storage', function () {
215
215
// @ts -ignore the type is incorrect *on purpose* to test type checking in javascript
216
216
firebase . firestore ( ) . doc ( 123 ) ;
217
217
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
218
- } catch ( e ) {
218
+ } catch ( e : any ) {
219
219
return expect ( e . message ) . toContain ( "'documentPath' must be a string value" ) ;
220
220
}
221
221
} ) ;
@@ -224,7 +224,7 @@ describe('Storage', function () {
224
224
try {
225
225
firebase . firestore ( ) . doc ( '' ) ;
226
226
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
227
- } catch ( e ) {
227
+ } catch ( e : any ) {
228
228
return expect ( e . message ) . toContain ( "'documentPath' must be a non-empty string" ) ;
229
229
}
230
230
} ) ;
@@ -233,7 +233,7 @@ describe('Storage', function () {
233
233
try {
234
234
firebase . firestore ( ) . doc ( `${ COLLECTION } /bar/baz` ) ;
235
235
return Promise . reject ( new Error ( 'Did not throw an Error.' ) ) ;
236
- } catch ( e ) {
236
+ } catch ( e : any ) {
237
237
return expect ( e . message ) . toContain ( "'documentPath' must point to a document" ) ;
238
238
}
239
239
} ) ;
@@ -254,7 +254,7 @@ describe('Storage', function () {
254
254
} ) ;
255
255
256
256
return Promise . reject ( new Error ( 'Expected set() to throw' ) ) ;
257
- } catch ( e ) {
257
+ } catch ( e : any ) {
258
258
return expect ( e . message ) . toEqual ( 'Unsupported field value: undefined' ) ;
259
259
}
260
260
} ) ;
@@ -270,7 +270,7 @@ describe('Storage', function () {
270
270
} ,
271
271
} ) ;
272
272
return Promise . reject ( new Error ( 'Expected set() to throw' ) ) ;
273
- } catch ( e ) {
273
+ } catch ( e : any ) {
274
274
return expect ( e . message ) . toEqual ( 'Unsupported field value: undefined' ) ;
275
275
}
276
276
} ) ;
@@ -283,7 +283,7 @@ describe('Storage', function () {
283
283
myArray : [ { name : 'Tim' , location : { state : undefined , country : 'United Kingdom' } } ] ,
284
284
} ) ;
285
285
return Promise . reject ( new Error ( 'Expected set() to throw' ) ) ;
286
- } catch ( e ) {
286
+ } catch ( e : any ) {
287
287
return expect ( e . message ) . toEqual ( 'Unsupported field value: undefined' ) ;
288
288
}
289
289
} ) ;
0 commit comments