-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functions for creating Firestore for a given database #482
Conversation
external fun getFirestore(app: FirebaseApp? = definedExternally, database: String = definedExternally): Firestore | ||
|
||
external fun getFirestore(database: String = definedExternally): Firestore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is needed / allowed
Thanks @AKJAW, could you add a unit test for it? Then we can confirm if it works in JS |
The problem is that I cannot get the repository to synchronize properly, but if you could point me to some existing tests I can try to create something |
Are there any existing tests for initialization? All I see that it is used as the set-up for others tests. Do you just want me to create a test which uses these functions and verifies that there is no exception? |
sounds good |
67ef08c
to
3b050c4
Compare
i've added the tests, however I'm not sure if the one that doesn't specify app will be able to pass, since it probably won't be able to retrieve the app from a global context |
Yes the JS tests are failing with
|
The android tests are also failing but the test report for firestore appear to be missing, im not sure why, best to try running them locally |
Hello, we decided to not use this library, and I still wasn't able to get the project running locally, so I guess I'll close this pull request / convert it to a feature request for the future |
The current top level functions don't allow creating Firestore for specific databases in the same Google Cloud project
It is possible by having some work-around using expect actual but it's a big hassle and frakly I wasn't able to make pods cooperate with me
This PR "tries" to introduce those functions however I'm not sure about the JS implementations since I wasn't able to get the Repository to synchronize.