I am having trouble understanding the correct way to test my components that are inside the module. If ComponentA belongs to ModuleA, what is the correct way to configure testModule?
TestBed.configureTestingModule({imports:[ModuleA]})
gives me errors like Unexpected value of 'undefined' declared by ModuleA. I guess I get into some bad circular addictions by doing this.
TestBed.configureTestingModule({declarations: [ComponentA]})
gives me errors like Type ComponentA, is part of the declarations of two modules: DynamicTestModule and ModuleA!
Is one of these strategies right or is there a third way that I'm missing here?
source
share