My thoughts on Jasmine
I’m not a fan of having the globals populating the environment, so Jasmine does lose a few points in my book there. Otherwise, it has good variety of features out of the box. It does seem slightly “older” than the other frameworks on this list but that is not necessarily a bad thing and any pain points would have been encountered by others, meaning they should be easy to resolve.
My thoughts on AVA
The most minimal of all the frameworks on the list, Tape is straight to the point and provides you with the bare essentials.
My thoughts on Tape
Arguably the most used library, Mocha is a flexible library providing developers with just the base test structure. Functionality for assertions, spies, mocks, and the like are then added via other libraries/plugins.
requireit in every file. The downside is that plugins just might require you to include these anyway, leading to inconsistencies, and if you are OCD like me it will eventually drive you mad!
My thoughts on Mocha
The extensibility and sheer number of different ways you can configure Mocha impresses me. Having to learn Mocha, then also having to learn the assertion library you choose does scare me a little though. Flexibility in it’s assertions, spies and mocks is highly beneficial. Overall, Mocha covers the basics, and allows developers to extend it with other frameworks.
My thoughts on Jest
Whilst the globals are a downside, Jest is a feature rich library constantly being developed. It has a number of easily accessible guides to help out, and supports a variety of different environments which is great to see when building any project.
After looking into only a few of the many different frameworks out there I find myself coming to the conclusion that choosing a framework is not black and white.
Most frameworks (Mocha being the exception) provide you with what you need at the end of the day, which is a testing environment along with the mechanisms to ensure that given the X -> Y is always returned, with a few simply giving you more “bells and whistles.”
You should feel pretty confident in choosing any of them, and the choice in my mind depends what you and your particular project wants or needs.