Skip to content

Commit 36e4fd5

Browse files
committed
bundle test
1 parent 4ec62ae commit 36e4fd5

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

packages/firestore/test/integration/api/query.test.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ import {
3737
endAt,
3838
endBefore,
3939
GeoPoint,
40-
getDocFromCache,
4140
getDocs,
4241
limit,
4342
limitToLast,
44-
loadBundle,
4543
onSnapshot,
4644
or,
4745
orderBy,
@@ -76,46 +74,6 @@ import { captureExistenceFilterMismatches } from '../util/testing_hooks_util';
7674
apiDescribe('Queries', persistence => {
7775
addEqualityMatcher();
7876

79-
it('QuerySnapshot.toJSON bundle getDocFromCache', async () => {
80-
let path: string | null = null;
81-
let jsonBundle: object | null = null;
82-
const testDocs = {
83-
a: { k: 'a' },
84-
b: { k: 'b' },
85-
c: { k: 'c' }
86-
};
87-
// Write an initial document in an isolated Firestore instance so it's not stored in the cache.
88-
await withTestCollection(persistence, testDocs, async collection => {
89-
await getDocs(query(collection)).then(querySnapshot => {
90-
expect(querySnapshot.docs.length).to.equal(3);
91-
// Find the path to a known doc.
92-
querySnapshot.docs.forEach(docSnapshot => {
93-
if (docSnapshot.ref.path.endsWith('a')) {
94-
path = docSnapshot.ref.path;
95-
}
96-
});
97-
expect(path).to.not.be.null;
98-
jsonBundle = querySnapshot.toJSON();
99-
});
100-
});
101-
expect(jsonBundle).to.not.be.null;
102-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
103-
const json = (jsonBundle as any).bundle;
104-
expect(json).to.exist;
105-
expect(json.length).to.be.greaterThan(0);
106-
107-
if (path !== null) {
108-
await withTestDb(persistence, async db => {
109-
const docRef = doc(db, path!);
110-
await loadBundle(db, json);
111-
112-
const docSnap = await getDocFromCache(docRef);
113-
expect(docSnap.exists);
114-
expect(docSnap.data()).to.deep.equal(testDocs.a);
115-
});
116-
}
117-
});
118-
11977
it('can issue limit queries', () => {
12078
const testDocs = {
12179
a: { k: 'a' },

0 commit comments

Comments
 (0)