O'Reilly logo

Dependency Injection with AngularJS by Alex Knol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing the parts

Angular projects can be tested with two types of tests. To test your entire application front to back, end-to-end tests should be used. To test the full stack of an Angular application, the best tool for the job would be to use Protractor. To test individual components, unit testing is the way to go. Before we get our hands dirty, we need to set up the testing environment. Jasmine will be used in this book to run AngularJS unit tests using a behavior-driven approach seen in many server-side testing frameworks. There are certainly other options out there, such as Mocha or QUnit, and they integrate quite nicely with AngularJS as well. The AngularJS integration of Jasmine solves dependency resolving quite nicely, whereas, others ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required