title: Angular unit test error - Can't bind to 'formGroup' since it isn't a known property of 'form'
body: <p>I am getting &quot;Can't bind to 'formGroup' since it isn't a known property of 'form'&quot; error (it('should create', () =&gt; {} ) test for every component using formGroup in my app. The app is working fine.</p>
  <p>I have imported FormsModule &amp; ReactiveFormsModule in every module.</p>
  <pre><code>&lt;form [formGroup]=&quot;uploadDocumentFormGroup&quot;&gt;
  
  export class UploadFormComponent implements OnInit {
    public uploadDocumentFormGroup: FormGroup;
  
    constructor(
      private formBuilder: FormBuilder,
      private modalMessageService: ModalMessageService,
    ) {
      this.createForm();
    }
  
    private createForm(): void {
       this.uploadDocumentFormGroup = this.formBuilder.group({
          uploadDescription: FormFields.default()
        });
    }
  </code></pre>
  <p>upload-form.component.spec.ts</p>
  <pre><code>describe('UploadFormComponent', () =&gt; {
    let component: UploadFormComponent;
    let fixture: ComponentFixture&lt;UploadFormComponent&gt;;
    // let formBuilder: FormBuilder
    // let modalMessageService: ModalMessageService;
  
    beforeEach(async(() =&gt; {
      TestBed.configureTestingModule({
        declarations: [ UploadFormComponent ],
        providers: [ ModalMessageService, FormBuilder ]
      })
      .compileComponents();
    }));
  
    beforeEach(() =&gt; {
      fixture = TestBed.createComponent(UploadFormComponent);
      component = fixture.componentInstance;
      fixture.detectChanges();
    });
  
    it('should create', () =&gt; {
      expect(component).toBeTruthy();
    });
  
  });
  </code></pre>
  <p>Please, help. Thanks.</p>