News for hackers. Stuff that matters.
Re:Where Yegge’s Wrong by andy_ppp on Monday March 26, 2018 @10:50PM (#16684786)
It got a lot better unit testing UI recently especially being able to snapshot test different scenarios. In the end if you have stateless React components testing with jest and enzyme is easy. Again supplying state hooks for the various different interactions a more complex component might have is perfectly possible.

Additionally separate your components logic from rendering and test that; e.g. a calendar widget I just created has a load of tested functionality for creating lists of dates with various attributes (isCurrentMonth, isToday, isSelectable, isSelected, etc). This can be unit tested just fine.

Finally I’d strongly recommend cypress for doing e2e testing.

There are no comments on this comment yet.