-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Allow to override resetMocks
and resetModules
Jest configuration?
#3116
Comments
overriding |
+1 for overriding config and/or as CLI argument. |
Sure, that sounds good. |
Can this issue be expanded to cover other jest configurations like "setupFiles" so it can support mocking libraries like jest-localstorage-mock? |
Does |
It doesn't provide any functionality you can't put in |
I see your point but I feel that since it's perfectly possible to use the global conventional file, and we already support it, this doesn't really add value.
|
PR #3802 opened to try add this feature. |
I am wondering if you would be opened to allow overriding the
resetMocks
andresetModules
options from Jest configuration? Currently, when trying to update them directly in thepackage.json
such as:I got a message telling me it is not configurable:
As an absent minded developer, I will always forget to restore a mock one day or another. And this parameter would save (the future) me a lot of time. Is there any particular reason to restrict these two options? Or is it just a lack waiting for a PR? :)
Related Jest documentation: https://facebook.github.io/jest/docs/en/configuration.html#resetmocks-boolean
The text was updated successfully, but these errors were encountered: