AngularJS Unit testing

Topics 

  • Why testing AngularJS apps? 
  • Testing tools 
    • Jasmine 
    • Karma 
  • Angular ngMock module 
  • Setup for AngularjS testing
  • Unit-testing AngularJS app 
    • Testing controllers 
    • Testing filters 
    • Testing directives

Why Testing Angular Apps?

Why Testing for JavaScript?Angular code? 

  • JavaScript is a dynamically typed language which comes with great power of expression, but it also comes with almost no help from the compiler 
    • Any code written in JavaScript needs to come with a strong set of tests 
    • Note: TypeScript used in writing Angular 2 application provides compile time type checking 
  • Angular is designed with testing in mind 
    • The built-in dependency injection makes unit testing easy - dependency objects can be mock objects during testing 
    • Separation of concerns (controller is separated from view) makes it easier to test controller

You must have an active subscription to download PDF,Lab Zip and Recordings of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.