title: Error while angular unit testing with Jasmine and Karma
body: <p>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:</p>
  
  <p>Error: Template parse errors:</p>
  
  <p>'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. ("</p>
  
  <p>[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'. ("
                      
                      ]<em>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 (<a href="http://localhost:9876/_karma_webpack_/vendor.js:54593:19" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:54593:19</a>)
                      at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._parseTemplate (<a href="http://localhost:9876/_karma_webpack_/vendor.js:60159:37" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:60159:37</a>)
                      at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileTemplate (<a href="http://localhost:9876/_karma_webpack_/vendor.js:60146:23" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:60146:23</a>)
                      at <a href="http://localhost:9876/_karma_webpack_/vendor.js:60089:62" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:60089:62</a>
                      at Set.forEach ()
                      at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileComponents (<a href="http://localhost:9876/_karma_webpack_/vendor.js:60089:19" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:60089:19</a>)
                      at <a href="http://localhost:9876/_karma_webpack_/vendor.js:60007:19" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:60007:19</a>
                      at Object.then (<a href="http://localhost:9876/_karma_webpack_/vendor.js:36409:77" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:36409:77</a>)
                      at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndAllComponents (<a href="http://localhost:9876/_karma_webpack_/vendor.js:60005:26" rel="nofollow noreferrer">http://localhost:9876/_karma_webpack_/vendor.js:60005:26</a>)</em>
              ```</p>