Skip to content

Commit 7bb2cfa

Browse files
committed
update test helper with resume token, remove it.only
1 parent e5abb85 commit 7bb2cfa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/firestore/test/integration/api/query.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ apiDescribe('Queries', (persistence: boolean) => {
12901290
});
12911291

12921292
// eslint-disable-next-line no-restricted-properties
1293-
(persistence ? it.only : it.skip)('empty query results are cached', () => {
1293+
(persistence ? it : it.skip)('empty query results are cached', () => {
12941294
// Reproduces https://github.com/firebase/firebase-js-sdk/issues/5873
12951295
return withTestCollection(persistence, {}, async coll => {
12961296
const snapshot1 = await getDocs(coll); // Populate the cache

packages/firestore/test/util/api_helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import {
4343
import { DocumentKeySet } from '../../src/model/collections';
4444
import { DocumentSet } from '../../src/model/document_set';
4545
import { JsonObject } from '../../src/model/object_value';
46+
import { ByteString } from '../../src/util/byte_string';
4647
import { TEST_PROJECT } from '../unit/local/persistence_test_helpers';
4748

4849
import { doc, key, path as pathFrom } from './helpers';
@@ -144,6 +145,8 @@ export function querySnapshot(
144145
newDocuments = newDocuments.add(docToAdd);
145146
documentChanges.push({ type: ChangeType.Added, doc: docToAdd });
146147
});
148+
const resumeToken = ByteString.EMPTY_BYTE_STRING;
149+
147150
const viewSnapshot: ViewSnapshot = new ViewSnapshot(
148151
query,
149152
newDocuments,
@@ -152,7 +155,8 @@ export function querySnapshot(
152155
mutatedKeys,
153156
fromCache,
154157
syncStateChanged,
155-
false
158+
false,
159+
resumeToken
156160
);
157161
const db = firestore();
158162
return new QuerySnapshot(

0 commit comments

Comments
 (0)