diff --git a/tests/e2e/firestore/collectionReference.e2e.js b/tests/e2e/firestore/collectionReference.e2e.js index 89c5b355..5d55553e 100644 --- a/tests/e2e/firestore/collectionReference.e2e.js +++ b/tests/e2e/firestore/collectionReference.e2e.js @@ -26,8 +26,7 @@ function getPathClass() { return bridge.require('dist/modules/firestore/Path'); } -// TODO flakey firestore helpers - so we can't cleanup -xdescribe('firestore()', () => { +describe('firestore()', () => { describe('CollectionReference', () => { before(() => resetTestCollectionDoc(COL_DOC_1_PATH, COL_DOC_1())); @@ -81,16 +80,16 @@ xdescribe('firestore()', () => { }); const doc = await firebase - .firestore() - .doc(docRef.path) - .get(); + .firestore() + .doc(docRef.path) + .get(); doc.data().first.should.equal('Ada'); await firebase - .firestore() - .doc(docRef.path) - .delete(); + .firestore() + .doc(docRef.path) + .delete(); }); }); @@ -103,9 +102,9 @@ xdescribe('firestore()', () => { it('should error when supplied an incorrect path', () => { (() => { firebase - .firestore() - .collection('collection') - .doc('invalid/doc'); + .firestore() + .collection('collection') + .doc('invalid/doc'); }).should.throw('Argument "documentPath" must point to a document.'); }); }); @@ -152,8 +151,7 @@ xdescribe('firestore()', () => { it('should error with invalid GetOptions source option', async () => { const collectionRef = testCollection(TEST_COLLECTION_NAME); try { - await collectionRef.get(() => { - }); + await collectionRef.get(() => {}); return Promise.reject( new Error('get() did not reject with invalid argument.') ); @@ -252,8 +250,8 @@ xdescribe('firestore()', () => { await sleep(50); const collectionRef = firebase - .firestore() - .collection(TEST_COLLECTION_NAME); + .firestore() + .collection(TEST_COLLECTION_NAME); const newDocValue = { foo: 'updated' }; diff --git a/tests/e2e/firestore/documentReference.e2e.js b/tests/e2e/firestore/documentReference.e2e.js index 5209c472..a52b0c59 100644 --- a/tests/e2e/firestore/documentReference.e2e.js +++ b/tests/e2e/firestore/documentReference.e2e.js @@ -7,8 +7,7 @@ const { resetTestCollectionDoc, } = TestHelpers.firestore; -// TODO flakey firestore helpers - so we can't cleanup -xdescribe('firestore()', () => { +describe('firestore()', () => { describe('DocumentReference', () => { before(async () => { await resetTestCollectionDoc(COL2_DOC_1_PATH, COL2_DOC_1()); diff --git a/tests/e2e/firestore/documentSnapshot.e2e.js b/tests/e2e/firestore/documentSnapshot.e2e.js index b9fbcf0f..e01c45dc 100644 --- a/tests/e2e/firestore/documentSnapshot.e2e.js +++ b/tests/e2e/firestore/documentSnapshot.e2e.js @@ -6,8 +6,7 @@ const { resetTestCollectionDoc, } = TestHelpers.firestore; -// TODO flakey firestore helpers - so we can't cleanup -xdescribe('firestore()', () => { +describe('firestore()', () => { describe('DocumentSnapshot', () => { before(async () => { await resetTestCollectionDoc(COL_DOC_1_PATH, COL_DOC_1()); diff --git a/tests/helpers/firestore.js b/tests/helpers/firestore.js index 1c123b32..60c4b4a9 100644 --- a/tests/helpers/firestore.js +++ b/tests/helpers/firestore.js @@ -8,11 +8,10 @@ const ONE_HOUR = 60 * 60 * 1000; module.exports = { async cleanup() { if (!shouldCleanup) return Promise.resolve(); - // TODO flakey - // await Promise.all([ - // module.exports.cleanCollection(TEST_COLLECTION_NAME), - // module.exports.cleanCollection(TEST2_COLLECTION_NAME), - // ]); + await Promise.all([ + module.exports.cleanCollection(TEST_COLLECTION_NAME), + module.exports.cleanCollection(TEST2_COLLECTION_NAME), + ]); // await module.exports.cleanCollection(`${TEST_COLLECTION_NAME}3`); // await module.exports.cleanCollection(`${TEST_COLLECTION_NAME}4`);