[tests][storage] content tests - need expanding - verified on console

This commit is contained in:
Salakar 2018-07-10 22:17:11 +01:00
parent 7e68d5eb11
commit b4f97c8f8c
1 changed files with 26 additions and 0 deletions

View File

@ -49,6 +49,18 @@ describe('storage()', () => {
.downloadFile(
`${firebase.storage.Native.DOCUMENT_DIRECTORY_PATH}/ok.jpeg`
);
await firebase
.storage()
.ref('/cat.gif')
.downloadFile(
`${firebase.storage.Native.DOCUMENT_DIRECTORY_PATH}/cat.gif`
);
await firebase
.storage()
.ref('/hei.heic')
.downloadFile(
`${firebase.storage.Native.DOCUMENT_DIRECTORY_PATH}/hei.heic`
);
});
it('errors if permission denied', async () => {
@ -75,6 +87,20 @@ describe('storage()', () => {
`${firebase.storage.Native.DOCUMENT_DIRECTORY_PATH}/ok.jpeg`
);
await firebase
.storage()
.ref('/uploadCat.gif')
.putFile(
`${firebase.storage.Native.DOCUMENT_DIRECTORY_PATH}/cat.gif`
);
await firebase
.storage()
.ref('/uploadHei.heic')
.putFile(
`${firebase.storage.Native.DOCUMENT_DIRECTORY_PATH}/hei.heic`
);
uploadTaskSnapshot.state.should.eql(firebase.storage.TaskState.SUCCESS);
uploadTaskSnapshot.bytesTransferred.should.eql(
uploadTaskSnapshot.totalBytes