Out of the box, Create React App only supports overriding these Jest options:
• clearMocks • collectCoverageFrom • coveragePathIgnorePatterns • coverageReporters • coverageThreshold • displayName • extraGlobals • globalSetup • globalTeardown • moduleNameMapper • resetMocks • resetModules • restoreMocks • snapshotSerializers • testMatch • transform • transformIgnorePatterns • watchPathIgnorePatterns.
These options in your package.json Jest configuration are not currently supported by Create React App:
• cache • setupFiles • testEnvironment • globals
If you wish to override other Jest options, you need to eject from the default setup. You can do so by running npm run eject but remember that this is a one-way operation. You may also file an issue with Create React App to discuss supporting more options out of the box.
Solution
Remove the unsupported options "cache", "setupFiles", "testEnvironment", "globals".
This may happen after upgrading react-scripts.
It is likely that your unit test will pass anyway. If not individual attention must be given.
Recent Comments