Allow to override `resetMocks` and `resetModules` Jest configuration?
Created by: jpetitcolas
I am wondering if you would be opened to allow overriding the resetMocks
and resetModules
options from Jest configuration? Currently, when trying to update them directly in the package.json
such as:
{
"jest": {
"resetMocks": true
}
}
I got a message telling me it is not configurable:
Out of the box, Create React App only supports overriding these Jest options:
• collectCoverageFrom
• coverageReporters
• coverageThreshold
• snapshotSerializers.
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