[AngularJS] Re: unit testing a controller that invokes a method that checks the DOM for a property.

2014-01-04 Thread Daniel Tabuenca
One of the great things about unit testing is that when you encounter friction it really is trying to tell you are likely doing something you shouldn't. You should consider encapsulating whatever action you are doing on the dom inside of a directive. For example you can have a directive that wr

[AngularJS] Re: unit testing a controller that invokes a method that checks the DOM for a property.

2014-01-05 Thread apples
thanks Daniel, I've decided to go this route. Didn't realize that reading the DOM also counted as 'dom manipulation'...which I know is a bad practice. On Sunday, January 5, 2014 1:04:59 AM UTC-5, Daniel Tabuenca wrote: > > One of the great things about unit testing is that when you encounter > f