Namespace: firestore Stay organized with collections Save and categorize content based on your preferences.
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 exampleChange object of document snapshots already populated with data. Can be passed into a wrapped FirestoreonCreate oronDelete function.
- Returns
non-null test.firestore.DocumentSnapshot
exampleDocumentSnapshotChange
exampleDocumentSnapshotChange() returns test.firestore.DocumentSnapshot
Fetch an exampleChange object of document snapshots already populated with data. Can be passed into a wrapped FirestoreonUpdate oronWrite 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
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2019-12-03 UTC.