I'm trying to create an instance of a component in component's testing file. But when I do something like this:
let componentInstance = new component();
it hits the component constructor, which further has something in its body,
constructor( param ) {
......;
......;
}
now the constructor body uses some other service, therefore whenever I'm trying to create an instance of this component and run it, it complains about the unknown properties which are being used in the constructor body (because the spec file obviously doesn't know about what is happening in the constructor body of our component.
Any ideas how can I create an instance of that component in its spec file?