addProviders method

NgTestBed<T> addProviders(
  1. Iterable<Object> providers
)

Returns a new instance of NgTestBed with providers added.

Implementation

NgTestBed<T> addProviders(Iterable<Object> providers) {
  if (_usesComponentFactory) {
    throw UnsupportedError('Use "addInjector" instead');
  }
  return fork(providers: [..._providers, ...providers]);
}