firebase / firebase-functions-test

MIT License
232 stars 48 forks source link

Updates `firebaseApp` check in `makeDocumentSnapshot` #80

Open rharter opened 3 years ago

rharter commented 3 years ago

Fixes #79

Pretty self-explainatory, the optional property check is checking for a property called app (like from RDB), but the firestore property is called firestoreApp.

The existing work-around when you want to create a snapshot in your own app is to add both properties and cast:

makeDocumentSnapshot(data, `/path/to/data`, {firebaseApp: app, app: app} as DocumentSnapshotOptions)