I have a Component which I want to test (not mock). It has some public and private fields like destroy$ = new Subject();
which have no @Input
. When I call MockRender and get the component via fixture.point.componentinstance
, the fields are undefined. A console-log inside the constructor does also not get triggered. So what does MockRender do? Why does it not instantiate the component class in a proper way? Or am I using the lib in wrong way? Is this expected behavior?
Asked
Active
Viewed 338 times
2
-
Hi @Phil, could you share the source code of your test? – satanTime Mar 06 '22 at 20:23