soumak77 / firebase-mock

Firebase mock library for writing unit tests
https://soumak77.github.io/firebase-mock
350 stars 96 forks source link

firebase.storage is missing from MockFirebaseSdk #71

Closed peterhry closed 6 years ago

peterhry commented 6 years ago

firebase.storage is missing from MockFirebaseSdk.

Example:

import {MockFirebaseSdk} from 'firebase-mock'

const firebaseApp = new MockFirebaseSdk().initializeApp()

console.log(firebaseApp.storage)
//=> undefined

https://firebase.google.com/docs/reference/js/firebase.storage

soumak77 commented 6 years ago

I'm currently using @google-cloud/storage in my server code to interface with storage (this was done before firebase-admin supported storage). I have all my storage functionality mocked, so it should be easy to convert that logic into this library. I'll work on this once I get around to converting my server source code to use firebase storage API.

peterhry commented 6 years ago

Thanks for the quick response @soumak77

soumak77 commented 6 years ago

@peterhry mocks have been added for storage API for firebase and firebase-admin. Not all APIs are mocked, just the most common use cases. Create additional issues if more APIs need to be supported.