I\'m currently implementing \'unit testing\' in my angular application. However, if I run them, I receive multiple warnings/errors similar to this one: \'Error retrieving
Just spent a couple hours on this. It looks like Angular now provides a FakeMatIconRegistry
. It squashed about 90% of the karma warnings, but still a few remain...
Had to do a lot of this:
TestBed.configureTestingModule({
declarations: [ MyComponent ],
imports: [
...
MatIconModule,
],
providers: [
...
{ provide: MatIconRegistry, useClass: FakeMatIconRegistry }
]
}).compileComponents();