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
Breaking: Removes enzyme and enzyme-to-json from the project in favor of react-test-renderer. After upgrading, run your test suite with the update -u flag as the snapshot files may change slightly.
Note: tagging this as a minor release because you might have to update snapshots while running your tests if you're using .oneOf in places...
Fixes enum propType (aka oneOf) which was injecting the string quotes into the component. For example type: PropTypes.oneOf('News', 'Photos') would inject 'News' into the snapshot instead of the desired News
Better warning logging (the old warning messages didn't reflect recent changes to the package)
After using v1 in a large project for a week, I decided it had too much "magic" in terms of automatically trying to find the component file for you. This resulted in confusing config for something that you usually had to enter manually anyways. v2 introduces 2 breaking changes that should make the package more flexible and easier to use. These changes are also reflected in the readme.
Component file path is now required as the second argument.
Simplified config into 2 options fixturesByPropType and fixturesByPropKey