Skip to content

Commit 3fc7c4e

Browse files
Test fix
1 parent 187ef92 commit 3fc7c4e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/storage/test/unit/reference.test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,13 @@ describe('Firebase Storage > Reference', () => {
322322
describe('Argument verification', () => {
323323
describe('list', () => {
324324
it('throws on invalid maxResults', async () => {
325-
expect(() => list(child, { maxResults: 0 })).to.throw(
325+
await expect(list(child, { maxResults: 0 })).to.be.rejectedWith(
326326
'storage/invalid-argument'
327327
);
328-
expect(() => list(child, { maxResults: -4 })).to.throw(
328+
await expect(list(child, { maxResults: -4 })).to.be.rejectedWith(
329329
'storage/invalid-argument'
330330
);
331-
expect(() => list(child, { maxResults: 1001 })).to.throw(
331+
await expect(list(child, { maxResults: 1001 })).to.be.rejectedWith(
332332
'storage/invalid-argument'
333333
);
334334
});
@@ -352,22 +352,22 @@ describe('Firebase Storage > Reference', () => {
352352
);
353353
});
354354
it('deleteObject throws', async () => {
355-
expect(() => deleteObject(root)).to.throw(
355+
await expect(deleteObject(root)).to.be.rejectedWith(
356356
'storage/invalid-root-operation'
357357
);
358358
});
359359
it('getMetadata throws', async () => {
360-
expect(() => getMetadata(root)).to.throw(
360+
await expect(getMetadata(root)).to.be.rejectedWith(
361361
'storage/invalid-root-operation'
362362
);
363363
});
364364
it('updateMetadata throws', async () => {
365-
expect(() => updateMetadata(root, {} as Metadata)).to.throw(
365+
await expect(updateMetadata(root, {} as Metadata)).to.be.rejectedWith(
366366
'storage/invalid-root-operation'
367367
);
368368
});
369369
it('getDownloadURL throws', async () => {
370-
expect(() => getDownloadURL(root)).to.throw(
370+
await expect(getDownloadURL(root)).to.be.rejectedWith(
371371
'storage/invalid-root-operation'
372372
);
373373
});

0 commit comments

Comments
 (0)