I am new to karma-jasmine unit testing for Angular js. So guys please can u share good tutorials?
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With