Skip to content

Commit fcdc82c

Browse files
committed
update count test
1 parent e3ad5a6 commit fcdc82c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,21 @@ apiDescribe('Aggregation COUNT query:', (persistence: boolean) => {
3333
});
3434
});
3535
});
36+
37+
it.only('test collection count equals to 6', () => {
38+
const testDocs = {
39+
a: { k: 'a' },
40+
b: { k: 'b' },
41+
c: { k: 'c' },
42+
d: { k: 'd' },
43+
e: { k: 'e' },
44+
f: { k: 'f' }
45+
};
46+
return withTestCollection(persistence, testDocs, collection => {
47+
const countQuery_ = countQuery(query(collection));
48+
return getAggregateFromServerDirect(countQuery_).then(snapshot => {
49+
expect(snapshot.getCount()).to.equal(6);
50+
});
51+
});
52+
});
3653
});

0 commit comments

Comments
 (0)