dmurvihill / firebase-mock

Firebase mock library for writing unit tests
55 stars 20 forks source link

Request: Mock QuerySnapshot.docChanges() method #72

Open akapur99 opened 4 years ago

akapur99 commented 4 years ago

Screenshot of issue

image (Code was copied much straightup from firebase docs)

Description

When running firestore.collection('x').onSnapshot (querySnapshot) => {querySnapshot.docChanges().forEach( ... which is present here https://googleapis.dev/nodejs/firestore/latest/QuerySnapshot.html#docChanges I encounter an error saying an error saying the method isn't present.

Was wondering if anyone has been able to mock the docChanges() method in QuerySnapshot? Or if there's a workaround for now