Description
Jest is an open-source JavaScript testing framework that aims to work out of the box, with little or no configuration, on most JavaScript projects. It works with projects built on Babel, TypeScript, Node, React, Angular, Vue and more. It includes snapshot testing, where snapshots live alongside your tests or inline, and it can mock modules through a custom resolver for imports, so you can mock any object outside a test's scope. Tests run in parallel in their own processes with unique global state, which keeps them isolated. Jest re-runs previously failed tests first and orders runs by how long each test file took. Code coverage is collected with the --coverage flag and needs no extra setup, and it can cover whole projects, including files no test imports. The documentation covers getting started, configuration and API reference, and the site offers older versions and several translations. Jest is developed on GitHub and supported through Open Collective.…
Preview
Highlights
- Zero-config setup for most JavaScript projects
- Snapshot testing alongside or inline in tests
- Parallel, isolated test runs
- Built-in mocking of imports
- Code coverage with one flag
Ratings & Reviews
No ratings yet
Be the first to rate Jest.
People also visit
Mocha
Simple, flexible, fun JavaScript test framework for Node.js and the browser
Jest FAQ
What is Jest used for?
Writing and running automated tests for JavaScript projects, including those built with React, Angular, Vue, Node and TypeScript.
Does it need configuration?
The site says Jest aims to work out of the box, config free, on most JavaScript projects.
How do I measure code coverage?
Run Jest with the --coverage flag. The site says no extra setup is needed, and coverage can include untested files.
Is Jest open source?
Yes. The code is on GitHub at github.com/jestjs/jest, and the project is supported through Open Collective.
What are the best Jest alternatives?
Popular alternatives to Jest include Mocha, Jest Preview and Testing Library. See all Jest alternatives
















