Dave Ceddia

Loves JavaScript, Ruby, and IPAs. His blog helps fellow devs level up their Angular, React, and JS skills. Known as @dceddia around the Interwebs.

Posts by: Dave Ceddia

Snapshot Testing React Components with Jest

Introduction Testing is a double-edged sword. On one hand, having a solid test suite makes code easier to refactor, and gives confidence that it works the way it should. On the other hand, tests must be written and maintained. They have a cost, like any other code. In a magical world, we could write our code, and then verify that it works with very little extra code. Snapshot tests come…

Getting Started with TDD in React

Introduction You’ve spent some time with React, maybe even written a few tests. But you’re not really sure how best to test your components. Where do you start? What exactly do you test? Some React components seem so simple that it’s not even clear whether they need tests at all. If you’ve come to React from Angular, you may have a bit of a love/hate relationship with tests. On one…