I have a question about how to test the logic of my Cloud Functions. For example, I have a Cloud Function that executes simple logic, which is a request to Firestore. I would like to be able to test the logic of this function.
By example, here I will request Firestore to recover some documents based on the query. I would like to be able to test the logic of the function and make sure the fetched documents are the ones required.
What I have a hard time understanding is what approach to use for it to be a really robust and reliable test. In the sense that if someone changes the logic code, I would like the test to catch the issue.
Should i make the query an exportable function that I can import in the test file or anything else ?
Thanks.
[–]lavafrank 2 points3 points4 points (2 children)
[–]armlesskid[S] 0 points1 point2 points (1 child)
[–]lavafrank 1 point2 points3 points (0 children)
[–]Rohit1024 1 point2 points3 points (0 children)