Jasmine

898
976
+ 1
178
Mocha

2.8K
2.2K
+ 1
413
Add tool

Jasmine vs Mocha: What are the differences?

What is Jasmine? DOM-less simple JavaScript testing framework. Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.

What is Mocha? Simple, flexible, fun javascript test framework for node.js & the browser. Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.

Jasmine and Mocha belong to "Javascript Testing Framework" category of the tech stack.

"Can also be used for tdd " is the primary reason why developers consider Jasmine over the competitors, whereas "Open source" was stated as the key factor in picking Mocha.

Jasmine and Mocha are both open source tools. Mocha with 18K GitHub stars and 2.43K forks on GitHub appears to be more popular than Jasmine with 14.4K GitHub stars and 2.12K GitHub forks.

Sellsuki, Onedio, and triGo GmbH are some of the popular companies that use Mocha, whereas Jasmine is used by Coderus, Infoshare, and Ztory. Mocha has a broader approval, being mentioned in 397 company stacks & 268 developers stacks; compared to Jasmine, which is listed in 143 company stacks and 75 developer stacks.

Decisions about Jasmine and Mocha

We use Mocha for our FDA verification testing. It's integrated into Meteor, our upstream web application framework. We like how battle tested it is, its' syntax, its' options of reporters, and countless other features. Most everybody can agree on mocha, and that gets us half-way through our FDA verification and validation (V&V) testing strategy.

See more
Pros of Jasmine
Pros of Mocha

Sign up to add or upvote prosMake informed product decisions

Cons of Jasmine
Cons of Mocha

Sign up to add or upvote consMake informed product decisions

What is Jasmine?

Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.

What is Mocha?

Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
What companies use Jasmine?
What companies use Mocha?

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Jasmine?
What tools integrate with Mocha?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Jasmine and Mocha?
Jest
Jest provides you with multiple layers on top of Jasmine.
Karma
Karma is not a testing framework, nor an assertion library. Karma just launches a HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework. So for testing purposes you can use pretty much anything you like.
Cypress
Cypress is a front end automated testing application created for the modern web. Cypress is built on a new architecture and runs in the same run-loop as the application being tested. As a result Cypress provides better, faster, and more reliable testing for anything that runs in a browser. Cypress works on any front-end framework or website.
Enzyme
Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output.
Chai
It is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework. It has several interfaces that allow the developer to choose the most comfortable. The chain-capable BDD styles provide an expressive language & readable style, while the TDD assert style provides a more classical feel.
See all alternatives
Interest over time
News about Jasmine
More news