Skip to content

Commit a7841bf

Browse files
Fix Compat tests (finally)
1 parent 2b8c990 commit a7841bf

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

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

+10-6
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ describe('Firebase Storage > Reference', () => {
164164
describe('list', () => {
165165
it('throws on invalid maxResults', () => {
166166
const child = service.refFromURL('gs://test-bucket/hello');
167-
expect(child.list({ maxResults: 0 })).to.throw(
167+
expect(() => child.list({ maxResults: 0 })).to.throw(
168168
'storage/invalid-argument'
169169
);
170-
expect(child.list({ maxResults: -4 })).to.throw(
170+
expect(() => child.list({ maxResults: -4 })).to.throw(
171171
'storage/invalid-argument'
172172
);
173-
expect(child.list({ maxResults: 1001 })).to.throw(
173+
expect(() => child.list({ maxResults: 1001 })).to.throw(
174174
'storage/invalid-argument'
175175
);
176176
});
@@ -196,15 +196,19 @@ describe('Firebase Storage > Reference', () => {
196196
expect(() => root.delete()).to.throw('storage/invalid-root-operation');
197197
});
198198
it('getMetadata throws', () => {
199-
expect(root.getMetadata()).to.throw('storage/invalid-root-operation');
199+
expect(() => root.getMetadata()).to.throw(
200+
'storage/invalid-root-operation'
201+
);
200202
});
201203
it('updateMetadata throws', () => {
202-
expect(root.updateMetadata({})).to.throw(
204+
expect(() => root.updateMetadata({})).to.throw(
203205
'storage/invalid-root-operation'
204206
);
205207
});
206208
it('getDownloadURL throws', async () => {
207-
expect(root.getDownloadURL()).to.throw('storage/invalid-root-operation');
209+
expect(() => root.getDownloadURL()).to.throw(
210+
'storage/invalid-root-operation'
211+
);
208212
});
209213
});
210214
});

0 commit comments

Comments
 (0)