Unit Testing Directive Scope – angularjs Video Tutorial #free @eggheadio

  • In short: npm install karma-ng-scenario, then add ‘ng-scenario’ to the ‘frameworks’ section in karma.conf.js.
  • The scope is simply the scope that I injected into the element and I can just expect it to be true if I say, “Element bind click,” and then, “Scope click is true.
  • And then we’ll isolate the scope and you can see that our tests are going to start failing because our scope is isolated.

Read the full article, click here.


@eggheadio: “Unit Testing Directive Scope by @johnlindquist #AngularJS”


Unit test your AngularJS directives that make changes to $scope as well as their own isolated scopes.


Unit Testing Directive Scope – angularjs Video Tutorial #free @eggheadio

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.