Hi I'm fairly new to the world of unit testing.

>From my understanding, I can load the controller I wrote elsewhere within a 
test suite and define expectations so that we can test if the expectations 
are fulfilled.

However, how can we load a directive within a test suite? 

When I googled how to test a directive, the answers I found was to create a 
new element and run a test on it. 

but how do we define its behaviour when we create a new element instead of 
loading the element?

Doesn't a directive has its own scope and controller? If so, there must be 
a way to load them into the test suite. or a build a link between the newly 
created element and the scope and controller of the directive.

Please enlighten me with your knowledge.


Thanks you,

Sean


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to