Skip to content

Commit 625699e

Browse files
Fix test runner
1 parent 960e3eb commit 625699e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
} from '../../../src/model/collections';
3535
import * as persistenceHelpers from './persistence_test_helpers';
3636
import { TestRemoteDocumentCache } from './test_remote_document_cache';
37+
import { remoteDocumentCacheGetLastReadTime } from '../../../src/local/indexeddb_remote_document_cache';
3738

3839
// Helpers for use throughout tests.
3940
const DOC_PATH = 'a/b';
@@ -91,8 +92,7 @@ describe('IndexedDbRemoteDocumentCache', () => {
9192

9293
function getLastReadTime(): Promise<SnapshotVersion> {
9394
return persistence.runTransaction('getLastReadTime', 'readonly', txn => {
94-
const remoteDocuments = persistence.getRemoteDocumentCache();
95-
return remoteDocuments.getLastReadTime(txn);
95+
return remoteDocumentCacheGetLastReadTime(txn);
9696
});
9797
}
9898

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import { SnapshotVersion } from '../../../src/core/snapshot_version';
2020
import { Persistence } from '../../../src/local/persistence';
2121
import { PersistencePromise } from '../../../src/local/persistence_promise';
2222
import { RemoteDocumentCache } from '../../../src/local/remote_document_cache';
23-
import { IndexedDbRemoteDocumentCache } from '../../../src/local/indexeddb_remote_document_cache';
23+
import {
24+
IndexedDbRemoteDocumentCache,
25+
remoteDocumentCacheGetNewDocumentChanges
26+
} from '../../../src/local/indexeddb_remote_document_cache';
2427
import { RemoteDocumentChangeBuffer } from '../../../src/local/remote_document_change_buffer';
2528
import {
2629
DocumentKeySet,
@@ -132,11 +135,11 @@ export class TestRemoteDocumentCache {
132135
'getNewDocumentChanges',
133136
'readonly',
134137
txn => {
135-
debugAssert(
136-
this.cache instanceof IndexedDbRemoteDocumentCache,
137-
'getNewDocumentChanges() requires IndexedDB'
138+
return remoteDocumentCacheGetNewDocumentChanges(
139+
this.cache,
140+
txn,
141+
sinceReadTime
138142
);
139-
return this.cache.getNewDocumentChanges(txn, sinceReadTime);
140143
}
141144
);
142145
}

0 commit comments

Comments
 (0)