Preslav's Thoughts and Ramblings

karma

  • 22 August 2015

    ngMock Helpers

    Let’s take a controller test straight out of the Angular JS Docs: describe('PasswordController', function() { beforeEach(module('app')); var $controller; beforeEach(inject(function(_$controller_){ // The injector unwraps the underscores (_) from around the parameter names when matching $controller = _$controller_; })); describe('$scope.grade', function() { it('sets the strength to "strong"...