firebase-mock
firebase-mock copied to clipboard
Firebase Mock update() returns the updated value instead of void
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.