Closed Joegrundman closed 8 years ago
@Joegrundman I had the same problem and have gotten it to work. I didn't spend the time to figure out which package is the problem, but if you use the exact same versions of all the packages in this repo in your own code, it works.
Hi ddroche thank you for the response, actually I have found the problem to be the react/react-dom/react-addons-test-utils 15.2.1 release. If it is rolled back to 15.2.0 it works fine. My guess is that it is in the utils-package. I have posted an issue on airbnb/enzyme about this
I can now give a definitive response with thanks to @nfcampos at airbnb.
As of react15.2.1, Test utils cannot be run in production mode. This webpack setup has production config , development config and test config, but test config does not share development config
so:
in webpack.config. line 21:
isDev: isDev
change to
isDev: isDev || isTest
Thanks for the update. I will update the webpack config to handle this case.
Fixed this in the latest commit.
Thanks for reporting!
while running win10.
I came across this problem while building up from the tutorial, but decided to try running it from this repo to see where i may have gone wrong. I cloned this repo, ran npm install, made new .env, and then npm test:
I get exactly the same problem as I had when building up from the tutorial- all enzyme-based tests fail with for example:
if one changes the browser from Phantomjs to Chrome
then the error message is slightly different
I suspect there is an issue here with karma since i could successfully write a test using just enzyme and mocha.