All Questions
5 questions
5votes
2answers
2kviews
Testing AngularJS scope variables
I'm trying to implement a test that relies on a scope variable. I want to enable ng-switch-when to resolve an expression. This is what I'm trying to do (UPDATE using $rootScope): it('should switch on ...
1vote
2answers
2kviews
AngularJS Unit testing a link in a directive
I am trying to write unit tests to test my directives. However, when I invoke a click on a checkbox, it will not update the model. How can I make it change the model? Somehow it doesn't seem to bind. ...
0votes
0answers
202views
Template-Url Directive Unit Testing without Karma
SOLUTION = Solution Plunker I have tried manually passing the template in testing - is it even good way of doing it ? How to make it passes !!!!!!! How to write unit test for Simple directive with ...
0votes
2answers
90views
How to test that an Angular directive runs a watch handler when its value changes
I have a directive which needs to re-evaluate when its value changes. The code is actually working fine, but I want to put in a test case to catch this and I can't seem to get the watch handler to run....
1vote
0answers
212views
Testing Directives events
I have a directive that $emit's an event, but in the parent scope of a unit test doesn't get the event. test $broadcasts an event to the directive, directive gets the event, and then directives $...