However, auth.createUser is not called. .then is not being called. After some digging, I've found that AngularFire does seem to be resolving the deferred internally but this doesn't propagate to .then being called.
Am I doing something incorrectly / is there a better way to do this test, or is this just an issue?
You need to call $timeout.flush() after injecting $timeout. Otherwise Angular won't try to resolve the promise. This is a general Angular testing requirement and not specific to MockFirebase.
I'm using angularfire and have
$firebaseAuth(ref).$authWithOAuthPopup
called.This works in my app, but I want to be able to test the user's login. In my test, I have:
However,
auth.createUser
is not called..then
is not being called. After some digging, I've found that AngularFire does seem to be resolving the deferred internally but this doesn't propagate to.then
being called.Am I doing something incorrectly / is there a better way to do this test, or is this just an issue?