firebase-mock icon indicating copy to clipboard operation
firebase-mock copied to clipboard

Firebase Mock update() returns the updated value instead of void

Open Redmega opened this issue 7 years ago • 0 comments

According to the firebase docs, ref().update() returns firebase.Promise containing void

Ran into this issue when writing tests for some endpoints. My tests ensured that the updated value was returned to the client, but when actually doing the requests we were facing issues where undefined was being returned instead. Took about two hours of effort to figure out it was because the tests did not actually reflect an accurate representation of the server/database.

Redmega avatar Oct 18 '18 20:10 Redmega