fields-of-arle
fields-of-arle copied to clipboard
Tests for components
There is logic inside components that I'd like to test, e.g. in #183 Any plans? Enzyme?
Jest should work, and feel free to use snapshots of an enzyme shallow render of the component, but if you use enzyme directly like that, add it to the devDependencies
I've added Enzyme, its React-16 adapter, and sinon as dev deps (see here)
Please advise, I'll just update to whatever you suggest.
Jest itself does not do any snapshotting? Their guide uses a react test renderer that would have to be installed, too.
I guess I had this in mind for snapshots: https://hackernoon.com/testing-react-components-with-jest-and-enzyme-41d592c174f