Skip to content

Commit d93d965

Browse files
committed
resolve comments
1 parent d9e30a2 commit d93d965

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -636,20 +636,20 @@ apiDescribe('Database transactions', (persistence: boolean) => {
636636

637637
await runTransaction(db, async transaction => {
638638
++retryCounter;
639-
const snap1 = await transaction.get(docRef);
639+
const snap = await transaction.get(docRef);
640640

641641
if (retryCounter === 1) {
642-
expect(snap1.exists()).to.be.false;
643-
// On the first attemp, create a doc before transaction.set(), so that
642+
expect(snap.exists()).to.be.false;
643+
// On the first attempt, create a doc before transaction.set(), so that
644644
// the transaction fails with "already-exists" error, and retries.
645645
await setDoc(docRef, { count: 1 });
646646
}
647647

648648
transaction.set(docRef, { count: 2 });
649649
});
650650
expect(retryCounter).to.equal(2);
651-
const result = await getDoc(docRef);
652-
expect(result.get('count')).to.equal(2);
651+
const snap = await getDoc(docRef);
652+
expect(snap.get('count')).to.equal(2);
653653
});
654654
});
655655

0 commit comments

Comments
 (0)