firestore-jest-mock
Advanced tools
Comparing version 0.24.0 to 0.25.0
@@ -28,2 +28,3 @@ declare const _exports: { | ||
mockQueryOnSnapshot: jest.Mock<any, any>; | ||
mockQueryOnSnapshotUnsubscribe: jest.Mock<any, any>; | ||
mockWithConverter: jest.Mock<any, any>; | ||
@@ -30,0 +31,0 @@ FakeFirestore: typeof FakeFirestore; |
@@ -18,3 +18,3 @@ export class Query { | ||
withConverter(...args: any[]): any; | ||
onSnapshot(...args: any[]): () => void; | ||
onSnapshot(...args: any[]): jest.Mock<any, any>; | ||
} | ||
@@ -30,2 +30,3 @@ declare const mockGet: jest.Mock<any, any>; | ||
declare const mockQueryOnSnapshot: jest.Mock<any, any>; | ||
declare const mockQueryOnSnapshotUnsubscribe: jest.Mock<any, any>; | ||
declare const mockWithConverter: jest.Mock<any, any>; | ||
@@ -42,2 +43,3 @@ export declare namespace mocks { | ||
export { mockQueryOnSnapshot }; | ||
export { mockQueryOnSnapshotUnsubscribe }; | ||
export { mockWithConverter }; | ||
@@ -44,0 +46,0 @@ } |
@@ -12,2 +12,3 @@ "use strict"; | ||
const mockQueryOnSnapshot = jest.fn(); | ||
const mockQueryOnSnapshotUnsubscribe = jest.fn(); | ||
const mockWithConverter = jest.fn(); | ||
@@ -118,4 +119,4 @@ class Query { | ||
} | ||
// Returns an unsubscribe function | ||
return () => { }; | ||
// Returns an unsubscribe mock | ||
return mockQueryOnSnapshotUnsubscribe; | ||
} | ||
@@ -135,2 +136,3 @@ } | ||
mockQueryOnSnapshot, | ||
mockQueryOnSnapshotUnsubscribe, | ||
mockWithConverter, | ||
@@ -137,0 +139,0 @@ }, |
{ | ||
"name": "firestore-jest-mock", | ||
"version": "0.24.0", | ||
"version": "0.25.0", | ||
"description": "Jest helper for mocking Google Cloud Firestore", | ||
@@ -5,0 +5,0 @@ "author": "", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
135942
1681