Testing React components: Enzyme vs React Testing Library

Alex Khomenko
Level Up Coding
Published in
7 min readNov 1, 2020

--

In the last post, we’ve built a Tic Tac Toe game with React Hooks and Styled components. However, it’s missing one crucial part of the development process — testing. In this post, we’ll fix this omission by adding the tests to the TicTacToe component. Additionally, this seems like a good opportunity to compare two of the most popular React testing tools — Enzyme and React Testing Library. As…

--

--

Front-end developer. Writing about React, Styled-components/emotion and everything around JavaScript.