Closed pkspks closed 5 years ago
It is not possible to mock a component with providers. This is useful for a component that is a controlValueAccessor.
controlValueAccessor
Now it's possible to mock a component that is a form input by specifying providers.
MockComponent({ selector: 'foo', providers: [{ provide: NG_VALUE_ACCESSOR, useValue: {/**provider implementation**/} multi: true }] })
This PR also takes care of any other scenarios where component properties are to be specified.
Thanks for the contribution!
It is not possible to mock a component with providers. This is useful for a component that is a
controlValueAccessor
.Now it's possible to mock a component that is a form input by specifying providers.
This PR also takes care of any other scenarios where component properties are to be specified.