Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

firestore-jest-mock

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firestore-jest-mock - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

__tests__/path.test.js

1

mocks/firebase.js

@@ -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,

2

package.json
{
"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": "",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc