glamorous-native
glamorous-native copied to clipboard
Use enzyme's `mount` in unit tests
Currently the unit tests use shallow and react-test-render. mount is particularly useful for stepping through component workflows and lifecycle events. However, mount has known challenges with React Native (https://github.com/airbnb/enzyme/issues/614)
I've got it working with the suggestions in https://blog.joinroot.com/mounting-react-native-components-with-enzyme-and-jsdom, and mirroring the setup in https://github.com/rjanjua/React-Testing-Guide.
However, there are some issues with Jest snapshots, where it appears that rendered elements appear twice in the snapshot.