From 5492aae704489ea2bbcac2a4ca369e571fe1df4f Mon Sep 17 00:00:00 2001 From: Ehsan Nasiri Date: Thu, 24 Apr 2025 13:49:41 -0700 Subject: [PATCH 1/3] Improve the integration test coverage for online vs offline comparisons. --- .../api/composite_index_query.test.ts | 12 +++++++ .../test/integration/api/database.test.ts | 16 ++++++---- .../test/integration/api/query.test.ts | 32 +++++++++++++++++++ .../util/composite_index_test_helper.ts | 2 ++ .../test/integration/util/helpers.ts | 24 ++++++++++++-- 5 files changed, 78 insertions(+), 8 deletions(-) diff --git a/packages/firestore/test/integration/api/composite_index_query.test.ts b/packages/firestore/test/integration/api/composite_index_query.test.ts index 04cdafe7169..d08cc77bde9 100644 --- a/packages/firestore/test/integration/api/composite_index_query.test.ts +++ b/packages/firestore/test/integration/api/composite_index_query.test.ts @@ -73,6 +73,7 @@ apiDescribe('Composite Index Queries', persistence => { return testHelper.withTestDocs(persistence, testDocs, async coll => { // a == 1, limit 2, b - desc await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.query( coll, where('a', '==', 1), @@ -97,6 +98,7 @@ apiDescribe('Composite Index Queries', persistence => { return testHelper.withTestDocs(persistence, testDocs, async coll => { // with one inequality: a>2 || b==1. await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, or(where('a', '>', 2), where('b', '==', 1)) @@ -108,6 +110,7 @@ apiDescribe('Composite Index Queries', persistence => { // Test with limits (implicit order by ASC): (a==1) || (b > 0) LIMIT 2 await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, or(where('a', '==', 1), where('b', '>', 0)), @@ -120,6 +123,7 @@ apiDescribe('Composite Index Queries', persistence => { // Test with limits (explicit order by): (a==1) || (b > 0) LIMIT_TO_LAST 2 // Note: The public query API does not allow implicit ordering when limitToLast is used. await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, or(where('a', '==', 1), where('b', '>', 0)), @@ -132,6 +136,7 @@ apiDescribe('Composite Index Queries', persistence => { // Test with limits (explicit order by ASC): (a==2) || (b == 1) ORDER BY a LIMIT 1 await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, or(where('a', '==', 2), where('b', '==', 1)), @@ -143,6 +148,7 @@ apiDescribe('Composite Index Queries', persistence => { // Test with limits (explicit order by DESC): (a==2) || (b == 1) ORDER BY a LIMIT_TO_LAST 1 await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, or(where('a', '==', 2), where('b', '==', 1)), @@ -857,12 +863,14 @@ apiDescribe('Composite Index Queries', persistence => { return testHelper.withTestDocs(persistence, testDocs, async coll => { // implicit AND: a != 1 && b < 2 await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.query(coll, where('a', '!=', 1), where('b', '<', 2)), 'doc2' ); // explicit AND: a != 1 && b < 2 await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, and(where('a', '!=', 1), where('b', '<', 2)) @@ -873,6 +881,7 @@ apiDescribe('Composite Index Queries', persistence => { // explicit AND: a < 3 && b not-in [2, 3] // Implicitly ordered by: a asc, b asc, __name__ asc await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, and(where('a', '<', 3), where('b', 'not-in', [2, 3])) @@ -884,6 +893,7 @@ apiDescribe('Composite Index Queries', persistence => { // a <3 && b != 0, implicitly ordered by: a asc, b asc, __name__ asc await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.query( coll, where('b', '!=', 0), @@ -896,6 +906,7 @@ apiDescribe('Composite Index Queries', persistence => { // a <3 && b != 0, ordered by: b desc, a desc, __name__ desc await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.query( coll, where('a', '<', 3), @@ -909,6 +920,7 @@ apiDescribe('Composite Index Queries', persistence => { // explicit OR: multiple inequality: a>2 || b<1. await testHelper.assertOnlineAndOfflineResultsMatch( + coll, testHelper.compositeQuery( coll, or(where('a', '>', 2), where('b', '<', 1)) diff --git a/packages/firestore/test/integration/api/database.test.ts b/packages/firestore/test/integration/api/database.test.ts index 8cbe99b3cd9..919422070be 100644 --- a/packages/firestore/test/integration/api/database.test.ts +++ b/packages/firestore/test/integration/api/database.test.ts @@ -780,7 +780,7 @@ apiDescribe('Database', persistence => { return withTestCollection(persistence, docs, async randomCol => { const orderedQuery = query(randomCol, orderBy('embedding')); - await checkOnlineAndOfflineResultsMatch(orderedQuery, ...documentIds); + await checkOnlineAndOfflineResultsMatch(randomCol, orderedQuery, ...documentIds); const orderedQueryLessThan = query( randomCol, @@ -788,6 +788,7 @@ apiDescribe('Database', persistence => { where('embedding', '<', vector([1, 2, 100, 4, 4])) ); await checkOnlineAndOfflineResultsMatch( + randomCol, orderedQueryLessThan, ...documentIds.slice(2, 11) ); @@ -798,6 +799,7 @@ apiDescribe('Database', persistence => { where('embedding', '>', vector([1, 2, 100, 4, 4])) ); await checkOnlineAndOfflineResultsMatch( + randomCol, orderedQueryGreaterThan, ...documentIds.slice(12, 13) ); @@ -2396,6 +2398,7 @@ apiDescribe('Database', persistence => { 'a' ]; await checkOnlineAndOfflineResultsMatch( + collectionRef, orderedQuery, ...expectedDocs ); @@ -2416,6 +2419,7 @@ apiDescribe('Database', persistence => { 'Aa' ]; await checkOnlineAndOfflineResultsMatch( + collectionRef, filteredQuery, ...expectedDocs ); @@ -2467,7 +2471,7 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); }); }); @@ -2499,7 +2503,7 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); }); }); @@ -2531,7 +2535,7 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); }); }); @@ -2563,7 +2567,7 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); }); }); @@ -2608,7 +2612,7 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); }); }); diff --git a/packages/firestore/test/integration/api/query.test.ts b/packages/firestore/test/integration/api/query.test.ts index 01fd0e47e35..67ada2f1006 100644 --- a/packages/firestore/test/integration/api/query.test.ts +++ b/packages/firestore/test/integration/api/query.test.ts @@ -1357,6 +1357,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { // a == 1 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, where('a', '==', 1)), 'doc1', 'doc4', @@ -1365,18 +1366,21 @@ apiDescribe('Queries', persistence => { // Implicit AND: a == 1 && b == 3 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, where('a', '==', 1), where('b', '==', 3)), 'doc4' ); // explicit AND: a == 1 && b == 3 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, and(where('a', '==', 1), where('b', '==', 3))), 'doc4' ); // a == 1, limit 2 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, where('a', '==', 1), limit(2)), 'doc1', 'doc4' @@ -1384,6 +1388,7 @@ apiDescribe('Queries', persistence => { // explicit OR: a == 1 || b == 1 with limit 2 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', '==', 1), where('b', '==', 1)), limit(2)), 'doc1', 'doc2' @@ -1391,6 +1396,7 @@ apiDescribe('Queries', persistence => { // only limit 2 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, limit(2)), 'doc1', 'doc2' @@ -1398,6 +1404,7 @@ apiDescribe('Queries', persistence => { // limit 2 and order by b desc await checkOnlineAndOfflineResultsMatch( + coll, query(coll, limit(2), orderBy('b', 'desc')), 'doc4', 'doc3' @@ -1417,6 +1424,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { // Two equalities: a==1 || b==1. await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', '==', 1), where('b', '==', 1))), 'doc1', 'doc2', @@ -1426,6 +1434,7 @@ apiDescribe('Queries', persistence => { // (a==1 && b==0) || (a==3 && b==2) await checkOnlineAndOfflineResultsMatch( + coll, query( coll, or( @@ -1439,6 +1448,7 @@ apiDescribe('Queries', persistence => { // a==1 && (b==0 || b==3). await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( @@ -1452,6 +1462,7 @@ apiDescribe('Queries', persistence => { // (a==2 || b==2) && (a==3 || b==3) await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( @@ -1464,6 +1475,7 @@ apiDescribe('Queries', persistence => { // Test with limits without orderBy (the __name__ ordering is the tie breaker). await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', '==', 2), where('b', '==', 1)), limit(1)), 'doc2' ); @@ -1483,6 +1495,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { // a==2 || b in [2,3] await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', '==', 2), where('b', 'in', [2, 3]))), 'doc3', 'doc4', @@ -1504,6 +1517,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { // a==2 || b array-contains 7 await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', '==', 2), where('b', 'array-contains', 7))), 'doc3', 'doc4', @@ -1512,6 +1526,7 @@ apiDescribe('Queries', persistence => { // a==2 || b array-contains-any [0, 3] await checkOnlineAndOfflineResultsMatch( + coll, query( coll, or(where('a', '==', 2), where('b', 'array-contains-any', [0, 3])) @@ -1535,6 +1550,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { await checkOnlineAndOfflineResultsMatch( + coll, query( coll, or( @@ -1549,6 +1565,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( @@ -1560,6 +1577,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query( coll, or( @@ -1573,6 +1591,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( @@ -1598,6 +1617,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { await checkOnlineAndOfflineResultsMatch( + coll, query( coll, or(where('a', 'in', [2, 3]), where('b', 'array-contains', 3)) @@ -1608,6 +1628,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and(where('a', 'in', [2, 3]), where('b', 'array-contains', 7)) @@ -1616,6 +1637,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query( coll, or( @@ -1629,6 +1651,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( @@ -1653,6 +1676,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { await checkOnlineAndOfflineResultsMatch( + coll, query(coll, where('a', '==', 1), orderBy('a')), 'doc1', 'doc4', @@ -1660,6 +1684,7 @@ apiDescribe('Queries', persistence => { ); await checkOnlineAndOfflineResultsMatch( + coll, query(coll, where('a', 'in', [2, 3]), orderBy('a')), 'doc6', 'doc3' @@ -1680,6 +1705,7 @@ apiDescribe('Queries', persistence => { return withTestCollection(persistence, testDocs, async coll => { // Two IN operations on different fields with disjunction. await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', 'in', [2, 3]), where('b', 'in', [0, 2]))), 'doc1', 'doc3', @@ -1688,6 +1714,7 @@ apiDescribe('Queries', persistence => { // Two IN operations on different fields with conjunction. await checkOnlineAndOfflineResultsMatch( + coll, query(coll, and(where('a', 'in', [2, 3]), where('b', 'in', [0, 2]))), 'doc3' ); @@ -1695,6 +1722,7 @@ apiDescribe('Queries', persistence => { // Two IN operations on the same field. // a IN [1,2,3] && a IN [0,1,4] should result in "a==1". await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and(where('a', 'in', [1, 2, 3]), where('a', 'in', [0, 1, 4])) @@ -1707,6 +1735,7 @@ apiDescribe('Queries', persistence => { // a IN [2,3] && a IN [0,1,4] is never true and so the result should be an // empty set. await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and(where('a', 'in', [2, 3]), where('a', 'in', [0, 1, 4])) @@ -1715,6 +1744,7 @@ apiDescribe('Queries', persistence => { // a IN [0,3] || a IN [0,2] should union them (similar to: a IN [0,2,3]). await checkOnlineAndOfflineResultsMatch( + coll, query(coll, or(where('a', 'in', [0, 3]), where('a', 'in', [0, 2]))), 'doc3', 'doc6' @@ -1722,6 +1752,7 @@ apiDescribe('Queries', persistence => { // Nested composite filter on the same field. await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( @@ -1737,6 +1768,7 @@ apiDescribe('Queries', persistence => { // Nested composite filter on the different fields. await checkOnlineAndOfflineResultsMatch( + coll, query( coll, and( diff --git a/packages/firestore/test/integration/util/composite_index_test_helper.ts b/packages/firestore/test/integration/util/composite_index_test_helper.ts index 5199539768b..a908ed13455 100644 --- a/packages/firestore/test/integration/util/composite_index_test_helper.ts +++ b/packages/firestore/test/integration/util/composite_index_test_helper.ts @@ -162,10 +162,12 @@ export class CompositeIndexTestHelper { // the same as running it while offline. The expected document Ids are hashed to match the // actual document IDs created by the test helper. async assertOnlineAndOfflineResultsMatch( + collection: CollectionReference, query: Query, ...expectedDocs: string[] ): Promise { return checkOnlineAndOfflineResultsMatch( + this.query(collection), query, ...this.toHashedIds(expectedDocs) ); diff --git a/packages/firestore/test/integration/util/helpers.ts b/packages/firestore/test/integration/util/helpers.ts index 465bc8edd61..25d4cfd996b 100644 --- a/packages/firestore/test/integration/util/helpers.ts +++ b/packages/firestore/test/integration/util/helpers.ts @@ -541,19 +541,39 @@ export function partitionedTestDocs(partitions: { * documents as running the query while offline. If `expectedDocs` is provided, it also checks * that both online and offline query result is equal to the expected documents. * + * This function first performs a "get" for the entire COLLECTION from the server. + * It then performs the QUERY from CACHE which, results in `executeFullCollectionScan()` + * It then performs the QUERY from SERVER. + * It then performs the QUERY from CACHE again, which results in `performQueryUsingRemoteKeys()`. + * It then ensure that all the above QUERY results are the same. + * + * @param collection The collection on which the query is performed. * @param query The query to check * @param expectedDocs Ordered list of document keys that are expected to match the query */ export async function checkOnlineAndOfflineResultsMatch( + collection: Query, query: Query, ...expectedDocs: string[] ): Promise { + // Note: Order matters. The following has to be done in the specific order: + + // 1- Pre-populate the cache with the entire collection. + await getDocsFromServer(collection); + + // 2- This performs the query against the cache using full collection scan. + const docsFromCacheFullCollectionScan = await getDocsFromCache(query); + + // 3- This goes to the server (backend/emulator). const docsFromServer = await getDocsFromServer(query); + // 4- This performs the query against the cache using remote keys. + const docsFromCacheUsingRemoteKeys = await getDocsFromCache(query); + + expect(toIds(docsFromServer)).to.deep.equal(toIds(docsFromCacheFullCollectionScan)); + expect(toIds(docsFromServer)).to.deep.equal(toIds(docsFromCacheUsingRemoteKeys)); if (expectedDocs.length !== 0) { expect(expectedDocs).to.deep.equal(toIds(docsFromServer)); } - const docsFromCache = await getDocsFromCache(query); - expect(toIds(docsFromServer)).to.deep.equal(toIds(docsFromCache)); } From a682252b14603d9be1833b1a09bcb670a068c79c Mon Sep 17 00:00:00 2001 From: Ehsan Nasiri Date: Thu, 24 Apr 2025 13:55:02 -0700 Subject: [PATCH 2/3] prettier. --- .../test/integration/api/database.test.ts | 38 +++++++++++++++---- .../test/integration/util/helpers.ts | 9 +++-- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/packages/firestore/test/integration/api/database.test.ts b/packages/firestore/test/integration/api/database.test.ts index 919422070be..9675e02efeb 100644 --- a/packages/firestore/test/integration/api/database.test.ts +++ b/packages/firestore/test/integration/api/database.test.ts @@ -780,7 +780,11 @@ apiDescribe('Database', persistence => { return withTestCollection(persistence, docs, async randomCol => { const orderedQuery = query(randomCol, orderBy('embedding')); - await checkOnlineAndOfflineResultsMatch(randomCol, orderedQuery, ...documentIds); + await checkOnlineAndOfflineResultsMatch( + randomCol, + orderedQuery, + ...documentIds + ); const orderedQueryLessThan = query( randomCol, @@ -2419,7 +2423,7 @@ apiDescribe('Database', persistence => { 'Aa' ]; await checkOnlineAndOfflineResultsMatch( - collectionRef, + collectionRef, filteredQuery, ...expectedDocs ); @@ -2471,7 +2475,11 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch( + collectionRef, + orderedQuery, + ...expectedDocs + ); }); }); @@ -2503,7 +2511,11 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch( + collectionRef, + orderedQuery, + ...expectedDocs + ); }); }); @@ -2535,7 +2547,11 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch( + collectionRef, + orderedQuery, + ...expectedDocs + ); }); }); @@ -2567,7 +2583,11 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch( + collectionRef, + orderedQuery, + ...expectedDocs + ); }); }); @@ -2612,7 +2632,11 @@ apiDescribe('Database', persistence => { unsubscribe(); - await checkOnlineAndOfflineResultsMatch(collectionRef, orderedQuery, ...expectedDocs); + await checkOnlineAndOfflineResultsMatch( + collectionRef, + orderedQuery, + ...expectedDocs + ); }); }); diff --git a/packages/firestore/test/integration/util/helpers.ts b/packages/firestore/test/integration/util/helpers.ts index 25d4cfd996b..b36ed980295 100644 --- a/packages/firestore/test/integration/util/helpers.ts +++ b/packages/firestore/test/integration/util/helpers.ts @@ -570,10 +570,13 @@ export async function checkOnlineAndOfflineResultsMatch( // 4- This performs the query against the cache using remote keys. const docsFromCacheUsingRemoteKeys = await getDocsFromCache(query); - expect(toIds(docsFromServer)).to.deep.equal(toIds(docsFromCacheFullCollectionScan)); - expect(toIds(docsFromServer)).to.deep.equal(toIds(docsFromCacheUsingRemoteKeys)); + expect(toIds(docsFromServer)).to.deep.equal( + toIds(docsFromCacheFullCollectionScan) + ); + expect(toIds(docsFromServer)).to.deep.equal( + toIds(docsFromCacheUsingRemoteKeys) + ); if (expectedDocs.length !== 0) { expect(expectedDocs).to.deep.equal(toIds(docsFromServer)); } - } From 9add7c843c928ea0076349fce82cbc5309a5eca2 Mon Sep 17 00:00:00 2001 From: Ehsan Nasiri Date: Thu, 24 Apr 2025 14:29:01 -0700 Subject: [PATCH 3/3] Add missing cases. --- packages/firestore/test/integration/api/query.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/firestore/test/integration/api/query.test.ts b/packages/firestore/test/integration/api/query.test.ts index 2cb19bea8c5..0f3c1c82a2d 100644 --- a/packages/firestore/test/integration/api/query.test.ts +++ b/packages/firestore/test/integration/api/query.test.ts @@ -1804,6 +1804,7 @@ apiDescribe('Queries', persistence => { let testQuery = query(coll, where('zip', '!=', 98101)); await checkOnlineAndOfflineResultsMatch( + coll, testQuery, 'a', 'b', @@ -1816,6 +1817,7 @@ apiDescribe('Queries', persistence => { testQuery = query(coll, where('zip', '!=', Number.NaN)); await checkOnlineAndOfflineResultsMatch( + coll, testQuery, 'b', 'c', @@ -1828,6 +1830,7 @@ apiDescribe('Queries', persistence => { testQuery = query(coll, where('zip', '!=', null)); await checkOnlineAndOfflineResultsMatch( + coll, testQuery, 'a', 'b', @@ -1864,6 +1867,7 @@ apiDescribe('Queries', persistence => { where('zip', 'not-in', [98101, 98103, [98101, 98102]]) ); await checkOnlineAndOfflineResultsMatch( + coll, testQuery, 'a', 'b', @@ -1874,7 +1878,7 @@ apiDescribe('Queries', persistence => { ); testQuery = query(coll, where('zip', 'not-in', [null])); - await checkOnlineAndOfflineResultsMatch(testQuery); + await checkOnlineAndOfflineResultsMatch(coll, testQuery); }); }); });