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
It tries to require.resolve('firebase'), however it seems like in Firebase 9 this is not possible anymore (I'm using e.g. require('firebase/firestore') so the mock should likely use similar imports).
Steps to reproduce
Create a project with firebase >= 9. Call mockFirebase().
Description
I've tried to use
mockFirebase
, however it always logs "Module firebase not found, mocking skipped.".The error comes from here:
https://github.com/Upstatement/firestore-jest-mock/blob/45f435c8b412f7bc9bc8e8d1fac797204e387efc/mocks/firebase.js#L41-L54
It tries to
require.resolve('firebase')
, however it seems like in Firebase 9 this is not possible anymore (I'm using e.g.require('firebase/firestore')
so the mock should likely use similar imports).Steps to reproduce
Create a project with firebase >= 9. Call
mockFirebase()
.See this repo for a minimal example: https://github.com/Otto-AA/firestore-mock-bug-demo
Expected result
It should mock firebase.
Actual result
It does not find the firebase module.
Environment
The text was updated successfully, but these errors were encountered: