@@ -162,15 +162,15 @@ describe('Firebase Storage > Reference', () => {
162
162
163
163
describe ( 'Argument verification' , ( ) => {
164
164
describe ( 'list' , ( ) => {
165
- it ( 'throws on invalid maxResults' , async ( ) => {
165
+ it ( 'throws on invalid maxResults' , ( ) => {
166
166
const child = service . refFromURL ( 'gs://test-bucket/hello' ) ;
167
- await expect ( child . list ( { maxResults : 0 } ) ) . to . be . rejectedWith (
167
+ expect ( child . list ( { maxResults : 0 } ) ) . to . throw (
168
168
'storage/invalid-argument'
169
169
) ;
170
- await expect ( child . list ( { maxResults : - 4 } ) ) . to . be . rejectedWith (
170
+ expect ( child . list ( { maxResults : - 4 } ) ) . to . throw (
171
171
'storage/invalid-argument'
172
172
) ;
173
- await expect ( child . list ( { maxResults : 1001 } ) ) . to . be . rejectedWith (
173
+ expect ( child . list ( { maxResults : 1001 } ) ) . to . throw (
174
174
'storage/invalid-argument'
175
175
) ;
176
176
} ) ;
@@ -195,20 +195,16 @@ describe('Firebase Storage > Reference', () => {
195
195
it ( 'delete throws' , ( ) => {
196
196
expect ( ( ) => root . delete ( ) ) . to . throw ( 'storage/invalid-root-operation' ) ;
197
197
} ) ;
198
- it ( 'getMetadata throws' , async ( ) => {
199
- await expect ( root . getMetadata ( ) ) . to . be . rejectedWith (
200
- 'storage/invalid-root-operation'
201
- ) ;
198
+ it ( 'getMetadata throws' , ( ) => {
199
+ expect ( root . getMetadata ( ) ) . to . throw ( 'storage/invalid-root-operation' ) ;
202
200
} ) ;
203
- it ( 'updateMetadata throws' , async ( ) => {
204
- await expect ( root . updateMetadata ( { } ) ) . to . be . rejectedWith (
201
+ it ( 'updateMetadata throws' , ( ) => {
202
+ expect ( root . updateMetadata ( { } ) ) . to . throw (
205
203
'storage/invalid-root-operation'
206
204
) ;
207
205
} ) ;
208
206
it ( 'getDownloadURL throws' , async ( ) => {
209
- await expect ( root . getDownloadURL ( ) ) . to . be . rejectedWith (
210
- 'storage/invalid-root-operation'
211
- ) ;
207
+ expect ( root . getDownloadURL ( ) ) . to . throw ( 'storage/invalid-root-operation' ) ;
212
208
} ) ;
213
209
} ) ;
214
210
} ) ;
0 commit comments