Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

Namespace: firestore

test.firestore

namespace   static

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

Interface

Methods

exampleDocumentSnapshot

static

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

static

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

static

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{} to mock the snapshot of a document that doesn't exist.

Value must not be null.

refPath

string

Full path of the reference (e.g. 'users/alovelace').

options

Object

Optional parameters asDocumentSnapshotOptions.

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.


[8]ページ先頭

©2009-2026 Movatter.jp