Skip to content

Commit da1e188

Browse files
committed
code review changes
1 parent 7640102 commit da1e188

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
@@ -83,24 +83,27 @@ describe("firestore", () => {
8383
} = require("firebase/firestore");
8484

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

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

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

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

0 commit comments

Comments
 (0)