firestore-jest-mock
Advanced tools
Comparing version 0.12.0 to 0.13.0
@@ -20,2 +20,3 @@ const mockInitializeApp = jest.fn(); | ||
firestoreConstructor.Transaction = FakeFirestore.Transaction; | ||
firestoreConstructor.FieldPath = FakeFirestore.FieldPath; | ||
@@ -22,0 +23,0 @@ // The Firebase mock |
@@ -5,2 +5,3 @@ import type { FieldValue } from './fieldValue'; | ||
import type { Transaction } from './transaction'; | ||
import type { FieldPath } from './path' | ||
@@ -37,2 +38,3 @@ import type { MockedDocument, DocumentData } from './helpers/buildDocFromHash'; | ||
static Transaction: typeof Transaction; | ||
static FieldPath: typeof FieldPath; | ||
@@ -130,2 +132,3 @@ static DocumentReference: typeof DocumentReference; | ||
export const mockUseEmulator: jest.Mock; | ||
export const mockListDocuments: jest.Mock; | ||
@@ -132,0 +135,0 @@ export const mockBatchDelete: jest.Mock; |
@@ -13,2 +13,3 @@ const mockCollectionGroup = jest.fn(); | ||
const mockDelete = jest.fn(); | ||
const mockListDocuments = jest.fn(); | ||
@@ -26,2 +27,3 @@ const mockBatchDelete = jest.fn(); | ||
const transaction = require('./transaction'); | ||
const path = require('./path'); | ||
@@ -178,2 +180,3 @@ const buildDocFromHash = require('./helpers/buildDocFromHash'); | ||
FakeFirestore.Transaction = transaction.Transaction; | ||
FakeFirestore.FieldPath = path.FieldPath; | ||
@@ -401,2 +404,7 @@ /* | ||
listDocuments() { | ||
mockListDocuments(); | ||
return Promise.resolve([new FakeFirestore.DocumentReference(_randomId(), this)]); | ||
} | ||
get() { | ||
@@ -439,2 +447,3 @@ query.mocks.mockGet(...arguments); | ||
mockOnSnapShot, | ||
mockListDocuments, | ||
...query.mocks, | ||
@@ -441,0 +450,0 @@ ...transaction.mocks, |
@@ -14,2 +14,3 @@ import type { StubOverrides, StubOptions } from './firebase'; | ||
FieldValue: typeof Firestore.FieldValue; | ||
FieldPath: typeof Firestore.FieldPath; | ||
Timestamp: typeof Firestore.Timestamp; | ||
@@ -16,0 +17,0 @@ Transaction: typeof Firestore.Transaction; |
@@ -16,2 +16,3 @@ const defaultOptions = require('./helpers/defaultMockOptions'); | ||
FieldValue: FakeFirestore.FieldValue, | ||
FieldPath: FakeFirestore.FieldPath, | ||
Timestamp: FakeFirestore.Timestamp, | ||
@@ -18,0 +19,0 @@ Transaction: FakeFirestore.Transaction, |
{ | ||
"name": "firestore-jest-mock", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Jest helper for mocking Google Cloud Firestore", | ||
@@ -5,0 +5,0 @@ "author": "", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162280
54
2829