firestore-jest-mock
firestore-jest-mock copied to clipboard
Mock Errors
trafficstars
First of all, thank you for this amazing project!
I haven't yet found a way to mock issues/errors with Firestore. Is it possible to do something like this?
mockCollection.mockImplementationOnce(() => {
throw new Error("Firestore is down");
});
I'm not testing Firestore directly, but I'm using supertest to test how my API handles Firestore errors.