I'm trying to test the component but getting cdkTextareaAutosize not found tried importing various modules but the error still exists. import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NotesServiceService } from 'src/app/service/notesService/notes-service.service'; import { RouterTestingModule } from '@angular/router/testing'; import { UpdateComponent } from './update.component'; import { RouterModule } from '@angular/router'; import { HttpClientModule } from '@angular/common/http'; import { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; describe('UpdateComponent', () => { let component: UpdateComponent; let fixture: ComponentFixture<UpdateComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ UpdateComponent ], providers:[ NotesServiceService, { provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} } ], imports:[ RouterModule, RouterTestingModule,HttpClientModule,MatDialogModule ] }) .compileComponents(); }); Continue reading...