Files
TechRadarAJR/radar/2017-03-01/jest.md
Philip Feldmann 461c4e7dda Added articles in markdown
Added all (missing) current articles of each quadrant.
2017-04-04 17:22:21 +02:00

19 lines
919 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Jest "
ring: assess
quadrant: tools
---
[Jest](https://facebook.github.io/jest/) is a javascript testing framework by facebook to test javascript code **and** react applications / components.
We started using Jest (and [watchmen](https://github.com/facebook/watchman)) 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](https://medium.com/@RubenOostinga/combining-chai-and-jest-matchers-d12d1ffd0303#.3callo273), chai and jest test matchers work fine together.