Nope
Enzyme
node -v
: 8.4.0npm -v
: yarn --version
(if you use Yarn): 1.2.0npm ls react-scripts
(if you haven鈥檛 ejected): 1.0.14Then, specify:
You can get a basic Enzyme setup without having to eject.
Adding enzyme to React 16+ requires you to eject because you can't configure Jest further to get enzyme's adapters setup.
you can't configure Jest further to get enzyme's adapters setup.
This is not correct. CRA has always supported running some code before every test:
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#initializing-test-environment
Here is an example of working setup:
https://github.com/facebookincubator/create-react-app/issues/3199#issuecomment-334801311
Somebody should send a PR to Enzyme to document usage with CRA, and update our docs as well.
I filed an issue for updating the docs.
https://github.com/facebookincubator/create-react-app/issues/3272
Most helpful comment
This is not correct. CRA has always supported running some code before every test:
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#initializing-test-environment
Here is an example of working setup:
https://github.com/facebookincubator/create-react-app/issues/3199#issuecomment-334801311
Somebody should send a PR to Enzyme to document usage with CRA, and update our docs as well.