Bei der Verwendung der folgenden Konfiguration für eine Testvorrichtung bekomme ich Beschwerden, dass das Tag nicht gefunden werden kann. die MockSelectionToolComponent
direkt in AppModule
Substituieren funktioniert gut, so noch etwas anderes sein muss ...eckig Testbed OverrideModule funktioniert nicht
// Add the imported module to the imports array in beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [MockSelectionToolComponent],
imports: [
AppModule
]
}).overrideModule(AppModule, {
remove: {
declarations: [SelectionToolComponent]
}
}).compileComponents();
fixture = TestBed.createComponent(MappingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
component.initialiseMap();
});
Error: Template parse errors: 'app-selection-tool' is not a known element: