Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QUnit vs Jasmine? [closed]

What are the main differences between these two testing frameworks?

I am a totally new to Test Driven Development and starting from the very beginning.

like image 605
Sahat Yalkabov Avatar asked Aug 12 '11 23:08

Sahat Yalkabov


People also ask

What is difference between karma and Jasmine?

Jasmine can be classified as a tool in the "Javascript Testing Framework" category, while Karma is grouped under "Browser Testing". "Can also be used for tdd " is the primary reason why developers consider Jasmine over the competitors, whereas "Test Runner" was stated as the key factor in picking Karma.

What is the difference between mocha and Jasmine?

The documentation describes Jasmine as “batteries included,” meaning that it attempts to provide everything a developer needs in a test framework. Mocha is younger than Jasmine, created around 2011. Mocha is not a “complete” test framework, and doesn't attempt to be.

What is the difference between Jasmine and jest?

Jest is a testing platform built on Jasmine, which originated from Facebook. It offers a selection of advanced features that makes testing just a little bit easier. Jasmine provides a clean and simple API for end-to-end JavaScript testing with Node. js or in the browser.

Which is better jest or mocha?

Jest is also faster than Mocha. It has built-in support for snapshot testing, which means tests are run automatically on each change to the code. This makes it easy to keep your tests up to date as you work. Mocha has more features out of the box since it is a more mature tool with a larger community of contributors.


1 Answers

QUnit is very easy to get started with, as you only need to include two files and a little bit of markup, then you can start writing tests.

Jasmine strength, afaik is its BDD-style syntax, if that is something that you prefer (probably not a selling point for you) and tight integration into Ruby/Rails tools.

In the end both get the job done. I recommend to start with QUnit. Once you're feeling comfortable, try Jasmine and check if the BDD style fits better. If it does and you still want to keep using QUnit, you can add Pavlov to the mix, which provides BDD-style methods for QUnit.

like image 125
Jörn Zaefferer Avatar answered Sep 18 '22 13:09

Jörn Zaefferer