Code along template: https://github.com/thoughtworks-jumpstart/jest-starter-template
Here are the commonly used JavaScript test runner libraries: jest
, jasmine
, mocha
. They are very similar in their functionality and API design, so if you master one, chances are - learning the others won't be difficult.
In this chapter, we will learn jest
because:
jest
has feature-parity with other test runners (e.g.mocha
,jasmine
)jest
is fast- minimal configuration is required
- the snapshot testing feature (which we will use later when we learn React)