(
type: Type<T>,
tagName: string | null,
renderer: TestComponentRenderer,
rootTypeBindings?: Binding[],
directives?: (Type<unknown> | DirectiveWithBindings<unknown>)[],
allowNonStandaloneDirectives?: boolean,
)
| 865 | } |
| 866 | |
| 867 | private createComponentRef<T>( |
| 868 | type: Type<T>, |
| 869 | tagName: string | null, |
| 870 | renderer: TestComponentRenderer, |
| 871 | rootTypeBindings?: Binding[], |
| 872 | directives?: (Type<unknown> | DirectiveWithBindings<unknown>)[], |
| 873 | allowNonStandaloneDirectives?: boolean, |
| 874 | ) { |
| 875 | const rootElId = `root${_nextRootElementId++}`; |
| 876 | renderer.insertRootElement(rootElId, tagName ?? undefined); |
| 877 | const factory = new ComponentFactory(getComponentDef(type)!); |
| 878 | |
| 879 | return factory.create( |
| 880 | Injector.NULL, |
| 881 | [], |
| 882 | `#${rootElId}`, |
| 883 | this.testModuleRef, |
| 884 | directives, |
| 885 | rootTypeBindings, |
| 886 | undefined, |
| 887 | allowNonStandaloneDirectives, |
| 888 | ) as ComponentRef<T>; |
| 889 | } |
| 890 | |
| 891 | private destroyActiveFixtures(): void { |
| 892 | let errorCount = 0; |
no test coverage detected