test. firestore
Namespace for testing Cloud Firestore functions using the Cloud Functions for Firebase Test SDK.
Interface
DocumentSnapshotOptions
Methods
exampleDocumentSnapshot
exampleDocumentSnapshot() returns test.firestore.DocumentSnapshot
Fetch an example Change
object of document snapshots already populated with data. Can be passed into a wrapped Firestore onCreate
or onDelete
function.
- Returns
-
non-null test.firestore.DocumentSnapshot
exampleDocumentSnapshotChange
exampleDocumentSnapshotChange() returns test.firestore.DocumentSnapshot
Fetch an example Change
object of document snapshots already populated with data. Can be passed into a wrapped Firestore onUpdate
or onWrite
function.
- Returns
-
non-null test.firestore.DocumentSnapshot
makeDocumentSnapshot
makeDocumentSnapshot(data, refPath, options) returns test.firestore.DocumentSnapshot
Create a document snapshot for testing.
Parameter |
|
---|---|
data |
Object Key-value pairs representing data in the document. Pass in Value must not be null. |
refPath |
string Full path of the reference (e.g. 'users/alovelace'). |
options |
Object Optional parameters as Value may be null. |
- Returns
-
non-null test.firestore.DocumentSnapshot