As a beginner in Jasmine BDD testing for Angular JS, I am looking for a simple test case. Can anyone provide an example?
This is my directive:
var app = angular.module('gls', []);
app.directive('changeBg', function() {
return {
restrict: 'A',
link: function($scope, element, attrs) {
element.bind('click', function(){
element.css('background','red');
});
}
};
});
Here is the markup:
<body ng-app="gls">
<a href='#' change-bg>Test link 1</a>
</body>