title: How to fix 'Error: No value accessor for form control with name' in Angular Unit Test?
body: <p>I fail to test a component that uses a custom component with ngModel</p>
  <p>HTML code looks like this (see more in the repro below)</p>
  <pre class="lang-html prettyprint-override"><code>&lt;custom-control name=&quot;formCode&quot; [(ngModel)]=&quot;testValue&quot;&gt;&lt;/custom-control&gt;
  </code></pre>
  <p>The code is working in my app but it fails in my test with the following error</p>
  <blockquote>
  <p>Uncaught Error: Uncaught (in promise): Error: No value accessor for form control with name: 'formCode'</p>
  <p>Error: No value accessor for form control with name: 'formCode'</p>
  </blockquote>
  <p>The tests are run with jasmine</p>
  <p>I tried different imports but none seem to fix my issue</p>
  <p>The repro code is here : <a href="https://stackblitz.com/edit/angular-test-ng-model" rel="noreferrer">https://stackblitz.com/edit/angular-test-ng-model</a></p>