title: Angular mat-divider is not a known element
body: <p>I'm trying to test a popup component in angular and I don't know why when I launch the tests i'm getting an error that says :</p>
  
  <blockquote>
    <p>'mat-divider' is not a known element:
      1. If 'mat-divider' is an Angular component, then verify that it is part of this module.
      2. If 'mat-divider' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component
    to suppress this message.</p>
  </blockquote>
  
  <p>I imported it though in the @NgModule here's my code: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@NgModule({
    declarations: [
      AppComponent,
      AdminTopMenuComponent,
      SvGameCardComponent,
      SvCreationPopupComponent,
      MockPopupComponent,
   MyDialogComponent,
   FvCreationPopupComponent,
      GameModesComponent,
      LinkTestComponent,
      UserComponent,
    ],
    imports: [
      BrowserModule,
      HttpClientModule,
      AppRoutingModule,
      FormsModule,
      ReactiveFormsModule,
      MatDialogModule,
   BrowserAnimationsModule,
   MatButtonModule,
   MatCheckboxModule,
      MatTableModule,
      MatDividerModule,
      MatInputModule,
      MatSelectModule,
      MatFormFieldModule,
      MatCardModule,
      AppRoutingModule,
      RouterModule,
    ],
    exports: [
        MatDividerModule,
        MatFormFieldModule,
    ],
    providers: [BasicService],
    bootstrap: [AppComponent],
    entryComponents: [
      MyDialogComponent,
      SvCreationPopupComponent,
      FvCreationPopupComponent,
      ]
  })
  
  export class AppModule {
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Component({
    selector: 'app-fv-creation-popup',
    templateUrl: './fv-creation-popup.component.html',
    styleUrls: ['./fv-creation-popup.component.css']
  })
  export class FvCreationPopupComponent implements OnInit {
  
    constructor(
      public dialogRef: MatDialogRef&lt;FvCreationPopupComponent&gt;, // dialogRef is now a reference to the diaolog popup
      @Inject(MAT_DIALOG_DATA) public data: any) { }      // allows the sharing of data through dialogConfig.data
  
    ngOnInit() {
      
    }
    
    submit(): void {
      //TODO: implementation de la fonction
      console.log("Submit fv-gameCard not implemented")
    }
  
    close(): void {
      this.dialogRef.close();
    }
    gameType: string[] = ["Formes géométriques","Thématique"];
    
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { /*async,*/ async, ComponentFixture, TestBed } from "@angular/core/testing";
  
  import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from "@angular/material";
  import { FvCreationPopupComponent } from "./fv-creation-popup.component";
  
  describe("FvCreationPopupComponent", () =&gt; {
      let component: FvCreationPopupComponent;
      let fixture: ComponentFixture&lt;FvCreationPopupComponent&gt;;
      // const mock: MatDialogRef&lt;FvCreationPopupComponent&gt; = new MatDialogRef&lt;FvCreationPopupComponent&gt;(null, null) ;
  
      beforeEach(async(() =&gt; {
          // const data: MyDialogComponent = null;
          // data.message = "Dialog Message";
          // tslint:disable-next-line:typedef
          const mockDialogRef = {
              close: jasmine.createSpy("close"),
          };
  
          TestBed.configureTestingModule({
          imports: [MatDialogModule],
          declarations: [ FvCreationPopupComponent ],
          providers: [{ provide: MatDialogRef, useValue: {mockDialogRef} }, { provide: MAT_DIALOG_DATA, useValue: {} } ]})
          .compileComponents();
      }));
  
      beforeEach(() =&gt; {
          fixture = TestBed.createComponent(FvCreationPopupComponent);
          component = fixture.componentInstance;
          fixture.detectChanges();
      });
  
      it("should create", () =&gt; {
          expect(component).toBeTruthy();
      });
  
  });</code></pre>
  </div>
  </div>
  </p>