Unit testing is a key tool for ensuring the correctness of our software, and Angular apps are no exception! In fact, part of what makes Angular so amazing is that itâ™s a framework written from the ground up with testing in mind. Angular directives, however, require a slightly different approach to unit testing than other Angular components such as services or controllers.
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 directives with Sinon, Jasmine, and Karma. You'll learn how to initialise any modules used by the app, and how to create dummy markup for the directive to bind to.