Testing Angular Controllers

Posted By: ELK1nG

Testing Angular Controllers
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 177 MB | Duration: 14 minutes

Unit testing is a key tool for ensuring the correctness of our software. Angular apps are no exception! In fact, part of what makes Angular so amazing is that it is a framework written from the ground up with testing in mind.

If you haven't unit tested an Angular application before, you might not be aware that there are some extra features that we can use to make testing easier, such as hooking into Angular's dependency injection, and using angular-mocks for a range of test-friendly utilities.

In this Coffee Break Course, designed to teach a new skill or concept in a single sitting, Envato Tuts+ instructor Dan Wellman will show you how to take an existing Angular app and add tests for its controller. You'll learn how to create a new scope and how to create an instance of the controller and associate it with that scope. You'll also see how to inject dependencies and how to stub methods in dependencies.

Watch the other Coffee Break Courses in the Angular testing series:

Testing Angular Directives
Testing Angular Services
Testing Angular Filters
Testing Angular Components
We've built comprehensive guides to help you learn JavaScript, AngularJS, and Angular 2, whether you're just getting started or you want to explore more advanced topics.

Learn JavaScript: The Complete Guide
Learn AngularJS
Learn Angular 2