admin管理员组

文章数量:1390707

I have a child component that is a dropdown select and I need to add formControlName from ReactiveForms, but this dropdown is not implementing the ControlValueAccesor. When I go to test with Karma, the following error appears:

TypeError: dir.valueAccessor.registerOnTouched is not a function

I tried to mock with jasmine but error continues to appear.

PS: I can't modify the child component

本文标签: angularHow to mock a child component that doesn39t implement ControlValueAccesorStack Overflow