Skip to content

Commit ff7ec24

Browse files
committed
Whitespace
1 parent 2f955f8 commit ff7ec24

File tree

1 file changed

+27
-35
lines changed

1 file changed

+27
-35
lines changed

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

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,45 +1710,37 @@ apiDescribe('Database', (persistence: boolean) => {
17101710
});
17111711

17121712
it('can keep docs separate with multi-db when online', () => {
1713-
return withNamedTestDbs(
1714-
persistence,
1715-
['db1', 'db2'],
1716-
async ([db1, db2]) => {
1717-
const data = { name: 'Rafi', email: '[email protected]' };
1713+
return withNamedTestDbs(persistence, ['db1', 'db2'], async ([db1, db2]) => {
1714+
const data = { name: 'Rafi', email: '[email protected]' };
17181715

1719-
const ref1 = await doc(collection(db1, 'users'));
1720-
await setDoc(ref1, data);
1721-
const snapshot1 = await getDoc(ref1);
1722-
expect(snapshot1.exists()).to.be.ok;
1723-
expect(snapshot1.data()).to.be.deep.equals(data);
1716+
const ref1 = await doc(collection(db1, 'users'));
1717+
await setDoc(ref1, data);
1718+
const snapshot1 = await getDoc(ref1);
1719+
expect(snapshot1.exists()).to.be.ok;
1720+
expect(snapshot1.data()).to.be.deep.equals(data);
17241721

1725-
const ref2 = await doc(collection(db2, 'users'));
1726-
const snapshot2 = await getDoc(ref2);
1727-
expect(snapshot2.exists()).to.not.be.ok;
1728-
}
1729-
);
1722+
const ref2 = await doc(collection(db2, 'users'));
1723+
const snapshot2 = await getDoc(ref2);
1724+
expect(snapshot2.exists()).to.not.be.ok;
1725+
});
17301726
});
17311727

17321728
it('can keep docs separate with multi-db when offline', () => {
1733-
return withNamedTestDbs(
1734-
persistence,
1735-
['db1', 'db2'],
1736-
async ([db1, db2]) => {
1737-
await disableNetwork(db1);
1738-
await disableNetwork(db2);
1739-
const data = { name: 'Rafi', email: '[email protected]' };
1740-
1741-
const ref1 = await doc(collection(db1, 'users'));
1742-
void setDoc(ref1, data);
1743-
const snapshot = await getDocFromCache(ref1);
1744-
expect(snapshot.exists()).to.be.ok;
1745-
expect(snapshot.data()).to.be.deep.equals(data);
1746-
1747-
const ref2 = await doc(collection(db2, 'users'));
1748-
await expect(getDocFromCache(ref2)).to.eventually.rejectedWith(
1749-
'Failed to get document from cache.'
1750-
);
1751-
}
1752-
);
1729+
return withNamedTestDbs(persistence, ['db1', 'db2'], async ([db1, db2]) => {
1730+
await disableNetwork(db1);
1731+
await disableNetwork(db2);
1732+
const data = { name: 'Rafi', email: '[email protected]' };
1733+
1734+
const ref1 = await doc(collection(db1, 'users'));
1735+
void setDoc(ref1, data);
1736+
const snapshot = await getDocFromCache(ref1);
1737+
expect(snapshot.exists()).to.be.ok;
1738+
expect(snapshot.data()).to.be.deep.equals(data);
1739+
1740+
const ref2 = await doc(collection(db2, 'users'));
1741+
await expect(getDocFromCache(ref2)).to.eventually.rejectedWith(
1742+
'Failed to get document from cache.'
1743+
);
1744+
});
17531745
});
17541746
});

0 commit comments

Comments
 (0)