-
Notifications
You must be signed in to change notification settings - Fork 3.9k
-
Hey there! Thanks for creating these samples, they're very helpful in creating up to date Firebase code.
I've been using the firebase-functions-test
library and trying to use the FeaturesList.firestore.clearFirestoreData(string | { projectId: string})
function and can't seem to be get it to do what I believe it's trying to do (clear all the documents within the emulated firestore). I've tried running it in an afterEach
within my test file like this:
afterEach(async () => { await ft.firestore.clearFirestoreData( {projectId: process.env.GCLOUD_PROJECT ?? ""} ); });
But that doesn't seem to do anything. I'm under the assumption that I may be unclear on what this function does. I'm creating tests within the firebase emulator so I'm not usre if this function works within the emulator (it states that it only works in offline mode).
Some example usages or an example of how to clear firestore data while testing an emulator would be awesome! Thank you.
Beta Was this translation helpful? Give feedback.