katowulf / mockfirebase

Firebase mock library for writing unit tests (experimental)
157 stars 40 forks source link

add firebase sdk 3.x support #112

Closed soumak77 closed 6 years ago

soumak77 commented 7 years ago

Adds basic database support to work with firebase sdk 3.x. Many more changes needed, but this is a start.

I added a custom build with these changes to the Firebase Template for Angular Base Apps. With these changes, the tests are now passing using Firebase SDK 3.x and AngularFire 2.x:

soumak77 commented 7 years ago

I added promise support to the authentication code using rsvp which is the same library the firebase sdk appears to use.

Using a custom build with these changes, I was able to write passing authentication unit tests for the same project specified above:

@katowulf let me know if I'm going down the right path and I'll add new test cases to this PR

giltotherescue commented 7 years ago

Would love to see Firebase 3.0 support merged in. Thank you!

Grantlyk commented 7 years ago

@soumak77 Have you considered forking?

soumak77 commented 7 years ago

@Grantlyk it's looking like I'll need to split this off into it's own repo. Hopefully I'll find the time in the coming weeks.

Grantlyk commented 7 years ago

@soumak77 Your work is appreciated, an update here would be good on how you get on with that, i'd be interested to use your finished product/contribute in some way

soumak77 commented 7 years ago

I duplicated this repo as firebase-mock and published v1.0.0 with the firebase 3.0 changes.

prescottprue commented 7 years ago

Thanks a ton @soumak77!

It would be nice to get these changes merged back into this repo since it is the first mock library most find.

mkobar commented 7 years ago

Don't know if this helps anyone but ...

I just created a pull request #98 for firebase/angularfire-seed that adds firebase-3.x and angularfire-2.x support - but without the mock-firebase unit tests working. I'm starting to look at firebase-mock to fix them all, but need to get my production system fixed first.

May help out issue #109 too.

Please let me know if anyone can help get the unit tests fixed - or even point me in the right direction.

Thanks!

soumak77 commented 7 years ago

@mkobar you can check out this angular template which uses firebase-mock

soumak77 commented 6 years ago

These changes are available in https://github.com/soumak77/firebase-mock