I am going to implementing unit testing in my application and for that I have chosen Karma. But I am struggling regarding how to write the test cases using Karma syntax. Please give me some starting resources and tutorial links regarding Karma syntax.
The ng test command builds the application in watch mode, and launches the Karma test runner.
AngularJS is written with testability in mind, but it still requires that you do the right thing. We tried to make the right thing easy, but if you ignore these guidelines you may end up with an untestable application.
My favorites resources for starting karma was those articles
http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html
You should also check the jasmine syntax for writing tests at http://jasmine.github.io/
and how to configure karma http://karma-runner.github.io/0.12/config/configuration-file.html
I hope it helps you
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