16bugs JavaScript: from Zero to Hero
Log in

JavaScript: from Zero to Hero

#135 which testing framework to choose

Reported by Volkan Ozcelik · 14 Jul 2018, 04:50

Status
New
Priority
Normal
Assigned to
Volkan Ozcelik
Category
Lessons
Version
None

from slack discussion:

do i go wrong choosing mocha?

1 reply
Volkan Ozcelik [2 minutes ago]
Nope. mocha and jasmine are equally good.

My recommendation for jest is just for the sake of trying out something new and being "on the edge".

Jest is essentially Jasmine, and Jasmine is as good as Mocha.

So Mocha is a solid choice in itself.

And, to reiterate, framework is not that important: Getting into the "TDD/BDD" mindset is much more important. You can even use Node.js `assert` API ( https://nodejs.org/api/assert.html ) and there are production application that happily do their tests with the `assert` API without even touching Mocha, Jasmine, Jest, et al.

tl;dr: Go with Mocha, it's good.

History

14 Jul 2018, 04:50Volkan Ozcelik submitted the bug