Testing in React

An Overview of Common Test Scenarios and Gotchas in ReactJs

Brandon Okert

Having recently been tasked with bringing our JS test coverage in React to >85%, I was surprised to find that there are scant resources for actually testing React components thoroughly. There are a few Test Utilities and getting started guides, but few examples to draw from for for in depth coverage. What do I do when I need to test a change in state resulting from a sequence of user actions?