From ac4a698f4c0ac687add72e40416fda6fc0f9a818 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Wed, 20 Sep 2023 02:34:32 -0500 Subject: [PATCH] test(firestore): re-enable modular where-in test via stable ordering the test was working just the order of returned data wasn't stable vs assertion expectations of stability, so added an orderBy clause --- packages/firestore/e2e/Query/where.and.filter.e2e.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/firestore/e2e/Query/where.and.filter.e2e.js b/packages/firestore/e2e/Query/where.and.filter.e2e.js index a043f64eae..1b1ebc7e12 100644 --- a/packages/firestore/e2e/Query/where.and.filter.e2e.js +++ b/packages/firestore/e2e/Query/where.and.filter.e2e.js @@ -1212,10 +1212,9 @@ describe(' firestore().collection().where(AND Filters)', function () { }); }); - // FIXME: Works in isolation, but fails in suite - xit('returns with where "in" filter', async function () { - const { getFirestore, collection, addDoc, getDocs, query, where } = firestoreModular; - const colRef = collection(getFirestore(), `${COLLECTION}/filter/in-modular`); + it('returns with where "in" filter', async function () { + const { getFirestore, collection, addDoc, getDocs, query, where, orderBy } = firestoreModular; + const colRef = collection(getFirestore(), `${COLLECTION}/filter/where-in-modular`); const expected1 = 'bar'; const expected2 = 'baz'; const data1 = { foo: expected1 }; @@ -1228,7 +1227,9 @@ describe(' firestore().collection().where(AND Filters)', function () { addDoc(colRef, data2), ]); - const snapshot = await getDocs(query(colRef, where('foo', 'in', [expected1, expected2]))); + const snapshot = await getDocs( + query(colRef, where('foo', 'in', [expected1, expected2]), orderBy('foo')), + ); snapshot.size.should.eql(2); snapshot.docs[0].data().foo.should.eql(expected1);