I have already imported the angular material in my spec.ts but I am getting the below error when trying to run the test that is ng test of this particular component:
Error: Template parse errors:
'mat-form-field' is not a known element: 1. If 'mat-form-field' is an Angular component, then verify that it is part of this module. 2. If 'mat-form-field' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
[ERROR ->] ][dataSource]="parts" matSort class="mat-elevation-z8"> "): ng:///DynamicTestModule/PartViewComponent.html@6:23 The pipe 'uuidAbbrev' could not be found ("eader-cell *matHeaderCellDef mat-sort-header>Uuid {{[ERROR ->]row.uuid|uuidAbbrev}} "): ng:///DynamicTestModule/PartViewComponent.html@10:44 Can't bind to 'matHeaderRowDef' since it isn't a known property of 'tr'. (" ]matHeaderRowDef="displayedProps"> [ERROR ->] ]*matRowDef="let row; columns: displayedProps;"> "): ng:///DynamicTestModule/PartViewComponent.html@24:35 Property binding matRowDefColumns not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". (" [ERROR ->] http://localhost:9876/_karma_webpack_/vendor.js:36418:17) at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (http://localhost:9876/_karma_webpack_/vendor.js:54593:19) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (http://localhost:9876/_karma_webpack_/vendor.js:60159:37) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (http://localhost:9876/_karma_webpack_/vendor.js:60146:23) at http://localhost:9876/_karma_webpack_/vendor.js:60089:62 at Set.forEach () at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (http://localhost:9876/_karma_webpack_/vendor.js:60089:19) at http://localhost:9876/_karma_webpack_/vendor.js:60007:19 at Object.then (http://localhost:9876/_karma_webpack_/vendor.js:36409:77) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndAllComponents (http://localhost:9876/_karma_webpack_/vendor.js:60005:26) ```
TestBed.configureTestingModule()
– Tanner