fork<E extends T> method
NgTestBed<E>
fork<E extends T>({
- Element? host,
- ComponentFactory<
E> ? component, - Iterable<
Object> ? providers, - 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,
Iterable<Object>? providers,
InjectorFactory? rootInjector,
NgTestStabilizerFactory? stabilizer,
}) {
return NgTestBed<E>._(
host: host ?? _host,
providers: providers ?? _providers,
stabilizer: stabilizer ?? _createStabilizer,
rootInjector: rootInjector ?? _rootInjector,
component: (component ?? _componentFactory) as ComponentFactory<E>?,
);
}