Jest is a JavaScript unit testing framework made by Facebook that's based on Jasmine and provides automated mock creation, and a jsdom environment. It's often used for testing React components.

It has a couple of advantages compared to vanilla Jasmine

  • Automatically finds tests to execute in your repo
  • Automatically mocks dependencies for you when running your tests
  • Allows you to test asynchronous code synchronously
  • Runs your tests with a fake DOM implementation (via jsdom) so that your tests can run on the command line
  • Runs tests in parallel processes so that they finish sooner

For more information about Jest see the official Jest homepage.

history | excerpt history