mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 17:42:24 +08:00
[build][ci] re-enable firestore tests
This commit is contained in:
@@ -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' };
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user