I have MainComponent, uses ChildComponentA as @ViewChild 
<https://github.com/ViewChild>. Main Component is calling the 
ChildComponentA's Method.

I want to write an unit test case mocking the ChildComponentA. How can i 
mock complete ChildComponentA using TestBed (RC-5)?

Before I used to use overrideDirective(MainComponentName, ChildComponentA, 
MockChildComponentA); Is there an equivalent to this using TestBed?

I tried using

TestBed.overrideComponent(ChildComponentA,{
        set: {
          template: '<div></div>'
        }
      }); 

which just sets the template, I want to mock the methods in the component 
as well.


Thanks,

Kashyap Sistla

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to