Skip to content

Commit fda04f3

Browse files
committed
Fix race condition
1 parent aa2aa0b commit fda04f3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,11 @@ apiDescribe('Database batch writes', persistence => {
155155
);
156156
return accumulator
157157
.awaitEvent()
158-
.then(initialSnap => {
158+
.then(async initialSnap => {
159159
expect(initialSnap.docs.length).to.equal(0);
160160

161161
// Atomically write two documents.
162-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
163-
writeBatch(db).set(docA, { a: 1 }).set(docB, { b: 2 }).commit();
162+
await writeBatch(db).set(docA, { a: 1 }).set(docB, { b: 2 }).commit();
164163

165164
return accumulator.awaitEvent();
166165
})

0 commit comments

Comments
 (0)