fork<E extends T> method
NgTestBed<E>
fork<E extends T>({
- Element? host,
- ComponentFactory<
E> ? component, - InjectorFactory? rootInjector,
- NgTestStabilizerFactory? stabilizer,
Creates a new instance of NgTestBed.
Any non-null value overrides the existing properties.
Implementation
NgTestBed<E> fork<E extends T>({
Element? host,
ComponentFactory<E>? component,
InjectorFactory? rootInjector,
NgTestStabilizerFactory? stabilizer,
}) {
return NgTestBed<E>._(
host: host ?? _host,
stabilizer: stabilizer ?? _createStabilizer,
rootInjector: rootInjector ?? _rootInjector,
component: component ?? _componentFactory as ComponentFactory<E>,
);
}