RxSwiftCommunity / RxFirebase

RxSwift extensions for Firebase
MIT License
224 stars 66 forks source link

Advice on unit testing and mocking results #9

Closed elprl closed 5 years ago

elprl commented 5 years ago

Do you have any advice on how to unit test a Firestore Rx call? For example, let's say I wanted to mock the return of a db.collection("cities").rx.listen() in order to test the diff.type == .added logic in my UI code. As far as I can see, we cannot init a QuerySnapshot object.