Testing in React
ReactTestUtils makes it extremely simple to use whatever testing framework you prefer. The docs state that Jest is what they use, so naturally I tried this first.
At first Jest was handling all of my issues flawlessly, but after I started writing more and more components, I realized this was because I was only using examples from the initial
Jest tutorial page. After I started getting more complicated, I found Jest to be less intuitive than I had initially thought. I was getting frustrated, spending more time trying
to figure out how to test my code than actually writing any real production code. I started looking for alternatives, which is when I found Enzyme by airbnb.
React actually lists Enzyme as an alternative in their tutorial. I decided to give it a shot. At first I was unsure how to go about replacing Jest with Enzyme, but then I found a very helpful tutorial about how to do exactly that. Using this tutorial as my guide I was actually able to switch out the testing framework in about an hour. I enjoy using Enzyme a lot more than using Jest. I find it to be much more intuitive to me. Now I can spend my time actually writing real code and using my testing suite to support it, rather than spending my time fighting the testing framework.
After a couple weeks of using React, I have really been enjoying it. One thing I would love to see is some sort of command line interface or build tooling, like Ember-CLI. I look forward to using React in more future projects and watching the ecosystem grow. I think there are some really interesting problems being solved in the React atmosphere.