1

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

2
  • are you trying to add formControlName and it works in runtime, but broken in tests? Commented Mar 13 at 14:38
  • @IKERAGI please share the minimal reproducible code, if possible a stackblitz where the issue happens Commented Mar 13 at 17:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.