Can anyone please share a tutorial for unit testing with Jasmine/Karma along with sample code?

I have checked online a lot but unable to find a good one. Thanks!

Nikhil Mathur's photo

The official documentation of Jasmine provides a great introduction. Apart from that I found the following links helpful :

  1. Unit Testing With Karma and Jasmine
  2. Unit and End to End testing in AngularJS - Talks about using Karma and Jasmine to test an Angular app.
  3. Karma Intro
Joshua David's photo

Do you want to use Karma/Jasmine to test Angular apps or plain JavaScript apps?

Lakshay Dulani's photo

Javascript Programmer, .NET, Cordova/Ionic

Angular apps