In a unit test to just create (instantiate) a component that has a DomSanitizer dependency, how does one mock / stub this dependency?
DomSanitizer
Because DomSanit
DomSanit
If you want to preserve the value, use:
{ provide: DomSanitizer, useValue: { sanitize: (ctx: any, val: string) => val, bypassSecurityTrustResourceUrl: (val: string) => val, }, }