最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angular - How to mock a child component that doesn't implement ControlValueAccesor - Stack Overflow

programmeradmin0浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论