Photo by Timothy Dykes on Unsplash


You’ll probably want to include some unit tests in your build pipeline to avoid regressions. There are some popular options to help do this, jest being probably the most popular with mocha also high up there on the leaderboard. In this tutorial, we’ll cover some basics of mocha and how it integrates with chai, sinon, and enzyme.

  • mocha is a testing framework that helps us keep our unit tests organized.
  • chai is an assertion library that we use to make assertions about things.
  • sinon is…

Andrew Playsted

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store