createDynamicFixture<T extends Object> function

Future<NgTestFixture<T>> createDynamicFixture<T extends Object>(
  1. NgTestBed<T> bed,
  2. Type type, {
  3. FutureOr<void> beforeComponentCreated(
    1. Injector
    )?,
  4. FutureOr<void> beforeChangeDetection(
    1. T
    )?,
})

An alternative method for NgTestBed.create that allows a dynamic type.

This is for compatibility reasons only and should not be used otherwise.

Implementation

Future<NgTestFixture<T>> createDynamicFixture<T extends Object>(
  NgTestBed<T> bed,
  Type type, {
  FutureOr<void> Function(Injector)? beforeComponentCreated,
  FutureOr<void> Function(T)? beforeChangeDetection,
}) {
  return bed._createDynamic(
    type,
    beforeComponentCreated: beforeComponentCreated,
    beforeChangeDetection: beforeChangeDetection,
  );
}