Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed Nov 25, 2020
1 parent 8b38478 commit 335b391
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/firestore/src/local/query_engine.ts
Expand Up @@ -55,7 +55,7 @@ import { SortedSet } from '../util/sorted_set';
* - Limit queries where a document edit may cause the document to sort below
* another document that is in the local cache.
*
* - Queries that have never been CURRENT or free of Limbo documents.
* - Queries that have never been CURRENT or free of limbo documents.
*/
export class QueryEngine {
private localDocumentsView: LocalDocumentsView | undefined;
Expand Down
14 changes: 7 additions & 7 deletions packages/firestore/test/unit/local/query_engine.test.ts
Expand Up @@ -66,7 +66,7 @@ const MISSING_LAST_LIMBO_FREE_SNAPSHOT = SnapshotVersion.min();
* `getDocumentsMatchingQuery()` to detect index-free execution.
*/
class TestLocalDocumentsView extends LocalDocumentsView {
exceptFullCollectionScan: boolean | undefined;
expectFullCollectionScan: boolean | undefined;

getDocumentsMatchingQuery(
transaction: PersistenceTransaction,
Expand All @@ -78,7 +78,7 @@ class TestLocalDocumentsView extends LocalDocumentsView {
);

expect(skipsDocumentsBeforeSnapshot).to.eq(
!this.exceptFullCollectionScan,
!this.expectFullCollectionScan,
'Observed query execution mode did not match expectation'
);

Expand Down Expand Up @@ -120,21 +120,21 @@ describe('QueryEngine', () => {
op: () => Promise<T>
): Promise<T> {
try {
localDocuments.exceptFullCollectionScan = false;
localDocuments.expectFullCollectionScan = false;
return await op();
} finally {
localDocuments.exceptFullCollectionScan = undefined;
localDocuments.expectFullCollectionScan = undefined;
}
}

async function expectFullCollectionQuery<T>(
op: () => Promise<T>
): Promise<T> {
try {
localDocuments.exceptFullCollectionScan = true;
localDocuments.expectFullCollectionScan = true;
return await op();
} finally {
localDocuments.exceptFullCollectionScan = undefined;
localDocuments.expectFullCollectionScan = undefined;
}
}

Expand All @@ -143,7 +143,7 @@ describe('QueryEngine', () => {
lastLimboFreeSnapshot: SnapshotVersion
): Promise<DocumentSet> {
debugAssert(
localDocuments.exceptFullCollectionScan !== undefined,
localDocuments.expectFullCollectionScan !== undefined,
'Encountered runQuery() call not wrapped in ' +
'expectOptimizedCollectionQuery()/expectFullCollectionQuery()'
);
Expand Down

0 comments on commit 335b391

Please sign in to comment.