@@ -41,6 +41,7 @@ export async function render<SutType, WrapperType = SutType>(
4141 sut : Type < SutType > ,
4242 renderOptions : RenderComponentOptions < SutType > | RenderDirectiveOptions < WrapperType > = { } ,
4343) : Promise < RenderResult < SutType > > {
44+ const { dom : domConfig , ...globalConfig } = getConfig ( ) ;
4445 const {
4546 detectChanges : detectChangesOnRender = true ,
4647 declarations = [ ] ,
@@ -55,22 +56,24 @@ export async function render<SutType, WrapperType = SutType>(
5556 excludeComponentDeclaration = false ,
5657 routes,
5758 removeAngularAttributes = false ,
58- } = renderOptions as RenderDirectiveOptions < WrapperType > ;
59-
60- const config = getConfig ( ) ;
59+ defaultImports = [ ] ,
60+ } = { ...globalConfig , ...renderOptions } ;
6161
6262 dtlConfigure ( {
6363 eventWrapper : ( cb ) => {
6464 const result = cb ( ) ;
6565 detectChangesForMountedFixtures ( ) ;
6666 return result ;
6767 } ,
68- ...config . dom ,
68+ ...domConfig ,
6969 } ) ;
7070
7171 TestBed . configureTestingModule ( {
7272 declarations : addAutoDeclarations ( sut , { declarations, excludeComponentDeclaration, template, wrapper } ) ,
73- imports : addAutoImports ( { imports : imports . concat ( config . defaultImports ) , routes } ) ,
73+ imports : addAutoImports ( {
74+ imports : imports . concat ( defaultImports ) ,
75+ routes,
76+ } ) ,
7477 providers : [ ...providers ] ,
7578 schemas : [ ...schemas ] ,
7679 } ) ;
0 commit comments