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
I'm trying to test localStorage with https://www.npmjs.com/package/jest-localstorage-mock which requires some minor configuration setup in the package.json however when I try to add the following to my package.json
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
• transform
• transformIgnorePatterns
• watchPathIgnorePatterns.
These options in your package.json Jest configuration are not currently supported by Create React App:
• setupFiles
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.
error Command failed with exit code 1.
Describe the solution you'd like
I'f possible, I'd like out of the box support for this as I don't want to run npm run eject
If this is an easy fix, i'd like to contribute it myself to the create-react-app project if someone can just point me to previous config or relevant document =)
Is your proposal related to a problem?
I'm trying to test localStorage with https://www.npmjs.com/package/jest-localstorage-mock which requires some minor configuration setup in the package.json however when I try to add the following to my package.json
I get the following error message:
Describe the solution you'd like
I'f possible, I'd like out of the box support for this as I don't want to run
npm run eject
Describe alternatives you've considered
(Write your answer here.)
Additional context
https://www.npmjs.com/package/jest-localstorage-mock
https://jestjs.io/docs/en/configuration.html#content
(Write your answer here.)
The text was updated successfully, but these errors were encountered: