Namespace: database Stay organized with collections Save and categorize content based on your preferences.
test. database
Namespace for testing Realtime Database functions using the Cloud Functions for Firebase Test SDK.
Methods
exampleDataSnapshot
exampleDataSnapshot() returns test.database.DataSnapshot
Fetch an example data snapshot already populated with data. Can be passed into a wrapped databaseonCreate oronDelete function.
- Returns
non-null test.database.DataSnapshot
exampleDataSnapshotChange
exampleDataSnapshotChange() returns test.database.DataSnapshot
Fetch an exampleChange object of data snapshots already populated with data. Can be passed into a wrapped databaseonUpdate oronWrite function.
- Returns
non-null test.database.DataSnapshot
makeDataSnapshot
makeDataSnapshot(val, refPath, app) returns test.database.DataSnapshot
Create a data snapshot for testing.
Parameter | |
|---|---|
val | (string, number, boolean, or non-null Object) Value of data for the snapshot. |
refPath | string Full path of the reference (e.g. 'users/alovelace'). |
app | firebase.app.App The Firebase app that the database belongs to. The Value may be null. |
- Returns
non-null test.database.DataSnapshot
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.