There are many test frameworks available for testing JavaScript applications. Among them, JestJasmine, and Mocha are the most popular frameworks.

When it comes to the Angular world, Jasmine is the recommended testing framework. Angular CLI comes by default with Jasmine and Karma as the test runner. It generates test files at component creation, collects unit tests, runs karma, and displays results on a web page.

However, you can also configure Jest and Mocha to test Angular Components. This article will explain why we chose Jasmine as our test framework over Jest and Mocha.

But before that why should we use a test framework in the first place?

Why Testing ?— Because Manual Testing won’t cut it

At the beginning of any web application, it could be easy to test everything manually. But gradually web applications become more complex and larger, the manual testing becomes more challenging and time-consuming.

The solution is to introduce Testing. Testing helps us to maintain good quality in the application while saving time on manual testing.

So we decided to use a Test framework. Now we needed to pick a suitable test framework.

Which Framework Suits us Better? — Simplicity, Support, Ease of Adoption

Jasmine, Mocha, and Jest are among the most popular JavaScript testing frameworks. All these testing frameworks are mature and it came down to our preferences and project requirements to choose the best one for us.

The main concerns for us were simplicity, support, documentation, and ease of adoption. Here are our findings of the above characteristics for these test frameworks.

#jasmine #mocha #angular #testing #jest

Angular 9 Testing: Why We Chose Jasmine Over Jest and Mocha
15.35 GEEK