soumak77 / firebase-mock

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

Add listDocuments to collection #133

Open op opened 5 years ago

op commented 5 years ago

This adds support for the listDocuments method to CollectionReference.

I need this when calling firestore from a service and not from a client. When preparing this PR I realised that this method only exists in the firebase-admin package and not in the firebase package. How have you dealt with differences like this before?

References:

  1. https://cloud.google.com/nodejs/docs/reference/firestore/latest/CollectionReference#listDocuments
  2. https://firebase.google.com/docs/reference/js/firebase.firestore.CollectionReference
  3. https://github.com/googleapis/nodejs-firestore/pull/368
joelpoloney commented 4 years ago

Bump. Can we get this merged in?

dmurvihill commented 4 years ago

Hi @joelpoloney, this repo is no longer used (see #160) and we will be publishing new releases from my fork until we land on a permanent way forward. I've opened a new PR over there with this change.

We are also looking for maintainers.

joelpoloney commented 4 years ago

Oh! So sorry to hear :( Thank you for the update! I ended up forking it and support a few other use-cases as well: https://github.com/timbersoftware/firebase-mock/commits/master. Once your fork becomes the new source of truth, I can submit some PRs to you with the changes I made.

dmurvihill commented 4 years ago

Thanks, I'd be very grateful. I should become owner of the NPM name on or about 1 December and I'm looking to publish a minor version very soon after. So if you can open any PRs before next Thursday (Thanksgiving in the U.S.), that would give you the best chance of getting into the release.

We're all very grateful, I'm sure, for the quality package Bryan left us. Marrying all of our different forks and carrying on his work would be a great way to say thank you.

joelpoloney commented 4 years ago

Ok great! I can try to open the PRs for you before Thanksgiving. Some are easy to open... others are me hacking away at the code to fix a bug but probably isn't the best long term fix.