-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: expect.addSnapshotSerializer is not a function #71
Comments
I'm assuming you ignored the npm peer dependency warnings :) Jest added this feature in version 19 hence this [https://github.com/blainekasten/enzyme-matchers/blob/master/packages/jest-enzyme/package.json#L46](peer dep). You either need to upgrade jest or use a 2.x version of jest-enzyme that supports older versions of jest. |
Created a PR to add what you mentioned in the README. I'm expecting people new to the ecosystem to use create-react-app a lot and stumble upon enzyme eventually. And I'm not really expecting many of them to read peer dependency warnings :). |
Awesome! Thanks so much! |
Using jest-enzyme@3.0.0+ with Create React App is causing "TypeError: expect.addSnapshotSerializer is not a function" error. This is happening because jest-enzyme@3.0.0+ depends on jest@19.0.0 while Create React App is currently using jest@18.1.0. Added README warning - pending to be modified when Create React App updates their Jest dependency. See also #71.
I receive the following error when I try to run my tests with
jest-enzyme
:The text was updated successfully, but these errors were encountered: