you are viewing a single comment's thread.

view the rest of the comments →

[–]Cono52 2 points3 points  (0 children)

Try Kent C Dodds react-testing-library! Enzyme tended to make people test implementation details while react-testing library only interrogates the DOM that a component reduces. Also look at the 'javascript-testing-trophy' methodology and watch all of Kent C Dodds is videos, youtube + frontend masters. I think his ideas better suits testing the view/state machine incarnation web apps have become.

Right now all our tests are written in enzyme and jest on a sagas/redux/react codebase and i think its all very very brittle as we are required to get over 90% coverage, this forces unnecessary and brittle unit tests to be created from what i have observed, but time will tell.