Skip to content

Commit 2b8c990

Browse files
Fix compat tests
1 parent 11b68a8 commit 2b8c990

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

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

+9-13
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ describe('Firebase Storage > Reference', () => {
162162

163163
describe('Argument verification', () => {
164164
describe('list', () => {
165-
it('throws on invalid maxResults', async () => {
165+
it('throws on invalid maxResults', () => {
166166
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(
168168
'storage/invalid-argument'
169169
);
170-
await expect(child.list({ maxResults: -4 })).to.be.rejectedWith(
170+
expect(child.list({ maxResults: -4 })).to.throw(
171171
'storage/invalid-argument'
172172
);
173-
await expect(child.list({ maxResults: 1001 })).to.be.rejectedWith(
173+
expect(child.list({ maxResults: 1001 })).to.throw(
174174
'storage/invalid-argument'
175175
);
176176
});
@@ -195,20 +195,16 @@ describe('Firebase Storage > Reference', () => {
195195
it('delete throws', () => {
196196
expect(() => root.delete()).to.throw('storage/invalid-root-operation');
197197
});
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');
202200
});
203-
it('updateMetadata throws', async () => {
204-
await expect(root.updateMetadata({})).to.be.rejectedWith(
201+
it('updateMetadata throws', () => {
202+
expect(root.updateMetadata({})).to.throw(
205203
'storage/invalid-root-operation'
206204
);
207205
});
208206
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');
212208
});
213209
});
214210
});

0 commit comments

Comments
 (0)