Thank you for this awesome example of using Jest to mock Firebase.
in the Test #2 since you've mocked a module with jest.mock('firebase')
i dont think that we need to call those two lines: let mockInitializeApp = jest.fn();
firebase.initializeApp = mockInitializeApp;
since jest.mock will automatically set all exports of a module to the Mock Function
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you for this awesome example of using Jest to mock Firebase.
in the Test #2 since you've mocked a module with jest.mock('firebase')
i dont think that we need to call those two lines:
let mockInitializeApp = jest.fn();
firebase.initializeApp = mockInitializeApp;
since
jest.mock
will automatically set all exports of a module to the Mock Function