Skip to content

Commit 30a8251

Browse files
Review
1 parent fefc69c commit 30a8251

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

packages/firestore/test/unit/local/counting_query_engine.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import { RemoteDocumentCache } from '../../../src/local/remote_document_cache';
2525
import { MutationQueue } from '../../../src/local/mutation_queue';
2626
import { DocumentKeySet, DocumentMap } from '../../../src/model/collections';
2727

28+
export enum QueryEngineType {
29+
IndexFree, Simple
30+
}
31+
2832
/**
2933
* A test-only query engine that forwards all API calls and exposes the number
3034
* of documents and mutations read.
@@ -59,7 +63,7 @@ export class CountingQueryEngine implements QueryEngine {
5963

6064
constructor(
6165
private readonly queryEngine: QueryEngine,
62-
readonly type: 'index-free' | 'simple'
66+
readonly type: QueryEngineType
6367
) {}
6468

6569
resetCounts(): void {

packages/firestore/test/unit/local/indexeddb_persistence.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async function withCustomPersistence(
125125
new SharedFakeWebStorage()
126126
);
127127
const persistence = new IndexedDbPersistence(
128-
/* allowTabSynchronization= */ multiClient,
128+
multiClient,
129129
TEST_PERSISTENCE_PREFIX,
130130
clientId,
131131
platform,

packages/firestore/test/unit/local/local_store.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import {
8080
byteStringFromString
8181
} from '../../util/helpers';
8282

83-
import { CountingQueryEngine } from './counting_query_engine';
83+
import {CountingQueryEngine, QueryEngineType} from './counting_query_engine';
8484
import * as persistenceHelpers from './persistence_test_helpers';
8585
import { ByteString } from '../../../src/util/byte_string';
8686

@@ -398,7 +398,7 @@ describe('LocalStore w/ Memory Persistence (SimpleQueryEngine)', () => {
398398
async function initialize(): Promise<LocalStoreComponents> {
399399
const queryEngine = new CountingQueryEngine(
400400
new SimpleQueryEngine(),
401-
'simple'
401+
QueryEngineType.Simple
402402
);
403403
const persistence = await persistenceHelpers.testMemoryEagerPersistence();
404404
const localStore = new LocalStore(
@@ -416,7 +416,7 @@ describe('LocalStore w/ Memory Persistence (IndexFreeQueryEngine)', () => {
416416
async function initialize(): Promise<LocalStoreComponents> {
417417
const queryEngine = new CountingQueryEngine(
418418
new IndexFreeQueryEngine(),
419-
'index-free'
419+
QueryEngineType.IndexFree
420420
);
421421
const persistence = await persistenceHelpers.testMemoryEagerPersistence();
422422
const localStore = new LocalStore(
@@ -469,7 +469,7 @@ describe('LocalStore w/ IndexedDB Persistence (IndexFreeQueryEngine)', () => {
469469
async function initialize(): Promise<LocalStoreComponents> {
470470
const queryEngine = new CountingQueryEngine(
471471
new IndexFreeQueryEngine(),
472-
'index-free'
472+
QueryEngineType.IndexFree
473473
);
474474
const persistence = await persistenceHelpers.testIndexedDbPersistence();
475475
const localStore = new MultiTabLocalStore(

0 commit comments

Comments
 (0)