O'Reilly logo

AngularJS Directives by Alex Vanston

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

My first test

There are two primary types of tests supported by Angular and Karma: Unit and E2E (end-to-end). Unit testing is concerned with testing small chunks of code to ensure they do, and continue to do, what they're supposed to do. We'll do a quick overview of those next, and then dive into them in more detail in the next chapter. After our unit testing overview, we're going to introduce Angular's approach to E2E testing, which ensures that your whole application has and maintains all its functionality. Because E2E testing is more focused on an entire application, and not just a single directive, we won't spend too much time with it here, but it is worth being familiar with as you go forward.

Ok, let's take a look at some code. Jasmine allows ...

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