How to Test React Components using Jest and Enzyme

I’ve made a simple search app which calls to the Guardian API to retrieve articles and display the results to the user. First I will show you the functional app code, followed by unit tests and then followed by integration tests…. Source:


Anything you can render to the DOM, you can test with dom-testing-library. This repo is a bunch of simple examples of using dom-testing-library to test a Counter component in various frameworks. If your framework of choice is not listed here, please add it!… Source:

Testing vue-apollo Components with Jest

Recently I’ve been working on some tests for Vue single-file components with vue-apollo queries and mutations. Unfortunately, there are not so many guides on the topic so I decided to share my experience…. Source:

Testing Components in React Using Jest and Enzyme

This is the second part of the series on Testing Components in React. If you have prior experience with Jest, you can skip ahead and use the GitHub code as a starting point.  In the previous article, we covered the basic principles and ideas behind test-driven development…. Source:–cms-31602

Reduce Technical Debt by Using Unit Tests as Documentation

G. K. Chesterton wrote murder mysteries a century ago, but I wonder what sort of developer he would have been. In one of his books, he described a metaphorical fence or gate that obstructs the way with no discernible purpose…. Source:

Test Driven Development 101 and JS testing

Test Driven Development Cycle TDD Cycle: Write a test case which will obviously fail in the beginning. Do not have more than one failing test case at a time. Implement the simplest algorithm first, then generalise it when you identify some patterns…. Source:

What should we test (ReactJS Components)

There are a lot of discussions in the web when we talk about testing. And even more about unit testing. In React. TL;DRThis is going to be a brief summary of what and how should we think about when we test a ReactJS application…. Source:

The case against React snapshot testing

We’ve been working with React for a few years now here at ezCater, during which time our unit testing story has been steadily evolving. One of the recent strategies we’ve tried out is Jest snapshot testing. Snapshot testing is a popular strategy that we’ve seen in several React repos…. Source:

Debugging JavaScript Projects with VS Code & Chrome Debugger

Debugging JavaScript isn’t the most fun aspect of JavaScript programming, but it’s a vital skill. This article covers two tools that will help you debug JavaScript like a pro. Imagine for a moment that the console.log() function did not exist in JavaScript…. Source: