-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not mock module that require object-assign. #201
Comments
Jest is mocking the module So you'll want to use |
Thanks!. I just had this issue and found that object-assign was mocked, but didn't know how to not mock it. |
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Take the flux
ChatAppDispatcher
from the flux chat example app that uses theobject-assign
ponyfill.When you are testing module X that
require
s ChatAppDispatcher, jest returnsundefined
instead of a mocked object for module X.If you copy the relevant code out of the
object-assign
module and just use it right inChatAppDispatcher.js
jest then mocks appropriately.The text was updated successfully, but these errors were encountered: