Jasmine vs Jest
Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.
Open source · MIT
A behavior-driven JavaScript testing framework that runs in browsers and Node.js.
Open source · MIT
A JavaScript testing framework that runs test files and checks results, with a watch mode and snapshots.
The short answer
Choose Jasmine if you need…
- JavaScript developers who want a test framework with no extra dependencies
- Teams testing Node.js projects
- Developers testing browser-based websites
- People who prefer test descriptions written in plain, readable sentences
Choose Jest if you need…
- JavaScript or TypeScript developers who want a testing setup that works with little configuration
- Teams adding automated tests to an existing Node-based or front-end project
- People who want to check how large objects or outputs change over time with snapshots
- Developers who want fast feedback while editing code via watch mode
Side-by-side
| Jasmine | Jest | |
|---|---|---|
| Type | Library | Library |
| Price | Free and open source | Free and open source |
| Licence | MIT | MIT |
| GitHub stars | 15.8k | 45.5k |
| Setup difficulty | Beginner | Beginner |
| How you get it | See the README | Install with a package manager |
| Main language | JavaScript | TypeScript |
| Last code update | 28 days ago | 4 days ago |
What each one is
Jasmine
Jasmine is a testing framework for JavaScript, written in the behavior-driven development style, where tests are written as readable descriptions of expected behavior. The README says it does not depend on browsers, the DOM, or any other JavaScript framework, so it can be used for websites, Node.js projects, or anywhere JavaScript runs.
Jest
Jest is a testing tool for JavaScript code. You write small test files that call functions and check the results against expected values, and Jest runs them and reports which pass or fail. Its watch mode re-runs only the tests related to files you changed, and its snapshot feature saves a copy of large outputs so you can see when they change.
Best for
Jasmine
- JavaScript developers who want a test framework with no extra dependencies
- Teams testing Node.js projects
- Developers testing browser-based websites
- People who prefer test descriptions written in plain, readable sentences
Jest
- JavaScript or TypeScript developers who want a testing setup that works with little configuration
- Teams adding automated tests to an existing Node-based or front-end project
- People who want to check how large objects or outputs change over time with snapshots
- Developers who want fast feedback while editing code via watch mode
Strengths
Jasmine
- The README states it has no dependency on browsers, the DOM, or other JavaScript frameworks
- Tests the README lists as supported across Node and major browsers, with a published support table
- Released under the permissive MIT License
Jest
- The README describes it as working out of the box for most JavaScript projects
- Watch mode runs only tests related to changed files, giving quick feedback
- Snapshot testing and a generated basic configuration file reduce setup effort
Not ideal for
Jasmine
- People who need a graphical testing tool with no coding (tests are written as JavaScript code)
- Projects that need browser or environment support outside the listed versions, since the README says other setups are untested
Jest
- People who do not write or maintain JavaScript code, since it is a developer tool for testing code
- Projects that need full browser end-to-end testing, because the README describes Jest as a unit-style test runner and does not mention browser automation
- Anyone who wants Babel-free TypeScript type checking in tests, since the README says Babel-based TypeScript support does not type-check tests and suggests ts-jest or tsc instead
Trade-offs
Jasmine
- Some Node and Safari versions are supported only on a best-effort basis, per the README
- The README does not describe every feature; detailed usage is in the external documentation site
Jest
- TypeScript support through Babel does not type-check tests, so extra tools are needed for that
- The README says Vite support is not full and points to a third-party plugin with limitations
- Setup for some bundlers and TypeScript requires extra packages and configuration
Getting started
Jasmine
Clone the repository
git clone https://github.com/jasmine/jasmine.gitJest
Install with npm (dev dependency)
npm install --save-dev jestInstall with yarn (dev dependency)
yarn add --dev jestFrequently asked questions
What is the difference between Jasmine and Jest?
Jasmine: A behavior-driven JavaScript testing framework that runs in browsers and Node.js. Jest: A JavaScript testing framework that runs test files and checks results, with a watch mode and snapshots. Jasmine suits javascript developers who want a test framework with no extra dependencies, while Jest suits javascript or typescript developers who want a testing setup that works with little configuration.
Are Jasmine and Jest free?
Jasmine: Free and open source. Jest: Free and open source.
Is Jasmine or Jest more popular?
Jest has more GitHub stars (45.5k) than Jasmine (15.8k). Popularity isn't the same as fit — check which one matches your use case above.
What are other alternatives to Jasmine and Jest?
Other options people compare them with include Mocha, Vitest, AVA, Cypress, ReactPlayer.
Keep comparing
Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.