You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's tricky because of the way jest hoists mocks to the top of the function, regardless of where you define them. You can have a beforeEach call at the top of your describe block and then mocks in 2 separate it blocks
describe('mocks',()=>{beforeEach(()=>{jest.resetModules();});it('does a thing',()=>{mockFirebase(...);// stuff here});it('does another thing, () => {
mockFirebase(...);
// other stuff here
});
});
Hi,
I wonder if there's a way to mock a different firestore state per
describe
, for use cases when testing if a user exists or not, etc.Thanks
The text was updated successfully, but these errors were encountered: