An introduction to testing React components with Enzyme 3

Article by Jack Franklin

In today's post we'll introduce the AirBnB library Enzyme for testing React applications. We'll do this using a test driven development (TDD) approach. That is, we'll write the tests first, watch them fail, and then build the React component out to fix the tests, before then writing more. We'll then consider how we can refactor code whilst running the tests to confirm we haven’t made any errors.


Related resources

How to (unit) test in React

This guide explains what unit testing is, why it's needed and the best practices for small to large React applications. [continue]

Article by Onoufrios Malikkides

End to End testing React applications

Having a good testing setup, one that allows us to create meaningful tests and is not a painful process, is extremely important to produce quality code. In this talk we will explore the options that we have, and will explain how to leverage webdriver for end-to-end testing React applications. [continue]

Video Talk by Forbes Lindesay

A New Way to Handle Events in React

'Property Initializer Syntax' sounds more fancy than it really is. In this bite-sized tutorial see how this alternative way of writing event handlers will help eliminate boilerplate in your constructor and also defend against frivolous memory usage in your renders. [continue]

Article by William Le

Debugging a Create React App with VS Code

In this video we'll look at how to configure VS Code to debug React components and Jest unit tests inside a web application that was created by create-react-app. [continue]

Video Tutorial by Manorisms