Skip to content

Commit c21304b

Browse files
committed
add test case for terminated firestore
1 parent bc61df7 commit c21304b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/firestore/test/lite/integration.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,4 +2174,14 @@ describe('countQuery()', () => {
21742174
expect(aggregateQuerySnapshotEqual(snapshot1, snapshot2)).to.be.false;
21752175
});
21762176
});
2177+
2178+
it('count query on a terminated Firestore', () => {
2179+
return withTestCollection(async collection => {
2180+
await terminate(collection.firestore);
2181+
const countQuery_ = countQuery(query(collection));
2182+
expect(() => getAggregateFromServerDirect(countQuery_)).to.throw(
2183+
'The client has already been terminated'
2184+
);
2185+
});
2186+
});
21772187
});

0 commit comments

Comments
 (0)