@dereekb/firebase 13.10.1 → 13.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +4 -4
- package/index.esm.js +4 -4
- package/package.json +5 -5
- package/src/lib/common/firestore/collection/collection.d.ts +10 -0
- package/src/lib/common/firestore/collection/collection.single.d.ts +18 -7
- package/src/lib/common/firestore/collection/subcollection.d.ts +11 -0
- package/src/lib/common/firestore/collection/subcollection.single.d.ts +7 -0
- package/test/index.cjs.js +238 -213
- package/test/index.esm.js +239 -214
- package/test/package.json +6 -6
- package/test/src/lib/common/firestore/firestore.d.ts +1 -0
- package/test/src/lib/common/firestore/test.driver.accessor.d.ts +18 -6
- package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +1 -1
- package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +1 -1
package/test/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase/test",
|
|
3
|
-
"version": "13.10.
|
|
3
|
+
"version": "13.10.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/date": "13.10.
|
|
6
|
-
"@dereekb/firebase": "13.10.
|
|
7
|
-
"@dereekb/model": "13.10.
|
|
8
|
-
"@dereekb/rxjs": "13.10.
|
|
9
|
-
"@dereekb/util": "13.10.
|
|
5
|
+
"@dereekb/date": "13.10.3",
|
|
6
|
+
"@dereekb/firebase": "13.10.3",
|
|
7
|
+
"@dereekb/model": "13.10.3",
|
|
8
|
+
"@dereekb/rxjs": "13.10.3",
|
|
9
|
+
"@dereekb/util": "13.10.3",
|
|
10
10
|
"@firebase/rules-unit-testing": "5.0.0",
|
|
11
11
|
"date-fns": "^4.1.0",
|
|
12
12
|
"firebase": "^12.12.1",
|
|
@@ -11,6 +11,7 @@ export interface TestingFirestoreAccessorDriver extends FirestoreAccessorDriver
|
|
|
11
11
|
* Initializes fuzzed path names for the input collections. Returns the result of getFuzzedCollectionsNameMap().
|
|
12
12
|
*
|
|
13
13
|
* This initialization step is useful for the client, where the rules file needs to be updated to reflect the collection names properly in order to ensure rules are correct.
|
|
14
|
+
*
|
|
14
15
|
* @param collectionNames
|
|
15
16
|
*/
|
|
16
17
|
initWithCollectionNames(collectionNames: string[]): Map<string, string>;
|
|
@@ -20,16 +20,22 @@ export declare function describeFirestoreAccessorDriverTests(f: MockItemCollecti
|
|
|
20
20
|
* (get, set, update, create, delete, stream, transactions, write batches).
|
|
21
21
|
*/
|
|
22
22
|
export interface DescribeAccessorTests<T> {
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The Firestore context used for running transactions and creating batches.
|
|
25
|
+
*/
|
|
24
26
|
context: FirestoreContext;
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Returns the document under test. Called fresh in each `beforeEach`.
|
|
29
|
+
*/
|
|
26
30
|
firestoreDocument: Getter<FirestoreDocument<T>>;
|
|
27
31
|
/**
|
|
28
32
|
* Returns partial data for the first of two sequential updates within a transaction.
|
|
29
33
|
* Used to verify that non-overlapping fields survive a second update.
|
|
30
34
|
*/
|
|
31
35
|
dataForFirstOfTwoUpdates: () => Partial<T>;
|
|
32
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Returns partial data used for standard update/set assertions.
|
|
38
|
+
*/
|
|
33
39
|
dataForUpdate: () => Partial<T>;
|
|
34
40
|
/**
|
|
35
41
|
* Optional predicate that checks whether fields from the first update
|
|
@@ -37,11 +43,17 @@ export interface DescribeAccessorTests<T> {
|
|
|
37
43
|
* the multi-update transaction test will assert this returns `true`.
|
|
38
44
|
*/
|
|
39
45
|
hasRemainingDataFromFirstOfTwoUpdate?: (data: T) => boolean;
|
|
40
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Predicate that returns `true` when the document's data reflects a successful update.
|
|
48
|
+
*/
|
|
41
49
|
hasDataFromUpdate: (data: T) => boolean;
|
|
42
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Loads the document within a transaction context for transaction-based tests.
|
|
52
|
+
*/
|
|
43
53
|
loadDocumentForTransaction: (transaction: Transaction, ref?: DocumentReference<T>) => AbstractFirestoreDocument<T, any>;
|
|
44
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Loads the document within a write batch context for batch-based tests.
|
|
56
|
+
*/
|
|
45
57
|
loadDocumentForWriteBatch: (writeBatch: WriteBatch, ref?: DocumentReference<T>) => FirestoreDocument<T, any>;
|
|
46
58
|
}
|
|
47
59
|
/**
|
|
@@ -57,4 +57,4 @@ export interface MockItemCollectionFirebaseContextConfig {
|
|
|
57
57
|
* }));
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
export declare function testWithMockItemCollectionFixture(
|
|
60
|
+
export declare function testWithMockItemCollectionFixture(_config?: MockItemCollectionFirebaseContextConfig): TestWrappedContextFactoryBuilder<MockItemCollectionFixture, TestFirestoreContextFixture>;
|
|
@@ -42,4 +42,4 @@ export interface MockItemStorageFirebaseStorageContextConfig {
|
|
|
42
42
|
* }));
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
export declare function testWithMockItemStorageFixture(
|
|
45
|
+
export declare function testWithMockItemStorageFixture(_config?: MockItemStorageFirebaseStorageContextConfig): TestWrappedContextFactoryBuilder<MockItemStorageFixture, TestFirebaseStorageContextFixture>;
|