Skip to content

Commit b84d374

Browse files
committed
rename snapshot to promise
1 parent 5626326 commit b84d374

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,16 +2328,16 @@ describe('countQuery()', () => {
23282328
const countQuery_ = countQuery(query(collection));
23292329

23302330
//This will pass
2331-
// const snapshot = getAggregateFromServerDirect(countQuery_)
2331+
// const promise = getAggregateFromServerDirect(countQuery_)
23322332
// await terminate(collection.firestore)
2333-
// expect((await snapshot).getCount()).to.equal(3);
2333+
// expect((await promise).getCount()).to.equal(3);
23342334

23352335
//this will pass
2336-
// const [snapshot,voidResult] = await Promise.all([
2336+
// const [promise,voidResult] = await Promise.all([
23372337
// getAggregateFromServerDirect(countQuery_),
23382338
// terminate(collection.firestore),
23392339
// ])
2340-
// expect(snapshot.getCount()).to.equal(3);
2340+
// expect(promise.getCount()).to.equal(3);
23412341

23422342
//if terminate comes first, it will throw error
23432343
// expect(() => Promise.all([
@@ -2348,13 +2348,14 @@ describe('countQuery()', () => {
23482348
// );
23492349

23502350
// not sure why, this is not getting to the "then" block
2351+
// and therefore it is not checking the "expect" at all
23512352
Promise.all([
23522353
getAggregateFromServerDirect(countQuery_),
23532354
terminate(collection.firestore)
23542355
])
2355-
.then(([snapshot, voidResult]) => {
2356-
console.log('snapshot', snapshot);
2357-
expect(snapshot.getCount()).to.equal(100);
2356+
.then(([promise, voidResult]) => {
2357+
console.log('snapshot', promise);
2358+
expect(promise.getCount()).to.equal(100);
23582359
})
23592360
.catch(e => {
23602361
expect((e as Error)?.message).to.equal(

0 commit comments

Comments
 (0)