Skip to content

Commit 2b9f7d3

Browse files
committed
add comments to the tests
1 parent 2847792 commit 2b9f7d3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ apiDescribe('Database transactions', (persistence: boolean) => {
316316
});
317317
});
318318

319+
// This test is identical to the test above, except that withNonexistentDoc()
320+
// is replaced by withDeletedDoc(), to guard against regression of
321+
// https://github.com/firebase/firebase-js-sdk/issues/5871, where transactions
322+
// would incorrectly fail with FAILED_PRECONDITION when operations were
323+
// performed on a deleted document (rather than a non-existent document).
319324
it('runs transactions after getting a deleted document', async () => {
320325
return withTestDb(persistence, async db => {
321326
const tt = new TransactionTester(db);

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

+5
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,11 @@ describe('Transaction', () => {
524524
});
525525
});
526526

527+
// This test is identical to the test above, except that a non-existent
528+
// document is replaced by a deleted document, to guard against regression of
529+
// https://github.com/firebase/firebase-js-sdk/issues/5871, where transactions
530+
// would incorrectly fail with FAILED_PRECONDITION when operations were
531+
// performed on a deleted document (rather than a non-existent document).
527532
it('can read deleted doc then write', () => {
528533
return withTestDocAndInitialData({ counter: 1 }, async doc => {
529534
await deleteDoc(doc);

0 commit comments

Comments
 (0)