File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
packages/firestore/test/unit/local Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ import {
82
82
83
83
import * as persistenceHelpers from './persistence_test_helpers' ;
84
84
import { TestIndexManager } from './test_index_manager' ;
85
+ import {
86
+ IndexedDbIndexManager ,
87
+ indexedDbIndexManagerInstallFieldIndexPlugin
88
+ } from '../../../src/local/indexeddb_index_manager' ;
85
89
86
90
const TEST_TARGET_ID = 1 ;
87
91
@@ -271,6 +275,16 @@ function genericQueryEngineTest(
271
275
queryEngine = new QueryEngine ( ) ;
272
276
273
277
underlyingIndexManager = persistence . getIndexManager ( User . UNAUTHENTICATED ) ;
278
+ if ( configureCsi ) {
279
+ if ( ! ( underlyingIndexManager instanceof IndexedDbIndexManager ) ) {
280
+ throw new Error (
281
+ 'persistence.getIndexManager() should have ' +
282
+ 'returned an instance of IndexedDbIndexManager'
283
+ ) ;
284
+ }
285
+ indexedDbIndexManagerInstallFieldIndexPlugin ( underlyingIndexManager ) ;
286
+ }
287
+
274
288
remoteDocumentCache = persistence . getRemoteDocumentCache ( ) ;
275
289
remoteDocumentCache . setIndexManager ( underlyingIndexManager ) ;
276
290
mutationQueue = persistence . getMutationQueue (
@@ -287,6 +301,9 @@ function genericQueryEngineTest(
287
301
underlyingIndexManager
288
302
) ;
289
303
queryEngine . initialize ( localDocuments , underlyingIndexManager ) ;
304
+ if ( configureCsi ) {
305
+ queryEngineInstallFieldIndexPlugin ( queryEngine ) ;
306
+ }
290
307
291
308
indexManager = new TestIndexManager ( persistence , underlyingIndexManager ) ;
292
309
} ) ;
You can’t perform that action at this time.
0 commit comments