Skip to content

Commit 29be135

Browse files
committed
code review changes
1 parent 8fafe12 commit 29be135

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

firestore-next/test.firestore.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,27 @@ describe("firestore", () => {
8282
} = require("firebase/firestore");
8383

8484
// [START initialize_persistence]
85+
// Memory cache is the default if no config is specified.
86+
initializeFirestore(app);
87+
8588
// This is the default behavior if no persistence is specified.
8689
initializeFirestore(app, {localCache: memoryLocalCache()});
8790

88-
// Use IndexedDb persistence.
91+
// Defaults to single-tab persistence if no tab manager is specified.
8992
initializeFirestore(app, {localCache: persistentLocalCache(/*settings*/{})});
9093

91-
// Use IndexedDb persistence. Defaults to single-tab persistence if no tab
92-
// manager is specified.
94+
// Same as `initializeFirestore(app, {localCache: persistentLocalCache(/*settings*/{})})`,
95+
// but more explicit about tab management.
9396
initializeFirestore(app,
9497
{localCache:
9598
persistentLocalCache(/*settings*/{tabManager: persistentSingleTabManager()})
96-
}); // Same as enableIndexedDbPersistence
99+
});
97100

98101
// Use multi-tab IndexedDb persistence.
99102
initializeFirestore(app,
100103
{localCache:
101104
persistentLocalCache(/*settings*/{tabManager: persistentMultipleTabManager()})
102-
}); // Same as enableMultiTabIndexedDbPersistence
105+
});
103106
// [END initialize_persistence]
104107
});
105108

0 commit comments

Comments
 (0)