Angular JS Module Testing Tutorials with Examples

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

+5
source share
3 answers

First of all, and most IMPORTANT:

Unit testing is similar in all other languages.

You should keep in mind the basic features of writing testable code.

Note. There is a good Pluralsight video (what are the costs) from Misko Hevery on writing test code).

First: watch this youtube from Vojta Jina - Installing and starting karma , the person who wrote karma.

Second: watch this 1 hour tutorial, which I highly recommend: An Introduction to AngularJS Device Testing Jim Levin

Once you're done, you can test each piece of code in your Angular project.

Good luck.

+12
source

I have written several tutorials that detail how to get up and work with karma and jasmine for unit testing in AngularJS. I also wrote a series of posts detailing ngMock, which is Angular's own module that provides support for testing controllers, services, etc. In isolation.

Here is a link to a page listing all of these articles: UnitularJS tutorials

+6
source

There is great Jasmine testing documentation provided by Angular IO on the official website.

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

Luck

+1
source

Source: https://habr.com/ru/post/1206864/


All Articles