mjimenezleon13 / clapHelp

Non-profit initiative to help and support those that are actively fighting COVID-19 around the globe.
https://www.claphelp.life
2 stars 1 forks source link

Fix function testing #74

Closed aristizabal95 closed 4 years ago

aristizabal95 commented 4 years ago

Function tests always returned a pass, even when they failed. This is because we had no access to the firebase sdk because the tests are offline. This PR fixes that, by adding a mocked firebase library, and by changing the tests so they actually check the desired functionality. Some helpers have been added to easily simulate requests and responses expected form the app, as well as being able to seed the database for stochastic or deterministic testing. This PR is compatible with the current state of the app, and should be pushed so that future PR's are tested against this working tests.

aristizabal95 commented 4 years ago

Since some tests expect the new database structure, this branch will be pushed on the next-release branch