mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-17 23:04:53 +08:00
[tests][firestore] testDocRef helper - returns a prefixed document id ref for current test iteration
This commit is contained in:
@@ -75,6 +75,14 @@ module.exports = {
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
testDocRef(docId) {
|
||||
shouldCleanup = true;
|
||||
return firebase
|
||||
.firestore()
|
||||
.collection(TEST_COLLECTION_NAME)
|
||||
.doc(`${testRunId}${docId}`);
|
||||
},
|
||||
|
||||
testCollection(collection) {
|
||||
shouldCleanup = true;
|
||||
return firebase.firestore().collection(collection || TEST_COLLECTION_NAME);
|
||||
|
||||
Reference in New Issue
Block a user