mockfirebase
mockfirebase copied to clipboard
Support for Promises
https://www.firebase.com/blog/2016-01-21-keeping-our-promises.html
MockerFirebase API has now diverged from Firebase API (mainly due to the absence of Promises)
I second that. That would be really helpful :+1: Will try to take a look at PR for this myself, but not sure on when I'll be able to share changes.
anyone working on this? 😁 Happy to help contribute/test/qa but don't want to start from scratch if someone has already made progress
@dylanjha don't think anyone has, go for it!
I decided to go with https://github.com/urish/firebase-server instead which is working out nicely for me
I don't like much the firebase.server
as it needs to be executed in a separate process (unless I've missed something) so it's unusable in Travis and similar services.
Would be really great to catch up on latest API.
I'm running firebase.server on circleci with no issues. In the same node process that starts the jasmine testrunning.
I don't think the complication is about issues with another process, as much as it defies the methodology of unit tests. Idealy, you don't want to worry about external services until you reach integration/functional tests. Hence, while firebase-server has it's place, it doesn't belong in unit tests.
I agree that promise support is needed to keep the api in sync with Firebase.
In case it's helpful, here's how I've hacked MockFirebase in my project to support promises: https://github.com/code-dot-org/code-dot-org/pull/9976/commits/cf4adbc185a91aa726c2e3df3b94a8162204ba5d
I was able to get authentication promise support added for firebase sdk 3.x. See #112 for more info.