soumak77 / firebase-mock

Firebase mock library for writing unit tests
https://soumak77.github.io/firebase-mock
349 stars 97 forks source link

Ignore ReadOptions on getAll #134

Open op opened 5 years ago

op commented 5 years ago

This change ignores the optional ReadOptions in firestore.getAll. It also raises an exception if no argument were passed at all.

If you use the firebase-admin package and call getAll with only one argument; ReadOptions -- it will actually do the round-trip to the backend. If you have no arguments at all, it raises an exception and no promise is created. This behaviour is also mimicked.

The first argument is required and must be of type DocumentReference followed by any additional DocumentReference documents. If used, the optional ReadOptions must be the last argument.

References: https://cloud.google.com/nodejs/docs/reference/firestore/latest/Firestore#getAll

dmurvihill commented 4 years ago

Conversation continuing here (see #160)