Hi, guys. I just create a Firebase cloud function ...
# javascript
v
Hi, guys. I just create a Firebase cloud function using KotlinJS and it's look quite promising to JS newbie like me. I implement all the business logic in Kotlin file and covered it by Spek. The problem is for the function that involved with Firebase library. I'm not sure how to start testing with it. Any idea?
b
How about creating an abstraction over required Firebase API and mock it in tests?
v
I also consider that as one option in the list as well, but I would like to see if there is any easier way than create a wrapper for this library.
b
You can try to find some JS implementations of Firebase API, something like https://www.npmjs.com/package/firebase-mock
👍 1
v
Thanks. I will try on this weekend.
b
Wow, Firebase with KotlinJS. Looks nice