Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Namespace: database

test.database

namespace   static

Namespace for testing Realtime Database functions using the Cloud Functions for Firebase Test SDK.

Methods

exampleDataSnapshot

static

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

static

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

static

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. ThedatabaseURL supplied when initializing the app is used for creating this snapshot. You do not need to supply this parameter if you supplied config values when initializingfirebase-functions-test.

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.


[8]ページ先頭

©2009-2025 Movatter.jp