This site runs best with JavaScript enabled.
Looking for something specific? Search for a blogpost here.

Testing Implementation Details

Last year when I was using enzyme (like everyone else at the time), I stepped carefully around certain APIs in enzyme. I completely avoided shallow rendering , never used APIs like instance() , state() , or find('ComponentName') . And in code reviews of other people's pull requests I explained…

Read →

Common Testing Mistakes

Mistake Number 0 One of the biggest mistakes you could make would be missing out on my full Testing JS course . (see what I did there?) Mistake Number 1: Testing Implementation Details I harp on this a lot ( read more ). It's because it's a huge problem in testing and leads to tests that don't give…

Read →

UI Testing Myths

Myth 1: "Tests always break when I make any changes to the code" This is actually a truth... if the tests are written incorrectly. If your test is testing implementation details, then of course they'll break when the implementation changes! But your user doesn't care about the implementation details…

Read →

The Merits of Mocking

The more your tests resemble the way your software is used, the more confidence they can give you. —  me One of the biggest challenges people face with testing is knowing what to test . There are lots of reasons for that, but one big, flashing-lights reason is mocking. Many people don't know when to…

Read →

The time I messed up

We all have stories where automated tests could've saved us from disaster, but I want to tell you a story of a time when I went overboard with a certain testing practice and it went really badly for me... This was a few years ago. I was working on angular-formly and I had just discovered React's…

Read →

React is an implementation detail

I'm so excited about the response to my new Testing JavaScript course! I knew the developer community needed help with testing the right way, but... wow. I'm floored. 🙏 But if you haven't signed up yet (or even if you have), let's talk about React for a minute. If you've been following me for…

Read →

Eliminate an entire category of bugs with a few simple tools

You've probably heard of ESLint, Prettier, and Flow/TypeScript. These are static code analysis tools that are wildly popular in the JavaScript ecosystem. I consider them all testing tools. Let's take a look at each: ESLint ESLint is the pluggable linting utility for JavaScript. Linting is the…

Read →