Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m

Next lesson playing in 5 seconds


Free Preview: Testing Angular Controllers



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:

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.

1.Testing Angular Controllers
2 lessons, 13:31

Free Lesson

Testing Angular Controllers