enzymejs / enzyme-matchers

Jasmine/Jest assertions for enzyme
MIT License
892 stars 116 forks source link

argv.config.match is not a function, Process finished with exit code 1 #338

Open wzup opened 4 years ago

wzup commented 4 years ago

Configuration doesn't work in PhpStorm.

My question on StackOverflow https://stackoverflow.com/questions/60521964/how-to-configure-jest-in-phpstorm-for-react-application-create-react-app-flavor

Duplicate it here. When I specify jest config in a separate file, jest-environment-enzyme can't parse or see it or anything. But it can see config if I specify it in package.json, but anyway it throws error

We detected setupFilesAfterEnv in your package.json. Remove it from Jest configuration, and put the initialization code in src/setupTests.js. This file will be loaded automatically.

My config in a file jest.config.js:

module.exports = {
  "setupFilesAfterEnv": ["jest-enzyme"],
  "testEnvironment": "enzyme",
  "verbose": true,
};