All Questions
3 questions
1
vote
1
answer
285
views
Angular Unit Testing: Isolate certain components defined on module
I've inherited a large AngularJS project using Karma and Jasmine and am trying to follow the conventions that were set out before me, but am having trouble unit testing directive/controller modules. ...
1
vote
1
answer
692
views
How to test a directive which uses ngModel on same element
I have a directive which requires ngModel. In its link function it calls $setViewValue on the ngModel controller. I want to test that $setViewValue is being called under the right conditions, but I ...
0
votes
0
answers
55
views
Unit testing controller triggering custom directive
Suppose you have an angular+jasmine app and your controller looks something like this:
app.controller('MyController', function($scope) {
$scope.myFunc = function() {
$scope.myArray = [];
...