Technology RadarTechnology Radar
This item was not updated in last three versions of the Radar. Should it have appeared in one of the more recent editions, there is a good chance it remains pertinent. However, if the item dates back further, its relevance may have diminished and our current evaluation could vary. Regrettably, our capacity to consistently revisit items from past Radar editions is limited.
Adopt

Updated to "adopt".

Assess

Jest is a JavaScript testing framework by facebook to test JavaScript code and React applications / components.

We started using Jest (and watchmen) instead of Karma because it:

  • gives us integrated mocking library
  • gives us integrated support for testing "promises"
  • gives us integrated code coverage report
  • automatically runs tests related to changed files (instead of all tests)
  • gives us parallel test execution
  • gives us snapshot testing for React components

It is easy to set up. And even if you have a running setup with Karma/Chai you can easily replace Karma with Jest. With a small workaround, Chai and Jest test matchers work fine together.