May 2018
Intermediate to advanced
512 pages
11h 3m
English
Now that we have a lot of modules to deal with, it becomes tedious to configure the imports and providers for each spec file individually. For this purpose, I recommend creating a common testing module to contain generic configuration that you can reuse across the board.
First start by creating a new .ts file.
I have provided fake implementations of ObservableMedia, MatIconRegistry, DomSanitizer, along with arrays for commonTestingProviders and commonTestingModules.
src/app/common/common.testing.tsimport { HttpClientTestingModule } from '@angular/common/http/testing'import { MediaChange } from '@angular/flex-layout' ...Read now
Unlock full access