@@ -37,11 +37,9 @@ import {
37
37
endAt ,
38
38
endBefore ,
39
39
GeoPoint ,
40
- getDocFromCache ,
41
40
getDocs ,
42
41
limit ,
43
42
limitToLast ,
44
- loadBundle ,
45
43
onSnapshot ,
46
44
or ,
47
45
orderBy ,
@@ -76,46 +74,6 @@ import { captureExistenceFilterMismatches } from '../util/testing_hooks_util';
76
74
apiDescribe ( 'Queries' , persistence => {
77
75
addEqualityMatcher ( ) ;
78
76
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
-
119
77
it ( 'can issue limit queries' , ( ) => {
120
78
const testDocs = {
121
79
a : { k : 'a' } ,
0 commit comments