5

I am new to karma-jasmine unit testing for Angular js. So guys please can u share good tutorials?

3 Answers 3

13

First of all, and most IMPORTANT:

Unit-testing is similar in all other languages.

You have to keep in mind the main features of writing testable code.

Note: There is a good Pluralsight video ( Which cost money ) by Misko Hevery on Writing Testable Code).

First: Watch this youtube by Vojta Jina - Installing and Starting Karma, the person who wrote karma.

Second: Watch this 1 Hour tutorial which I highly recommand : Introduction to AngularJS Unit Testing By Jim Levin

After you complete those you should be able to test every piece of code in your Angular Project.

Good Luck.

8

I've written a number of tutorials detailing how to get up and running with Karma and Jasmine for Unit Testing in AngularJS. I've also written a series of posts detailing ngMock in depth, which is Angular's own module that provides support for testing controllers, services etc in isolation.

Here's a link to a page that lists all these articles: AngularJS Unit Testing Tutorials

1
  • I have read your series of articles which covers the angularJS Testing....very good Commented Nov 22, 2016 at 14:37
0

There is an amazing documentation on Jasmine Testing provided by Angular IO on their official website.

https://angular.io/docs/ts/latest/guide/testing.html

Good Luck

Not the answer you're looking for? Browse other questions tagged or ask your own question.