title: How to test a ReactiveForm containing <mat-checkbox>?
body: <p>I've trouble setting up <code>&lt;mat-checkbox&gt;</code> in a ReactiveForm and get <strong>No value accessor for form control [...]</strong> when testing.</p>
  
  <p>When I run the app in dev mode it works as expected.</p>
  
  <p>When using this:</p>
  
  <pre><code>&lt;mat-checkbox
    id="allDay"
    type="checkbox"
    formControlName="allDay"&gt;
      &lt;!-- i18n: @@event.allDay --&gt;All Day Event?&lt;!-- /i18n --&gt;
  &lt;/mat-checkbox&gt;
  </code></pre>
  
  <p>I get this error when running <code>npm test</code>:</p>
  
  <blockquote>
    <p>Failed: No value accessor for form control with name: 'allDay'<br>
    Error: No value accessor for form control with name: 'allDay'
          at _throwError /node_modules/@angular/forms/@angular/forms.es5.js:1918:1)
          at setUpControl /node_modules/@angular/forms/@angular/forms.es5.js:1828:1)
          at FormGroupDirective.webpackJsonp.../../../forms/@angular/forms.es5.js.FormGroupDirective.addControl
    /node_modules/@angular/forms/@angular/forms.es5.js:4808:1)
          at FormControlName.webpackJsonp.../../../forms/@angular/forms.es5.js.FormControlName._setUpControl
    /node_modules/@angular/forms/@angular/forms.es5.js:5396:1)
          at FormControlName.webpackJsonp.../../../forms/@angular/forms.es5.js.FormControlName.ngOnChanges
    /node_modules/@angular/forms/@angular/forms.es5.js:5314:1)
          at checkAndUpdateDirectiveInline /node_modules/@angular/core/@angular/core.es5.js:10845:1)
          at checkAndUpdateNodeInline /node_modules/@angular/core/@angular/core.es5.js:12349:1)
          at checkAndUpdateNode /node_modules/@angular/core/@angular/core.es5.js:12288:1)
          at debugCheckAndUpdateNode /node_modules/@angular/core/@angular/core.es5.js:13149:22)
          at debugCheckDirectivesFn /node_modules/@angular/core/@angular/core.es5.js:13090:1)</p>
  </blockquote>
  
  <p>But the code works for the other <code>&lt;mat-form-field&gt;</code>s without any problems:</p>
  
  <pre><code>&lt;mat-form-field&gt;
    &lt;input
      matInput
      type="text"
      formControlName="name"&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  
  <p>Is there anything I must provide in my component Tests?</p>