All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.fesm2022.testing.mjs.map Maven / Gradle / Ivy

There is a newer version: 18.2.5
Show newest version
{"version":3,"file":"testing.mjs","sources":["../../../../../../packages/core/testing/src/async.ts","../../../../../../packages/core/testing/src/defer.ts","../../../../../../packages/core/testing/src/test_bed_common.ts","../../../../../../packages/core/testing/src/component_fixture.ts","../../../../../../packages/core/testing/src/fake_async.ts","../../../../../../packages/core/testing/src/metadata_overrider.ts","../../../../../../packages/core/testing/src/resolvers.ts","../../../../../../packages/core/testing/src/test_bed_compiler.ts","../../../../../../packages/core/testing/src/test_bed.ts","../../../../../../packages/core/testing/src/test_hooks.ts","../../../../../../packages/core/testing/src/testing.ts","../../../../../../packages/core/testing/public_api.ts","../../../../../../packages/core/testing/index.ts","../../../../../../packages/core/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', waitForAsync(inject([AClass], (object) => {\n *   object.doSomething.then(() => {\n *     expect(...);\n *   })\n * })));\n * ```\n *\n * @publicApi\n */\nexport function waitForAsync(fn: Function): (done: any) => any {\n  const _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\n  if (!_Zone) {\n    return function () {\n      return Promise.reject(\n        'Zone is needed for the waitForAsync() test helper but could not be found. ' +\n          'Please make sure that your environment includes zone.js',\n      );\n    };\n  }\n  const asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n  if (typeof asyncTest === 'function') {\n    return asyncTest(fn);\n  }\n  return function () {\n    return Promise.reject(\n      'zone-testing.js is needed for the async() test helper but could not be found. ' +\n        'Please make sure that your environment includes zone.js/testing',\n    );\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n  ɵCONTAINER_HEADER_OFFSET as CONTAINER_HEADER_OFFSET,\n  ɵDeferBlockDetails as DeferBlockDetails,\n  ɵDeferBlockState as DeferBlockState,\n  ɵgetDeferBlocks as getDeferBlocks,\n  ɵrenderDeferBlockState as renderDeferBlockState,\n  ɵtriggerResourceLoading as triggerResourceLoading,\n} from '@angular/core';\n\nimport type {ComponentFixture} from './component_fixture';\n\n/**\n * Represents an individual defer block for testing purposes.\n *\n * @publicApi\n */\nexport class DeferBlockFixture {\n  /** @nodoc */\n  constructor(\n    private block: DeferBlockDetails,\n    private componentFixture: ComponentFixture,\n  ) {}\n\n  /**\n   * Renders the specified state of the defer fixture.\n   * @param state the defer state to render\n   */\n  async render(state: DeferBlockState): Promise {\n    if (!hasStateTemplate(state, this.block)) {\n      const stateAsString = getDeferBlockStateNameFromEnum(state);\n      throw new Error(\n        `Tried to render this defer block in the \\`${stateAsString}\\` state, ` +\n          `but there was no @${stateAsString.toLowerCase()} block defined in a template.`,\n      );\n    }\n    if (state === DeferBlockState.Complete) {\n      await triggerResourceLoading(this.block.tDetails, this.block.lView, this.block.tNode);\n    }\n    // If the `render` method is used explicitly - skip timer-based scheduling for\n    // `@placeholder` and `@loading` blocks and render them immediately.\n    const skipTimerScheduling = true;\n    renderDeferBlockState(state, this.block.tNode, this.block.lContainer, skipTimerScheduling);\n    this.componentFixture.detectChanges();\n  }\n\n  /**\n   * Retrieves all nested child defer block fixtures\n   * in a given defer block.\n   */\n  getDeferBlocks(): Promise {\n    const deferBlocks: DeferBlockDetails[] = [];\n    // An LContainer that represents a defer block has at most 1 view, which is\n    // located right after an LContainer header. Get a hold of that view and inspect\n    // it for nested defer blocks.\n    const deferBlockFixtures = [];\n    if (this.block.lContainer.length >= CONTAINER_HEADER_OFFSET) {\n      const lView = this.block.lContainer[CONTAINER_HEADER_OFFSET];\n      getDeferBlocks(lView, deferBlocks);\n      for (const block of deferBlocks) {\n        deferBlockFixtures.push(new DeferBlockFixture(block, this.componentFixture));\n      }\n    }\n    return Promise.resolve(deferBlockFixtures);\n  }\n}\n\nfunction hasStateTemplate(state: DeferBlockState, block: DeferBlockDetails) {\n  switch (state) {\n    case DeferBlockState.Placeholder:\n      return block.tDetails.placeholderTmplIndex !== null;\n    case DeferBlockState.Loading:\n      return block.tDetails.loadingTmplIndex !== null;\n    case DeferBlockState.Error:\n      return block.tDetails.errorTmplIndex !== null;\n    case DeferBlockState.Complete:\n      return true;\n    default:\n      return false;\n  }\n}\n\nfunction getDeferBlockStateNameFromEnum(state: DeferBlockState) {\n  switch (state) {\n    case DeferBlockState.Placeholder:\n      return 'Placeholder';\n    case DeferBlockState.Loading:\n      return 'Loading';\n    case DeferBlockState.Error:\n      return 'Error';\n    default:\n      return 'Main';\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n  InjectionToken,\n  SchemaMetadata,\n  ɵDeferBlockBehavior as DeferBlockBehavior,\n} from '@angular/core';\n\n/** Whether test modules should be torn down by default. */\nexport const TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT = true;\n\n/** Whether unknown elements in templates should throw by default. */\nexport const THROW_ON_UNKNOWN_ELEMENTS_DEFAULT = false;\n\n/** Whether unknown properties in templates should throw by default. */\nexport const THROW_ON_UNKNOWN_PROPERTIES_DEFAULT = false;\n\n/** Whether defer blocks should use manual triggering or play through normally. */\nexport const DEFER_BLOCK_DEFAULT_BEHAVIOR = DeferBlockBehavior.Playthrough;\n\n/**\n * An abstract class for inserting the root test component element in a platform independent way.\n *\n * @publicApi\n */\nexport class TestComponentRenderer {\n  insertRootElement(rootElementId: string) {}\n  removeAllRootElements?() {}\n}\n\n/**\n * @publicApi\n */\nexport const ComponentFixtureAutoDetect = new InjectionToken('ComponentFixtureAutoDetect');\n\n/**\n * @publicApi\n */\nexport const ComponentFixtureNoNgZone = new InjectionToken('ComponentFixtureNoNgZone');\n\n/**\n * @publicApi\n */\nexport interface TestModuleMetadata {\n  providers?: any[];\n  declarations?: any[];\n  imports?: any[];\n  schemas?: Array;\n  teardown?: ModuleTeardownOptions;\n  /**\n   * Whether NG0304 runtime errors should be thrown when unknown elements are present in component's\n   * template. Defaults to `false`, where the error is simply logged. If set to `true`, the error is\n   * thrown.\n   * @see [NG8001](/errors/NG8001) for the description of the problem and how to fix it\n   */\n  errorOnUnknownElements?: boolean;\n  /**\n   * Whether errors should be thrown when unknown properties are present in component's template.\n   * Defaults to `false`, where the error is simply logged.\n   * If set to `true`, the error is thrown.\n   * @see [NG8002](/errors/NG8002) for the description of the error and how to fix it\n   */\n  errorOnUnknownProperties?: boolean;\n\n  /**\n   * Whether defer blocks should behave with manual triggering or play through normally.\n   * Defaults to `manual`.\n   */\n  deferBlockBehavior?: DeferBlockBehavior;\n}\n\n/**\n * @publicApi\n */\nexport interface TestEnvironmentOptions {\n  /**\n   * Configures the test module teardown behavior in `TestBed`.\n   */\n  teardown?: ModuleTeardownOptions;\n  /**\n   * Whether errors should be thrown when unknown elements are present in component's template.\n   * Defaults to `false`, where the error is simply logged.\n   * If set to `true`, the error is thrown.\n   * @see [NG8001](/errors/NG8001) for the description of the error and how to fix it\n   */\n  errorOnUnknownElements?: boolean;\n  /**\n   * Whether errors should be thrown when unknown properties are present in component's template.\n   * Defaults to `false`, where the error is simply logged.\n   * If set to `true`, the error is thrown.\n   * @see [NG8002](/errors/NG8002) for the description of the error and how to fix it\n   */\n  errorOnUnknownProperties?: boolean;\n}\n\n/**\n * Configures the test module teardown behavior in `TestBed`.\n * @publicApi\n */\nexport interface ModuleTeardownOptions {\n  /** Whether the test module should be destroyed after every test. Defaults to `true`. */\n  destroyAfterEach: boolean;\n\n  /** Whether errors during test module destruction should be re-thrown. Defaults to `true`. */\n  rethrowErrors?: boolean;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n  ApplicationRef,\n  ChangeDetectorRef,\n  ComponentRef,\n  DebugElement,\n  ElementRef,\n  getDebugNode,\n  inject,\n  NgZone,\n  RendererFactory2,\n  ViewRef,\n  ɵDeferBlockDetails as DeferBlockDetails,\n  ɵdetectChangesInViewIfRequired,\n  ɵEffectScheduler as EffectScheduler,\n  ɵgetDeferBlocks as getDeferBlocks,\n  ɵNoopNgZone as NoopNgZone,\n  ɵPendingTasks as PendingTasks,\n} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\nimport {first} from 'rxjs/operators';\n\nimport {DeferBlockFixture} from './defer';\nimport {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone} from './test_bed_common';\n\n/**\n * Fixture for debugging and testing a component.\n *\n * @publicApi\n */\nexport abstract class ComponentFixture {\n  /**\n   * The DebugElement associated with the root element of this component.\n   */\n  debugElement: DebugElement;\n\n  /**\n   * The instance of the root component class.\n   */\n  componentInstance: T;\n\n  /**\n   * The native element at the root of the component.\n   */\n  nativeElement: any;\n\n  /**\n   * The ElementRef for the element at the root of the component.\n   */\n  elementRef: ElementRef;\n\n  /**\n   * The ChangeDetectorRef for the component\n   */\n  changeDetectorRef: ChangeDetectorRef;\n\n  private _renderer: RendererFactory2 | null | undefined;\n  private _isDestroyed: boolean = false;\n  /** @internal */\n  protected readonly _noZoneOptionIsSet = inject(ComponentFixtureNoNgZone, {optional: true});\n  /** @internal */\n  protected _ngZone: NgZone = this._noZoneOptionIsSet ? new NoopNgZone() : inject(NgZone);\n  /** @internal */\n  protected _effectRunner = inject(EffectScheduler);\n  // Inject ApplicationRef to ensure NgZone stableness causes after render hooks to run\n  // This will likely happen as a result of fixture.detectChanges because it calls ngZone.run\n  // This is a crazy way of doing things but hey, it's the world we live in.\n  // The zoneless scheduler should instead do this more imperatively by attaching\n  // the `ComponentRef` to `ApplicationRef` and calling `appRef.tick` as the `detectChanges`\n  // behavior.\n  /** @internal */\n  protected readonly _appRef = inject(ApplicationRef);\n  /** @internal */\n  protected readonly _testAppRef = this._appRef as unknown as TestAppRef;\n  private readonly pendingTasks = inject(PendingTasks);\n\n  // TODO(atscott): Remove this from public API\n  ngZone = this._noZoneOptionIsSet ? null : this._ngZone;\n\n  /** @nodoc */\n  constructor(public componentRef: ComponentRef) {\n    this.changeDetectorRef = componentRef.changeDetectorRef;\n    this.elementRef = componentRef.location;\n    this.debugElement = getDebugNode(this.elementRef.nativeElement);\n    this.componentInstance = componentRef.instance;\n    this.nativeElement = this.elementRef.nativeElement;\n    this.componentRef = componentRef;\n  }\n\n  /**\n   * Trigger a change detection cycle for the component.\n   */\n  abstract detectChanges(checkNoChanges?: boolean): void;\n\n  /**\n   * Do a change detection run to make sure there were no changes.\n   */\n  checkNoChanges(): void {\n    this.changeDetectorRef.checkNoChanges();\n  }\n\n  /**\n   * Set whether the fixture should autodetect changes.\n   *\n   * Also runs detectChanges once so that any existing change is detected.\n   */\n  abstract autoDetectChanges(autoDetect?: boolean): void;\n\n  /**\n   * Return whether the fixture is currently stable or has async tasks that have not been completed\n   * yet.\n   */\n  isStable(): boolean {\n    return !this.pendingTasks.hasPendingTasks.value;\n  }\n\n  /**\n   * Get a promise that resolves when the fixture is stable.\n   *\n   * This can be used to resume testing after events have triggered asynchronous activity or\n   * asynchronous change detection.\n   */\n  whenStable(): Promise {\n    if (this.isStable()) {\n      return Promise.resolve(false);\n    }\n    return this._appRef.isStable.pipe(first((stable) => stable)).toPromise();\n  }\n\n  /**\n   * Retrieves all defer block fixtures in the component fixture.\n   */\n  getDeferBlocks(): Promise {\n    const deferBlocks: DeferBlockDetails[] = [];\n    const lView = (this.componentRef.hostView as any)['_lView'];\n    getDeferBlocks(lView, deferBlocks);\n\n    const deferBlockFixtures = [];\n    for (const block of deferBlocks) {\n      deferBlockFixtures.push(new DeferBlockFixture(block, this));\n    }\n\n    return Promise.resolve(deferBlockFixtures);\n  }\n\n  private _getRenderer() {\n    if (this._renderer === undefined) {\n      this._renderer = this.componentRef.injector.get(RendererFactory2, null);\n    }\n    return this._renderer as RendererFactory2 | null;\n  }\n\n  /**\n   * Get a promise that resolves when the ui state is stable following animations.\n   */\n  whenRenderingDone(): Promise {\n    const renderer = this._getRenderer();\n    if (renderer && renderer.whenRenderingDone) {\n      return renderer.whenRenderingDone();\n    }\n    return this.whenStable();\n  }\n\n  /**\n   * Trigger component destruction.\n   */\n  destroy(): void {\n    if (!this._isDestroyed) {\n      this.componentRef.destroy();\n      this._isDestroyed = true;\n    }\n  }\n}\n\n/**\n * ComponentFixture behavior that actually attaches the component to the application to ensure\n * behaviors between fixture and application do not diverge. `detectChanges` is disabled by default\n * (instead, tests should wait for the scheduler to detect changes), `whenStable` is directly the\n * `ApplicationRef.isStable`, and `autoDetectChanges` cannot be disabled.\n */\nexport class ScheduledComponentFixture extends ComponentFixture {\n  private _autoDetect = inject(ComponentFixtureAutoDetect, {optional: true}) ?? true;\n\n  initialize(): void {\n    if (this._autoDetect) {\n      this._appRef.attachView(this.componentRef.hostView);\n    }\n  }\n\n  override detectChanges(checkNoChanges = true): void {\n    if (!checkNoChanges) {\n      throw new Error(\n        'Cannot disable `checkNoChanges` in this configuration. ' +\n          'Use `fixture.componentRef.hostView.changeDetectorRef.detectChanges()` instead.',\n      );\n    }\n    this._effectRunner.flush();\n    this._appRef.tick();\n    this._effectRunner.flush();\n  }\n\n  override autoDetectChanges(autoDetect = true): void {\n    if (!autoDetect) {\n      throw new Error(\n        'Cannot disable autoDetect after it has been enabled when using the zoneless scheduler. ' +\n          'To disable autoDetect, add `{provide: ComponentFixtureAutoDetect, useValue: false}` to the TestBed providers.',\n      );\n    } else if (!this._autoDetect) {\n      this._autoDetect = autoDetect;\n      this._appRef.attachView(this.componentRef.hostView);\n    }\n    this.detectChanges();\n  }\n}\n\ninterface TestAppRef {\n  externalTestViews: Set;\n  beforeRender: Subject;\n  afterTick: Subject;\n}\n\n/**\n * ComponentFixture behavior that attempts to act as a \"mini application\".\n */\nexport class PseudoApplicationComponentFixture extends ComponentFixture {\n  private _subscriptions = new Subscription();\n  private _autoDetect = inject(ComponentFixtureAutoDetect, {optional: true}) ?? false;\n  private afterTickSubscription: Subscription | undefined = undefined;\n  private beforeRenderSubscription: Subscription | undefined = undefined;\n\n  initialize(): void {\n    if (this._autoDetect) {\n      this.subscribeToAppRefEvents();\n    }\n    this.componentRef.hostView.onDestroy(() => {\n      this.unsubscribeFromAppRefEvents();\n    });\n    // Create subscriptions outside the NgZone so that the callbacks run outside\n    // of NgZone.\n    this._ngZone.runOutsideAngular(() => {\n      this._subscriptions.add(\n        this._ngZone.onError.subscribe({\n          next: (error: any) => {\n            throw error;\n          },\n        }),\n      );\n    });\n  }\n\n  override detectChanges(checkNoChanges = true): void {\n    this._effectRunner.flush();\n    // Run the change detection inside the NgZone so that any async tasks as part of the change\n    // detection are captured by the zone and can be waited for in isStable.\n    this._ngZone.run(() => {\n      this.changeDetectorRef.detectChanges();\n      if (checkNoChanges) {\n        this.checkNoChanges();\n      }\n    });\n    // Run any effects that were created/dirtied during change detection. Such effects might become\n    // dirty in response to input signals changing.\n    this._effectRunner.flush();\n  }\n\n  override autoDetectChanges(autoDetect = true): void {\n    if (this._noZoneOptionIsSet) {\n      throw new Error('Cannot call autoDetectChanges when ComponentFixtureNoNgZone is set.');\n    }\n\n    if (autoDetect !== this._autoDetect) {\n      if (autoDetect) {\n        this.subscribeToAppRefEvents();\n      } else {\n        this.unsubscribeFromAppRefEvents();\n      }\n    }\n\n    this._autoDetect = autoDetect;\n    this.detectChanges();\n  }\n\n  private subscribeToAppRefEvents() {\n    this._ngZone.runOutsideAngular(() => {\n      this.afterTickSubscription = this._testAppRef.afterTick.subscribe(() => {\n        this.checkNoChanges();\n      });\n      this.beforeRenderSubscription = this._testAppRef.beforeRender.subscribe((isFirstPass) => {\n        try {\n          ɵdetectChangesInViewIfRequired(\n            (this.componentRef.hostView as any)._lView,\n            (this.componentRef.hostView as any).notifyErrorHandler,\n            isFirstPass,\n            false /** zoneless enabled */,\n          );\n        } catch (e: unknown) {\n          // If an error occurred during change detection, remove the test view from the application\n          // ref tracking. Note that this isn't exactly desirable but done this way because of how\n          // things used to work with `autoDetect` and uncaught errors. Ideally we would surface\n          // this error to the error handler instead and continue refreshing the view like\n          // what would happen in the application.\n          this.unsubscribeFromAppRefEvents();\n\n          throw e;\n        }\n      });\n      this._testAppRef.externalTestViews.add(this.componentRef.hostView);\n    });\n  }\n\n  private unsubscribeFromAppRefEvents() {\n    this.afterTickSubscription?.unsubscribe();\n    this.beforeRenderSubscription?.unsubscribe();\n    this.afterTickSubscription = undefined;\n    this.beforeRenderSubscription = undefined;\n    this._testAppRef.externalTestViews.delete(this.componentRef.hostView);\n  }\n\n  override destroy(): void {\n    this.unsubscribeFromAppRefEvents();\n    this._subscriptions.unsubscribe();\n    super.destroy();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];\n\nconst fakeAsyncTestModuleNotLoadedErrorMessage = `zone-testing.js is needed for the fakeAsync() test helper but could not be found.\n        Please make sure that your environment includes zone.js/testing`;\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @publicApi\n */\nexport function resetFakeAsyncZone(): void {\n  if (fakeAsyncTestModule) {\n    return fakeAsyncTestModule.resetFakeAsyncZone();\n  }\n  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\nexport function resetFakeAsyncZoneIfExists(): void {\n  if (fakeAsyncTestModule) {\n    fakeAsyncTestModule.resetFakeAsyncZone();\n  }\n}\n\n/**\n * Wraps a function to be executed in the `fakeAsync` zone:\n * - Microtasks are manually executed by calling `flushMicrotasks()`.\n * - Timers are synchronous; `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception is thrown.\n *\n * Can be used to wrap `inject()` calls.\n *\n * @param fn The function that you want to wrap in the `fakeAsync` zone.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n *\n * @returns The function wrapped to be executed in the `fakeAsync` zone.\n * Any arguments passed when calling this returned function will be passed through to the `fn`\n * function in the parameters when it is called.\n *\n * @publicApi\n */\nexport function fakeAsync(fn: Function): (...args: any[]) => any {\n  if (fakeAsyncTestModule) {\n    return fakeAsyncTestModule.fakeAsync(fn);\n  }\n  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the `fakeAsync` zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @param millis The number of milliseconds to advance the virtual timer.\n * @param tickOptions The options to pass to the `tick()` function.\n *\n * @usageNotes\n *\n * The `tick()` option is a flag called `processNewMacroTasksSynchronously`,\n * which determines whether or not to invoke new macroTasks.\n *\n * If you provide a `tickOptions` object, but do not specify a\n * `processNewMacroTasksSynchronously` property (`tick(100, {})`),\n * then `processNewMacroTasksSynchronously` defaults to true.\n *\n * If you omit the `tickOptions` parameter (`tick(100))`), then\n * `tickOptions` defaults to `{processNewMacroTasksSynchronously: true}`.\n *\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * The following example includes a nested timeout (new macroTask), and\n * the `tickOptions` parameter is allowed to default. In this case,\n * `processNewMacroTasksSynchronously` defaults to true, and the nested\n * function is executed on each tick.\n *\n * ```\n * it ('test with nested setTimeout', fakeAsync(() => {\n *   let nestedTimeoutInvoked = false;\n *   function funcWithNestedTimeout() {\n *     setTimeout(() => {\n *       nestedTimeoutInvoked = true;\n *     });\n *   };\n *   setTimeout(funcWithNestedTimeout);\n *   tick();\n *   expect(nestedTimeoutInvoked).toBe(true);\n * }));\n * ```\n *\n * In the following case, `processNewMacroTasksSynchronously` is explicitly\n * set to false, so the nested timeout function is not invoked.\n *\n * ```\n * it ('test with nested setTimeout', fakeAsync(() => {\n *   let nestedTimeoutInvoked = false;\n *   function funcWithNestedTimeout() {\n *     setTimeout(() => {\n *       nestedTimeoutInvoked = true;\n *     });\n *   };\n *   setTimeout(funcWithNestedTimeout);\n *   tick(0, {processNewMacroTasksSynchronously: false});\n *   expect(nestedTimeoutInvoked).toBe(false);\n * }));\n * ```\n *\n *\n * @publicApi\n */\nexport function tick(\n  millis: number = 0,\n  tickOptions: {processNewMacroTasksSynchronously: boolean} = {\n    processNewMacroTasksSynchronously: true,\n  },\n): void {\n  if (fakeAsyncTestModule) {\n    return fakeAsyncTestModule.tick(millis, tickOptions);\n  }\n  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Flushes any pending microtasks and simulates the asynchronous passage of time for the timers in\n * the `fakeAsync` zone by\n * draining the macrotask queue until it is empty.\n *\n * @param maxTurns The maximum number of times the scheduler attempts to clear its queue before\n *     throwing an error.\n * @returns The simulated time elapsed, in milliseconds.\n *\n * @publicApi\n */\nexport function flush(maxTurns?: number): number {\n  if (fakeAsyncTestModule) {\n    return fakeAsyncTestModule.flush(maxTurns);\n  }\n  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\nexport function discardPeriodicTasks(): void {\n  if (fakeAsyncTestModule) {\n    return fakeAsyncTestModule.discardPeriodicTasks();\n  }\n  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\nexport function flushMicrotasks(): void {\n  if (fakeAsyncTestModule) {\n    return fakeAsyncTestModule.flushMicrotasks();\n  }\n  throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵstringify as stringify} from '@angular/core';\n\nimport {MetadataOverride} from './metadata_override';\n\ntype StringMap = {\n  [key: string]: any;\n};\n\nlet _nextReferenceId = 0;\n\nexport class MetadataOverrider {\n  private _references = new Map();\n  /**\n   * Creates a new instance for the given metadata class\n   * based on an old instance and overrides.\n   */\n  overrideMetadata(\n    metadataClass: {new (options: T): C},\n    oldMetadata: C,\n    override: MetadataOverride,\n  ): C {\n    const props: StringMap = {};\n    if (oldMetadata) {\n      _valueProps(oldMetadata).forEach((prop) => (props[prop] = (oldMetadata)[prop]));\n    }\n\n    if (override.set) {\n      if (override.remove || override.add) {\n        throw new Error(`Cannot set and add/remove ${stringify(metadataClass)} at the same time!`);\n      }\n      setMetadata(props, override.set);\n    }\n    if (override.remove) {\n      removeMetadata(props, override.remove, this._references);\n    }\n    if (override.add) {\n      addMetadata(props, override.add);\n    }\n    return new metadataClass(props);\n  }\n}\n\nfunction removeMetadata(metadata: StringMap, remove: any, references: Map) {\n  const removeObjects = new Set();\n  for (const prop in remove) {\n    const removeValue = remove[prop];\n    if (Array.isArray(removeValue)) {\n      removeValue.forEach((value: any) => {\n        removeObjects.add(_propHashKey(prop, value, references));\n      });\n    } else {\n      removeObjects.add(_propHashKey(prop, removeValue, references));\n    }\n  }\n\n  for (const prop in metadata) {\n    const propValue = metadata[prop];\n    if (Array.isArray(propValue)) {\n      metadata[prop] = propValue.filter(\n        (value: any) => !removeObjects.has(_propHashKey(prop, value, references)),\n      );\n    } else {\n      if (removeObjects.has(_propHashKey(prop, propValue, references))) {\n        metadata[prop] = undefined;\n      }\n    }\n  }\n}\n\nfunction addMetadata(metadata: StringMap, add: any) {\n  for (const prop in add) {\n    const addValue = add[prop];\n    const propValue = metadata[prop];\n    if (propValue != null && Array.isArray(propValue)) {\n      metadata[prop] = propValue.concat(addValue);\n    } else {\n      metadata[prop] = addValue;\n    }\n  }\n}\n\nfunction setMetadata(metadata: StringMap, set: any) {\n  for (const prop in set) {\n    metadata[prop] = set[prop];\n  }\n}\n\nfunction _propHashKey(propName: any, propValue: any, references: Map): string {\n  let nextObjectId = 0;\n  const objectIds = new Map();\n  const replacer = (key: any, value: any) => {\n    if (value !== null && typeof value === 'object') {\n      if (objectIds.has(value)) {\n        return objectIds.get(value);\n      }\n      // Record an id for this object such that any later references use the object's id instead\n      // of the object itself, in order to break cyclic pointers in objects.\n      objectIds.set(value, `ɵobj#${nextObjectId++}`);\n\n      // The first time an object is seen the object itself is serialized.\n      return value;\n    } else if (typeof value === 'function') {\n      value = _serializeReference(value, references);\n    }\n    return value;\n  };\n\n  return `${propName}:${JSON.stringify(propValue, replacer)}`;\n}\n\nfunction _serializeReference(ref: any, references: Map): string {\n  let id = references.get(ref);\n  if (!id) {\n    id = `${stringify(ref)}${_nextReferenceId++}`;\n    references.set(ref, id);\n  }\n  return id;\n}\n\nfunction _valueProps(obj: any): string[] {\n  const props: string[] = [];\n  // regular public props\n  Object.keys(obj).forEach((prop) => {\n    if (!prop.startsWith('_')) {\n      props.push(prop);\n    }\n  });\n\n  // getters\n  let proto = obj;\n  while ((proto = Object.getPrototypeOf(proto))) {\n    Object.keys(proto).forEach((protoProp) => {\n      const desc = Object.getOwnPropertyDescriptor(proto, protoProp);\n      if (!protoProp.startsWith('_') && desc && 'get' in desc) {\n        props.push(protoProp);\n      }\n    });\n  }\n  return props;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n  Component,\n  Directive,\n  NgModule,\n  Pipe,\n  Type,\n  ɵReflectionCapabilities as ReflectionCapabilities,\n} from '@angular/core';\n\nimport {MetadataOverride} from './metadata_override';\nimport {MetadataOverrider} from './metadata_overrider';\n\nconst reflection = new ReflectionCapabilities();\n\n/**\n * Base interface to resolve `@Component`, `@Directive`, `@Pipe` and `@NgModule`.\n */\nexport interface Resolver {\n  addOverride(type: Type, override: MetadataOverride): void;\n  setOverrides(overrides: Array<[Type, MetadataOverride]>): void;\n  resolve(type: Type): T | null;\n}\n\n/**\n * Allows to override ivy metadata for tests (via the `TestBed`).\n */\nabstract class OverrideResolver implements Resolver {\n  private overrides = new Map, MetadataOverride[]>();\n  private resolved = new Map, T | null>();\n\n  abstract get type(): any;\n\n  addOverride(type: Type, override: MetadataOverride) {\n    const overrides = this.overrides.get(type) || [];\n    overrides.push(override);\n    this.overrides.set(type, overrides);\n    this.resolved.delete(type);\n  }\n\n  setOverrides(overrides: Array<[Type, MetadataOverride]>) {\n    this.overrides.clear();\n    overrides.forEach(([type, override]) => {\n      this.addOverride(type, override);\n    });\n  }\n\n  getAnnotation(type: Type): T | null {\n    const annotations = reflection.annotations(type);\n    // Try to find the nearest known Type annotation and make sure that this annotation is an\n    // instance of the type we are looking for, so we can use it for resolution. Note: there might\n    // be multiple known annotations found due to the fact that Components can extend Directives (so\n    // both Directive and Component annotations would be present), so we always check if the known\n    // annotation has the right type.\n    for (let i = annotations.length - 1; i >= 0; i--) {\n      const annotation = annotations[i];\n      const isKnownType =\n        annotation instanceof Directive ||\n        annotation instanceof Component ||\n        annotation instanceof Pipe ||\n        annotation instanceof NgModule;\n      if (isKnownType) {\n        return annotation instanceof this.type ? (annotation as unknown as T) : null;\n      }\n    }\n    return null;\n  }\n\n  resolve(type: Type): T | null {\n    let resolved: T | null = this.resolved.get(type) || null;\n\n    if (!resolved) {\n      resolved = this.getAnnotation(type);\n      if (resolved) {\n        const overrides = this.overrides.get(type);\n        if (overrides) {\n          const overrider = new MetadataOverrider();\n          overrides.forEach((override) => {\n            resolved = overrider.overrideMetadata(this.type, resolved!, override);\n          });\n        }\n      }\n      this.resolved.set(type, resolved);\n    }\n\n    return resolved;\n  }\n}\n\nexport class DirectiveResolver extends OverrideResolver {\n  override get type() {\n    return Directive;\n  }\n}\n\nexport class ComponentResolver extends OverrideResolver {\n  override get type() {\n    return Component;\n  }\n}\n\nexport class PipeResolver extends OverrideResolver {\n  override get type() {\n    return Pipe;\n  }\n}\n\nexport class NgModuleResolver extends OverrideResolver {\n  override get type() {\n    return NgModule;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ResourceLoader} from '@angular/compiler';\nimport {\n  ApplicationInitStatus,\n  ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n  ɵChangeDetectionSchedulerImpl as ChangeDetectionSchedulerImpl,\n  Compiler,\n  COMPILER_OPTIONS,\n  Component,\n  Directive,\n  Injector,\n  InjectorType,\n  LOCALE_ID,\n  ModuleWithComponentFactories,\n  ModuleWithProviders,\n  NgModule,\n  NgModuleFactory,\n  Pipe,\n  PlatformRef,\n  Provider,\n  resolveForwardRef,\n  StaticProvider,\n  Type,\n  ɵclearResolutionOfComponentResourcesQueue,\n  ɵcompileComponent as compileComponent,\n  ɵcompileDirective as compileDirective,\n  ɵcompileNgModuleDefs as compileNgModuleDefs,\n  ɵcompilePipe as compilePipe,\n  ɵDEFAULT_LOCALE_ID as DEFAULT_LOCALE_ID,\n  ɵDEFER_BLOCK_CONFIG as DEFER_BLOCK_CONFIG,\n  ɵDeferBlockBehavior as DeferBlockBehavior,\n  ɵdepsTracker as depsTracker,\n  ɵDirectiveDef as DirectiveDef,\n  ɵgenerateStandaloneInDeclarationsError,\n  ɵgetAsyncClassMetadataFn as getAsyncClassMetadataFn,\n  ɵgetInjectableDef as getInjectableDef,\n  ɵInternalEnvironmentProviders as InternalEnvironmentProviders,\n  ɵinternalProvideZoneChangeDetection as internalProvideZoneChangeDetection,\n  ɵisComponentDefPendingResolution,\n  ɵisEnvironmentProviders as isEnvironmentProviders,\n  ɵNG_COMP_DEF as NG_COMP_DEF,\n  ɵNG_DIR_DEF as NG_DIR_DEF,\n  ɵNG_INJ_DEF as NG_INJ_DEF,\n  ɵNG_MOD_DEF as NG_MOD_DEF,\n  ɵNG_PIPE_DEF as NG_PIPE_DEF,\n  ɵNgModuleFactory as R3NgModuleFactory,\n  ɵNgModuleTransitiveScopes as NgModuleTransitiveScopes,\n  ɵNgModuleType as NgModuleType,\n  ɵpatchComponentDefWithScope as patchComponentDefWithScope,\n  ɵRender3ComponentFactory as ComponentFactory,\n  ɵRender3NgModuleRef as NgModuleRef,\n  ɵresolveComponentResources,\n  ɵrestoreComponentResolutionQueue,\n  ɵsetLocaleId as setLocaleId,\n  ɵtransitiveScopesFor as transitiveScopesFor,\n  ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT as USE_RUNTIME_DEPS_TRACKER_FOR_JIT,\n  ɵɵInjectableDeclaration as InjectableDeclaration,\n} from '@angular/core';\n\nimport {ComponentDef, ComponentType} from '../../src/render3';\n\nimport {MetadataOverride} from './metadata_override';\nimport {\n  ComponentResolver,\n  DirectiveResolver,\n  NgModuleResolver,\n  PipeResolver,\n  Resolver,\n} from './resolvers';\nimport {DEFER_BLOCK_DEFAULT_BEHAVIOR, TestModuleMetadata} from './test_bed_common';\n\nenum TestingModuleOverride {\n  DECLARATION,\n  OVERRIDE_TEMPLATE,\n}\n\nfunction isTestingModuleOverride(value: unknown): value is TestingModuleOverride {\n  return (\n    value === TestingModuleOverride.DECLARATION || value === TestingModuleOverride.OVERRIDE_TEMPLATE\n  );\n}\n\nfunction assertNoStandaloneComponents(\n  types: Type[],\n  resolver: Resolver,\n  location: string,\n) {\n  types.forEach((type) => {\n    if (!getAsyncClassMetadataFn(type)) {\n      const component = resolver.resolve(type);\n      if (component && component.standalone) {\n        throw new Error(ɵgenerateStandaloneInDeclarationsError(type, location));\n      }\n    }\n  });\n}\n\n// Resolvers for Angular decorators\ntype Resolvers = {\n  module: Resolver;\n  component: Resolver;\n  directive: Resolver;\n  pipe: Resolver;\n};\n\ninterface CleanupOperation {\n  fieldName: string;\n  object: any;\n  originalValue: unknown;\n}\n\nexport class TestBedCompiler {\n  private originalComponentResolutionQueue: Map, Component> | null = null;\n\n  // Testing module configuration\n  private declarations: Type[] = [];\n  private imports: Type[] = [];\n  private providers: Provider[] = [];\n  private schemas: any[] = [];\n\n  // Queues of components/directives/pipes that should be recompiled.\n  private pendingComponents = new Set>();\n  private pendingDirectives = new Set>();\n  private pendingPipes = new Set>();\n\n  // Set of components with async metadata, i.e. components with `@defer` blocks\n  // in their templates.\n  private componentsWithAsyncMetadata = new Set>();\n\n  // Keep track of all components and directives, so we can patch Providers onto defs later.\n  private seenComponents = new Set>();\n  private seenDirectives = new Set>();\n\n  // Keep track of overridden modules, so that we can collect all affected ones in the module tree.\n  private overriddenModules = new Set>();\n\n  // Store resolved styles for Components that have template overrides present and `styleUrls`\n  // defined at the same time.\n  private existingComponentStyles = new Map, string[]>();\n\n  private resolvers: Resolvers = initResolvers();\n\n  // Map of component type to an NgModule that declares it.\n  //\n  // There are a couple special cases:\n  // - for standalone components, the module scope value is `null`\n  // - when a component is declared in `TestBed.configureTestingModule()` call or\n  //   a component's template is overridden via `TestBed.overrideTemplateUsingTestingModule()`.\n  //   we use a special value from the `TestingModuleOverride` enum.\n  private componentToModuleScope = new Map, Type | TestingModuleOverride | null>();\n\n  // Map that keeps initial version of component/directive/pipe defs in case\n  // we compile a Type again, thus overriding respective static fields. This is\n  // required to make sure we restore defs to their initial states between test runs.\n  // Note: one class may have multiple defs (for example: ɵmod and ɵinj in case of an\n  // NgModule), store all of them in a map.\n  private initialNgDefs = new Map, Map>();\n\n  // Array that keeps cleanup operations for initial versions of component/directive/pipe/module\n  // defs in case TestBed makes changes to the originals.\n  private defCleanupOps: CleanupOperation[] = [];\n\n  private _injector: Injector | null = null;\n  private compilerProviders: Provider[] | null = null;\n\n  private providerOverrides: Provider[] = [];\n  private rootProviderOverrides: Provider[] = [];\n  // Overrides for injectables with `{providedIn: SomeModule}` need to be tracked and added to that\n  // module's provider list.\n  private providerOverridesByModule = new Map, Provider[]>();\n  private providerOverridesByToken = new Map();\n  private scopesWithOverriddenProviders = new Set>();\n\n  private testModuleType: NgModuleType;\n  private testModuleRef: NgModuleRef | null = null;\n\n  private deferBlockBehavior = DEFER_BLOCK_DEFAULT_BEHAVIOR;\n\n  constructor(\n    private platform: PlatformRef,\n    private additionalModuleTypes: Type | Type[],\n  ) {\n    class DynamicTestModule {}\n    this.testModuleType = DynamicTestModule as any;\n  }\n\n  setCompilerProviders(providers: Provider[] | null): void {\n    this.compilerProviders = providers;\n    this._injector = null;\n  }\n\n  configureTestingModule(moduleDef: TestModuleMetadata): void {\n    // Enqueue any compilation tasks for the directly declared component.\n    if (moduleDef.declarations !== undefined) {\n      // Verify that there are no standalone components\n      assertNoStandaloneComponents(\n        moduleDef.declarations,\n        this.resolvers.component,\n        '\"TestBed.configureTestingModule\" call',\n      );\n      this.queueTypeArray(moduleDef.declarations, TestingModuleOverride.DECLARATION);\n      this.declarations.push(...moduleDef.declarations);\n    }\n\n    // Enqueue any compilation tasks for imported modules.\n    if (moduleDef.imports !== undefined) {\n      this.queueTypesFromModulesArray(moduleDef.imports);\n      this.imports.push(...moduleDef.imports);\n    }\n\n    if (moduleDef.providers !== undefined) {\n      this.providers.push(...moduleDef.providers);\n    }\n\n    if (moduleDef.schemas !== undefined) {\n      this.schemas.push(...moduleDef.schemas);\n    }\n\n    this.deferBlockBehavior = moduleDef.deferBlockBehavior ?? DEFER_BLOCK_DEFAULT_BEHAVIOR;\n  }\n\n  overrideModule(ngModule: Type, override: MetadataOverride): void {\n    if (USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n      depsTracker.clearScopeCacheFor(ngModule);\n    }\n    this.overriddenModules.add(ngModule as NgModuleType);\n\n    // Compile the module right away.\n    this.resolvers.module.addOverride(ngModule, override);\n    const metadata = this.resolvers.module.resolve(ngModule);\n    if (metadata === null) {\n      throw invalidTypeError(ngModule.name, 'NgModule');\n    }\n\n    this.recompileNgModule(ngModule, metadata);\n\n    // At this point, the module has a valid module def (ɵmod), but the override may have introduced\n    // new declarations or imported modules. Ingest any possible new types and add them to the\n    // current queue.\n    this.queueTypesFromModulesArray([ngModule]);\n  }\n\n  overrideComponent(component: Type, override: MetadataOverride): void {\n    this.verifyNoStandaloneFlagOverrides(component, override);\n    this.resolvers.component.addOverride(component, override);\n    this.pendingComponents.add(component);\n\n    // If this is a component with async metadata (i.e. a component with a `@defer` block\n    // in a template) - store it for future processing.\n    this.maybeRegisterComponentWithAsyncMetadata(component);\n  }\n\n  overrideDirective(directive: Type, override: MetadataOverride): void {\n    this.verifyNoStandaloneFlagOverrides(directive, override);\n    this.resolvers.directive.addOverride(directive, override);\n    this.pendingDirectives.add(directive);\n  }\n\n  overridePipe(pipe: Type, override: MetadataOverride): void {\n    this.verifyNoStandaloneFlagOverrides(pipe, override);\n    this.resolvers.pipe.addOverride(pipe, override);\n    this.pendingPipes.add(pipe);\n  }\n\n  private verifyNoStandaloneFlagOverrides(\n    type: Type,\n    override: MetadataOverride,\n  ) {\n    if (\n      override.add?.hasOwnProperty('standalone') ||\n      override.set?.hasOwnProperty('standalone') ||\n      override.remove?.hasOwnProperty('standalone')\n    ) {\n      throw new Error(\n        `An override for the ${type.name} class has the \\`standalone\\` flag. ` +\n          `Changing the \\`standalone\\` flag via TestBed overrides is not supported.`,\n      );\n    }\n  }\n\n  overrideProvider(\n    token: any,\n    provider: {useFactory?: Function; useValue?: any; deps?: any[]; multi?: boolean},\n  ): void {\n    let providerDef: Provider;\n    if (provider.useFactory !== undefined) {\n      providerDef = {\n        provide: token,\n        useFactory: provider.useFactory,\n        deps: provider.deps || [],\n        multi: provider.multi,\n      };\n    } else if (provider.useValue !== undefined) {\n      providerDef = {provide: token, useValue: provider.useValue, multi: provider.multi};\n    } else {\n      providerDef = {provide: token};\n    }\n\n    const injectableDef: InjectableDeclaration | null =\n      typeof token !== 'string' ? getInjectableDef(token) : null;\n    const providedIn = injectableDef === null ? null : resolveForwardRef(injectableDef.providedIn);\n    const overridesBucket =\n      providedIn === 'root' ? this.rootProviderOverrides : this.providerOverrides;\n    overridesBucket.push(providerDef);\n\n    // Keep overrides grouped by token as well for fast lookups using token\n    this.providerOverridesByToken.set(token, providerDef);\n    if (injectableDef !== null && providedIn !== null && typeof providedIn !== 'string') {\n      const existingOverrides = this.providerOverridesByModule.get(providedIn);\n      if (existingOverrides !== undefined) {\n        existingOverrides.push(providerDef);\n      } else {\n        this.providerOverridesByModule.set(providedIn, [providerDef]);\n      }\n    }\n  }\n\n  overrideTemplateUsingTestingModule(type: Type, template: string): void {\n    const def = (type as any)[NG_COMP_DEF];\n    const hasStyleUrls = (): boolean => {\n      const metadata = this.resolvers.component.resolve(type)! as Component;\n      return !!metadata.styleUrl || !!metadata.styleUrls?.length;\n    };\n    const overrideStyleUrls = !!def && !ɵisComponentDefPendingResolution(type) && hasStyleUrls();\n\n    // In Ivy, compiling a component does not require knowing the module providing the\n    // component's scope, so overrideTemplateUsingTestingModule can be implemented purely via\n    // overrideComponent. Important: overriding template requires full Component re-compilation,\n    // which may fail in case styleUrls are also present (thus Component is considered as required\n    // resolution). In order to avoid this, we preemptively set styleUrls to an empty array,\n    // preserve current styles available on Component def and restore styles back once compilation\n    // is complete.\n    const override = overrideStyleUrls\n      ? {template, styles: [], styleUrls: [], styleUrl: undefined}\n      : {template};\n    this.overrideComponent(type, {set: override});\n\n    if (overrideStyleUrls && def.styles && def.styles.length > 0) {\n      this.existingComponentStyles.set(type, def.styles);\n    }\n\n    // Set the component's scope to be the testing module.\n    this.componentToModuleScope.set(type, TestingModuleOverride.OVERRIDE_TEMPLATE);\n  }\n\n  private async resolvePendingComponentsWithAsyncMetadata() {\n    if (this.componentsWithAsyncMetadata.size === 0) return;\n\n    const promises = [];\n    for (const component of this.componentsWithAsyncMetadata) {\n      const asyncMetadataFn = getAsyncClassMetadataFn(component);\n      if (asyncMetadataFn) {\n        promises.push(asyncMetadataFn());\n      }\n    }\n    this.componentsWithAsyncMetadata.clear();\n\n    const resolvedDeps = await Promise.all(promises);\n    const flatResolvedDeps = resolvedDeps.flat(2);\n    this.queueTypesFromModulesArray(flatResolvedDeps);\n\n    // Loaded standalone components might contain imports of NgModules\n    // with providers, make sure we override providers there too.\n    for (const component of flatResolvedDeps) {\n      this.applyProviderOverridesInScope(component);\n    }\n  }\n\n  async compileComponents(): Promise {\n    this.clearComponentResolutionQueue();\n\n    // Wait for all async metadata for components that were\n    // overridden, we need resolved metadata to perform an override\n    // and re-compile a component.\n    await this.resolvePendingComponentsWithAsyncMetadata();\n\n    // Verify that there were no standalone components present in the `declarations` field\n    // during the `TestBed.configureTestingModule` call. We perform this check here in addition\n    // to the logic in the `configureTestingModule` function, since at this point we have\n    // all async metadata resolved.\n    assertNoStandaloneComponents(\n      this.declarations,\n      this.resolvers.component,\n      '\"TestBed.configureTestingModule\" call',\n    );\n\n    // Run compilers for all queued types.\n    let needsAsyncResources = this.compileTypesSync();\n\n    // compileComponents() should not be async unless it needs to be.\n    if (needsAsyncResources) {\n      let resourceLoader: ResourceLoader;\n      let resolver = (url: string): Promise => {\n        if (!resourceLoader) {\n          resourceLoader = this.injector.get(ResourceLoader);\n        }\n        return Promise.resolve(resourceLoader.get(url));\n      };\n      await ɵresolveComponentResources(resolver);\n    }\n  }\n\n  finalize(): NgModuleRef {\n    // One last compile\n    this.compileTypesSync();\n\n    // Create the testing module itself.\n    this.compileTestModule();\n\n    this.applyTransitiveScopes();\n\n    this.applyProviderOverrides();\n\n    // Patch previously stored `styles` Component values (taken from ɵcmp), in case these\n    // Components have `styleUrls` fields defined and template override was requested.\n    this.patchComponentsWithExistingStyles();\n\n    // Clear the componentToModuleScope map, so that future compilations don't reset the scope of\n    // every component.\n    this.componentToModuleScope.clear();\n\n    const parentInjector = this.platform.injector;\n    this.testModuleRef = new NgModuleRef(this.testModuleType, parentInjector, []);\n\n    // ApplicationInitStatus.runInitializers() is marked @internal to core.\n    // Cast it to any before accessing it.\n    (this.testModuleRef.injector.get(ApplicationInitStatus) as any).runInitializers();\n\n    // Set locale ID after running app initializers, since locale information might be updated while\n    // running initializers. This is also consistent with the execution order while bootstrapping an\n    // app (see `packages/core/src/application_ref.ts` file).\n    const localeId = this.testModuleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n    setLocaleId(localeId);\n\n    return this.testModuleRef;\n  }\n\n  /**\n   * @internal\n   */\n  _compileNgModuleSync(moduleType: Type): void {\n    this.queueTypesFromModulesArray([moduleType]);\n    this.compileTypesSync();\n    this.applyProviderOverrides();\n    this.applyProviderOverridesInScope(moduleType);\n    this.applyTransitiveScopes();\n  }\n\n  /**\n   * @internal\n   */\n  async _compileNgModuleAsync(moduleType: Type): Promise {\n    this.queueTypesFromModulesArray([moduleType]);\n    await this.compileComponents();\n    this.applyProviderOverrides();\n    this.applyProviderOverridesInScope(moduleType);\n    this.applyTransitiveScopes();\n  }\n\n  /**\n   * @internal\n   */\n  _getModuleResolver(): Resolver {\n    return this.resolvers.module;\n  }\n\n  /**\n   * @internal\n   */\n  _getComponentFactories(moduleType: NgModuleType): ComponentFactory[] {\n    return maybeUnwrapFn(moduleType.ɵmod.declarations).reduce((factories, declaration) => {\n      const componentDef = (declaration as any).ɵcmp;\n      componentDef && factories.push(new ComponentFactory(componentDef, this.testModuleRef!));\n      return factories;\n    }, [] as ComponentFactory[]);\n  }\n\n  private compileTypesSync(): boolean {\n    // Compile all queued components, directives, pipes.\n    let needsAsyncResources = false;\n    this.pendingComponents.forEach((declaration) => {\n      if (getAsyncClassMetadataFn(declaration)) {\n        throw new Error(\n          `Component '${declaration.name}' has unresolved metadata. ` +\n            `Please call \\`await TestBed.compileComponents()\\` before running this test.`,\n        );\n      }\n\n      needsAsyncResources = needsAsyncResources || ɵisComponentDefPendingResolution(declaration);\n\n      const metadata = this.resolvers.component.resolve(declaration);\n      if (metadata === null) {\n        throw invalidTypeError(declaration.name, 'Component');\n      }\n\n      this.maybeStoreNgDef(NG_COMP_DEF, declaration);\n      if (USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n        depsTracker.clearScopeCacheFor(declaration);\n      }\n      compileComponent(declaration, metadata);\n    });\n    this.pendingComponents.clear();\n\n    this.pendingDirectives.forEach((declaration) => {\n      const metadata = this.resolvers.directive.resolve(declaration);\n      if (metadata === null) {\n        throw invalidTypeError(declaration.name, 'Directive');\n      }\n      this.maybeStoreNgDef(NG_DIR_DEF, declaration);\n      compileDirective(declaration, metadata);\n    });\n    this.pendingDirectives.clear();\n\n    this.pendingPipes.forEach((declaration) => {\n      const metadata = this.resolvers.pipe.resolve(declaration);\n      if (metadata === null) {\n        throw invalidTypeError(declaration.name, 'Pipe');\n      }\n      this.maybeStoreNgDef(NG_PIPE_DEF, declaration);\n      compilePipe(declaration, metadata);\n    });\n    this.pendingPipes.clear();\n\n    return needsAsyncResources;\n  }\n\n  private applyTransitiveScopes(): void {\n    if (this.overriddenModules.size > 0) {\n      // Module overrides (via `TestBed.overrideModule`) might affect scopes that were previously\n      // calculated and stored in `transitiveCompileScopes`. If module overrides are present,\n      // collect all affected modules and reset scopes to force their re-calculation.\n      const testingModuleDef = (this.testModuleType as any)[NG_MOD_DEF];\n      const affectedModules = this.collectModulesAffectedByOverrides(testingModuleDef.imports);\n      if (affectedModules.size > 0) {\n        affectedModules.forEach((moduleType) => {\n          if (!USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n            this.storeFieldOfDefOnType(moduleType as any, NG_MOD_DEF, 'transitiveCompileScopes');\n            (moduleType as any)[NG_MOD_DEF].transitiveCompileScopes = null;\n          } else {\n            depsTracker.clearScopeCacheFor(moduleType);\n          }\n        });\n      }\n    }\n\n    const moduleToScope = new Map | TestingModuleOverride, NgModuleTransitiveScopes>();\n    const getScopeOfModule = (\n      moduleType: Type | TestingModuleOverride,\n    ): NgModuleTransitiveScopes => {\n      if (!moduleToScope.has(moduleType)) {\n        const isTestingModule = isTestingModuleOverride(moduleType);\n        const realType = isTestingModule ? this.testModuleType : (moduleType as Type);\n        moduleToScope.set(moduleType, transitiveScopesFor(realType));\n      }\n      return moduleToScope.get(moduleType)!;\n    };\n\n    this.componentToModuleScope.forEach((moduleType, componentType) => {\n      if (moduleType !== null) {\n        const moduleScope = getScopeOfModule(moduleType);\n        this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'directiveDefs');\n        this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'pipeDefs');\n        patchComponentDefWithScope(getComponentDef(componentType)!, moduleScope);\n      }\n      // `tView` that is stored on component def contains information about directives and pipes\n      // that are in the scope of this component. Patching component scope will cause `tView` to be\n      // changed. Store original `tView` before patching scope, so the `tView` (including scope\n      // information) is restored back to its previous/original state before running next test.\n      // Resetting `tView` is also needed for cases when we apply provider overrides and those\n      // providers are defined on component's level, in which case they may end up included into\n      // `tView.blueprint`.\n      this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'tView');\n    });\n\n    this.componentToModuleScope.clear();\n  }\n\n  private applyProviderOverrides(): void {\n    const maybeApplyOverrides = (field: string) => (type: Type) => {\n      const resolver = field === NG_COMP_DEF ? this.resolvers.component : this.resolvers.directive;\n      const metadata = resolver.resolve(type)!;\n      if (this.hasProviderOverrides(metadata.providers)) {\n        this.patchDefWithProviderOverrides(type, field);\n      }\n    };\n    this.seenComponents.forEach(maybeApplyOverrides(NG_COMP_DEF));\n    this.seenDirectives.forEach(maybeApplyOverrides(NG_DIR_DEF));\n\n    this.seenComponents.clear();\n    this.seenDirectives.clear();\n  }\n\n  /**\n   * Applies provider overrides to a given type (either an NgModule or a standalone component)\n   * and all imported NgModules and standalone components recursively.\n   */\n  private applyProviderOverridesInScope(type: Type): void {\n    const hasScope = isStandaloneComponent(type) || isNgModule(type);\n\n    // The function can be re-entered recursively while inspecting dependencies\n    // of an NgModule or a standalone component. Exit early if we come across a\n    // type that can not have a scope (directive or pipe) or the type is already\n    // processed earlier.\n    if (!hasScope || this.scopesWithOverriddenProviders.has(type)) {\n      return;\n    }\n    this.scopesWithOverriddenProviders.add(type);\n\n    // NOTE: the line below triggers JIT compilation of the module injector,\n    // which also invokes verification of the NgModule semantics, which produces\n    // detailed error messages. The fact that the code relies on this line being\n    // present here is suspicious and should be refactored in a way that the line\n    // below can be moved (for ex. after an early exit check below).\n    const injectorDef: any = (type as any)[NG_INJ_DEF];\n\n    // No provider overrides, exit early.\n    if (this.providerOverridesByToken.size === 0) return;\n\n    if (isStandaloneComponent(type)) {\n      // Visit all component dependencies and override providers there.\n      const def = getComponentDef(type);\n      const dependencies = maybeUnwrapFn(def.dependencies ?? []);\n      for (const dependency of dependencies) {\n        this.applyProviderOverridesInScope(dependency);\n      }\n    } else {\n      const providers: Array = [\n        ...injectorDef.providers,\n        ...(this.providerOverridesByModule.get(type as InjectorType) || []),\n      ];\n      if (this.hasProviderOverrides(providers)) {\n        this.maybeStoreNgDef(NG_INJ_DEF, type);\n\n        this.storeFieldOfDefOnType(type, NG_INJ_DEF, 'providers');\n        injectorDef.providers = this.getOverriddenProviders(providers);\n      }\n\n      // Apply provider overrides to imported modules recursively\n      const moduleDef = (type as any)[NG_MOD_DEF];\n      const imports = maybeUnwrapFn(moduleDef.imports);\n      for (const importedModule of imports) {\n        this.applyProviderOverridesInScope(importedModule);\n      }\n      // Also override the providers on any ModuleWithProviders imports since those don't appear in\n      // the moduleDef.\n      for (const importedModule of flatten(injectorDef.imports)) {\n        if (isModuleWithProviders(importedModule)) {\n          this.defCleanupOps.push({\n            object: importedModule,\n            fieldName: 'providers',\n            originalValue: importedModule.providers,\n          });\n          importedModule.providers = this.getOverriddenProviders(\n            importedModule.providers as Array,\n          );\n        }\n      }\n    }\n  }\n\n  private patchComponentsWithExistingStyles(): void {\n    this.existingComponentStyles.forEach(\n      (styles, type) => ((type as any)[NG_COMP_DEF].styles = styles),\n    );\n    this.existingComponentStyles.clear();\n  }\n\n  private queueTypeArray(arr: any[], moduleType: Type | TestingModuleOverride): void {\n    for (const value of arr) {\n      if (Array.isArray(value)) {\n        this.queueTypeArray(value, moduleType);\n      } else {\n        this.queueType(value, moduleType);\n      }\n    }\n  }\n\n  private recompileNgModule(ngModule: Type, metadata: NgModule): void {\n    // Cache the initial ngModuleDef as it will be overwritten.\n    this.maybeStoreNgDef(NG_MOD_DEF, ngModule);\n    this.maybeStoreNgDef(NG_INJ_DEF, ngModule);\n\n    compileNgModuleDefs(ngModule as NgModuleType, metadata);\n  }\n\n  private maybeRegisterComponentWithAsyncMetadata(type: Type) {\n    const asyncMetadataFn = getAsyncClassMetadataFn(type);\n    if (asyncMetadataFn) {\n      this.componentsWithAsyncMetadata.add(type);\n    }\n  }\n\n  private queueType(type: Type, moduleType: Type | TestingModuleOverride | null): void {\n    // If this is a component with async metadata (i.e. a component with a `@defer` block\n    // in a template) - store it for future processing.\n    this.maybeRegisterComponentWithAsyncMetadata(type);\n\n    const component = this.resolvers.component.resolve(type);\n    if (component) {\n      // Check whether a give Type has respective NG def (ɵcmp) and compile if def is\n      // missing. That might happen in case a class without any Angular decorators extends another\n      // class where Component/Directive/Pipe decorator is defined.\n      if (ɵisComponentDefPendingResolution(type) || !type.hasOwnProperty(NG_COMP_DEF)) {\n        this.pendingComponents.add(type);\n      }\n      this.seenComponents.add(type);\n\n      // Keep track of the module which declares this component, so later the component's scope\n      // can be set correctly. If the component has already been recorded here, then one of several\n      // cases is true:\n      // * the module containing the component was imported multiple times (common).\n      // * the component is declared in multiple modules (which is an error).\n      // * the component was in 'declarations' of the testing module, and also in an imported module\n      //   in which case the module scope will be TestingModuleOverride.DECLARATION.\n      // * overrideTemplateUsingTestingModule was called for the component in which case the module\n      //   scope will be TestingModuleOverride.OVERRIDE_TEMPLATE.\n      //\n      // If the component was previously in the testing module's 'declarations' (meaning the\n      // current value is TestingModuleOverride.DECLARATION), then `moduleType` is the component's\n      // real module, which was imported. This pattern is understood to mean that the component\n      // should use its original scope, but that the testing module should also contain the\n      // component in its scope.\n      if (\n        !this.componentToModuleScope.has(type) ||\n        this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION\n      ) {\n        this.componentToModuleScope.set(type, moduleType);\n      }\n      return;\n    }\n\n    const directive = this.resolvers.directive.resolve(type);\n    if (directive) {\n      if (!type.hasOwnProperty(NG_DIR_DEF)) {\n        this.pendingDirectives.add(type);\n      }\n      this.seenDirectives.add(type);\n      return;\n    }\n\n    const pipe = this.resolvers.pipe.resolve(type);\n    if (pipe && !type.hasOwnProperty(NG_PIPE_DEF)) {\n      this.pendingPipes.add(type);\n      return;\n    }\n  }\n\n  private queueTypesFromModulesArray(arr: any[]): void {\n    // Because we may encounter the same NgModule or a standalone Component while processing\n    // the dependencies of an NgModule or a standalone Component, we cache them in this set so we\n    // can skip ones that have already been seen encountered. In some test setups, this caching\n    // resulted in 10X runtime improvement.\n    const processedDefs = new Set();\n    const queueTypesFromModulesArrayRecur = (arr: any[]): void => {\n      for (const value of arr) {\n        if (Array.isArray(value)) {\n          queueTypesFromModulesArrayRecur(value);\n        } else if (hasNgModuleDef(value)) {\n          const def = value.ɵmod;\n          if (processedDefs.has(def)) {\n            continue;\n          }\n          processedDefs.add(def);\n          // Look through declarations, imports, and exports, and queue\n          // everything found there.\n          this.queueTypeArray(maybeUnwrapFn(def.declarations), value);\n          queueTypesFromModulesArrayRecur(maybeUnwrapFn(def.imports));\n          queueTypesFromModulesArrayRecur(maybeUnwrapFn(def.exports));\n        } else if (isModuleWithProviders(value)) {\n          queueTypesFromModulesArrayRecur([value.ngModule]);\n        } else if (isStandaloneComponent(value)) {\n          this.queueType(value, null);\n          const def = getComponentDef(value);\n\n          if (processedDefs.has(def)) {\n            continue;\n          }\n          processedDefs.add(def);\n\n          const dependencies = maybeUnwrapFn(def.dependencies ?? []);\n          dependencies.forEach((dependency) => {\n            // Note: in AOT, the `dependencies` might also contain regular\n            // (NgModule-based) Component, Directive and Pipes, so we handle\n            // them separately and proceed with recursive process for standalone\n            // Components and NgModules only.\n            if (isStandaloneComponent(dependency) || hasNgModuleDef(dependency)) {\n              queueTypesFromModulesArrayRecur([dependency]);\n            } else {\n              this.queueType(dependency, null);\n            }\n          });\n        }\n      }\n    };\n    queueTypesFromModulesArrayRecur(arr);\n  }\n\n  // When module overrides (via `TestBed.overrideModule`) are present, it might affect all modules\n  // that import (even transitively) an overridden one. For all affected modules we need to\n  // recalculate their scopes for a given test run and restore original scopes at the end. The goal\n  // of this function is to collect all affected modules in a set for further processing. Example:\n  // if we have the following module hierarchy: A -> B -> C (where `->` means `imports`) and module\n  // `C` is overridden, we consider `A` and `B` as affected, since their scopes might become\n  // invalidated with the override.\n  private collectModulesAffectedByOverrides(arr: any[]): Set> {\n    const seenModules = new Set>();\n    const affectedModules = new Set>();\n    const calcAffectedModulesRecur = (arr: any[], path: NgModuleType[]): void => {\n      for (const value of arr) {\n        if (Array.isArray(value)) {\n          // If the value is an array, just flatten it (by invoking this function recursively),\n          // keeping \"path\" the same.\n          calcAffectedModulesRecur(value, path);\n        } else if (hasNgModuleDef(value)) {\n          if (seenModules.has(value)) {\n            // If we've seen this module before and it's included into \"affected modules\" list, mark\n            // the whole path that leads to that module as affected, but do not descend into its\n            // imports, since we already examined them before.\n            if (affectedModules.has(value)) {\n              path.forEach((item) => affectedModules.add(item));\n            }\n            continue;\n          }\n          seenModules.add(value);\n          if (this.overriddenModules.has(value)) {\n            path.forEach((item) => affectedModules.add(item));\n          }\n          // Examine module imports recursively to look for overridden modules.\n          const moduleDef = (value as any)[NG_MOD_DEF];\n          calcAffectedModulesRecur(maybeUnwrapFn(moduleDef.imports), path.concat(value));\n        }\n      }\n    };\n    calcAffectedModulesRecur(arr, []);\n    return affectedModules;\n  }\n\n  /**\n   * Preserve an original def (such as ɵmod, ɵinj, etc) before applying an override.\n   * Note: one class may have multiple defs (for example: ɵmod and ɵinj in case of\n   * an NgModule). If there is a def in a set already, don't override it, since\n   * an original one should be restored at the end of a test.\n   */\n  private maybeStoreNgDef(prop: string, type: Type) {\n    if (!this.initialNgDefs.has(type)) {\n      this.initialNgDefs.set(type, new Map());\n    }\n    const currentDefs = this.initialNgDefs.get(type)!;\n    if (!currentDefs.has(prop)) {\n      const currentDef = Object.getOwnPropertyDescriptor(type, prop);\n      currentDefs.set(prop, currentDef);\n    }\n  }\n\n  private storeFieldOfDefOnType(type: Type, defField: string, fieldName: string): void {\n    const def: any = (type as any)[defField];\n    const originalValue: any = def[fieldName];\n    this.defCleanupOps.push({object: def, fieldName, originalValue});\n  }\n\n  /**\n   * Clears current components resolution queue, but stores the state of the queue, so we can\n   * restore it later. Clearing the queue is required before we try to compile components (via\n   * `TestBed.compileComponents`), so that component defs are in sync with the resolution queue.\n   */\n  private clearComponentResolutionQueue() {\n    if (this.originalComponentResolutionQueue === null) {\n      this.originalComponentResolutionQueue = new Map();\n    }\n    ɵclearResolutionOfComponentResourcesQueue().forEach((value, key) =>\n      this.originalComponentResolutionQueue!.set(key, value),\n    );\n  }\n\n  /*\n   * Restores component resolution queue to the previously saved state. This operation is performed\n   * as a part of restoring the state after completion of the current set of tests (that might\n   * potentially mutate the state).\n   */\n  private restoreComponentResolutionQueue() {\n    if (this.originalComponentResolutionQueue !== null) {\n      ɵrestoreComponentResolutionQueue(this.originalComponentResolutionQueue);\n      this.originalComponentResolutionQueue = null;\n    }\n  }\n\n  restoreOriginalState(): void {\n    // Process cleanup ops in reverse order so the field's original value is restored correctly (in\n    // case there were multiple overrides for the same field).\n    forEachRight(this.defCleanupOps, (op: CleanupOperation) => {\n      op.object[op.fieldName] = op.originalValue;\n    });\n    // Restore initial component/directive/pipe defs\n    this.initialNgDefs.forEach(\n      (defs: Map, type: Type) => {\n        if (USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n          depsTracker.clearScopeCacheFor(type);\n        }\n        defs.forEach((descriptor, prop) => {\n          if (!descriptor) {\n            // Delete operations are generally undesirable since they have performance\n            // implications on objects they were applied to. In this particular case, situations\n            // where this code is invoked should be quite rare to cause any noticeable impact,\n            // since it's applied only to some test cases (for example when class with no\n            // annotations extends some @Component) when we need to clear 'ɵcmp' field on a given\n            // class to restore its original state (before applying overrides and running tests).\n            delete (type as any)[prop];\n          } else {\n            Object.defineProperty(type, prop, descriptor);\n          }\n        });\n      },\n    );\n    this.initialNgDefs.clear();\n    this.scopesWithOverriddenProviders.clear();\n    this.restoreComponentResolutionQueue();\n    // Restore the locale ID to the default value, this shouldn't be necessary but we never know\n    setLocaleId(DEFAULT_LOCALE_ID);\n  }\n\n  private compileTestModule(): void {\n    class RootScopeModule {}\n    compileNgModuleDefs(RootScopeModule as NgModuleType, {\n      providers: [\n        ...this.rootProviderOverrides,\n        internalProvideZoneChangeDetection({}),\n        {provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl},\n      ],\n    });\n\n    const providers = [\n      {provide: Compiler, useFactory: () => new R3TestCompiler(this)},\n      {provide: DEFER_BLOCK_CONFIG, useValue: {behavior: this.deferBlockBehavior}},\n      ...this.providers,\n      ...this.providerOverrides,\n    ];\n    const imports = [RootScopeModule, this.additionalModuleTypes, this.imports || []];\n\n    compileNgModuleDefs(\n      this.testModuleType,\n      {\n        declarations: this.declarations,\n        imports,\n        schemas: this.schemas,\n        providers,\n      },\n      /* allowDuplicateDeclarationsInRoot */ true,\n    );\n\n    this.applyProviderOverridesInScope(this.testModuleType);\n  }\n\n  get injector(): Injector {\n    if (this._injector !== null) {\n      return this._injector;\n    }\n\n    const providers: StaticProvider[] = [];\n    const compilerOptions = this.platform.injector.get(COMPILER_OPTIONS);\n    compilerOptions.forEach((opts) => {\n      if (opts.providers) {\n        providers.push(opts.providers);\n      }\n    });\n    if (this.compilerProviders !== null) {\n      providers.push(...(this.compilerProviders as StaticProvider[]));\n    }\n\n    this._injector = Injector.create({providers, parent: this.platform.injector});\n    return this._injector;\n  }\n\n  // get overrides for a specific provider (if any)\n  private getSingleProviderOverrides(provider: Provider): Provider | null {\n    const token = getProviderToken(provider);\n    return this.providerOverridesByToken.get(token) || null;\n  }\n\n  private getProviderOverrides(\n    providers?: Array,\n  ): Provider[] {\n    if (!providers || !providers.length || this.providerOverridesByToken.size === 0) return [];\n    // There are two flattening operations here. The inner flattenProviders() operates on the\n    // metadata's providers and applies a mapping function which retrieves overrides for each\n    // incoming provider. The outer flatten() then flattens the produced overrides array. If this is\n    // not done, the array can contain other empty arrays (e.g. `[[], []]`) which leak into the\n    // providers array and contaminate any error messages that might be generated.\n    return flatten(\n      flattenProviders(\n        providers,\n        (provider: Provider) => this.getSingleProviderOverrides(provider) || [],\n      ),\n    );\n  }\n\n  private getOverriddenProviders(\n    providers?: Array,\n  ): Provider[] {\n    if (!providers || !providers.length || this.providerOverridesByToken.size === 0) return [];\n\n    const flattenedProviders = flattenProviders(providers);\n    const overrides = this.getProviderOverrides(flattenedProviders);\n    const overriddenProviders = [...flattenedProviders, ...overrides];\n    const final: Provider[] = [];\n    const seenOverriddenProviders = new Set();\n\n    // We iterate through the list of providers in reverse order to make sure provider overrides\n    // take precedence over the values defined in provider list. We also filter out all providers\n    // that have overrides, keeping overridden values only. This is needed, since presence of a\n    // provider with `ngOnDestroy` hook will cause this hook to be registered and invoked later.\n    forEachRight(overriddenProviders, (provider: any) => {\n      const token: any = getProviderToken(provider);\n      if (this.providerOverridesByToken.has(token)) {\n        if (!seenOverriddenProviders.has(token)) {\n          seenOverriddenProviders.add(token);\n          // Treat all overridden providers as `{multi: false}` (even if it's a multi-provider) to\n          // make sure that provided override takes highest precedence and is not combined with\n          // other instances of the same multi provider.\n          final.unshift({...provider, multi: false});\n        }\n      } else {\n        final.unshift(provider);\n      }\n    });\n    return final;\n  }\n\n  private hasProviderOverrides(\n    providers?: Array,\n  ): boolean {\n    return this.getProviderOverrides(providers).length > 0;\n  }\n\n  private patchDefWithProviderOverrides(declaration: Type, field: string): void {\n    const def = (declaration as any)[field];\n    if (def && def.providersResolver) {\n      this.maybeStoreNgDef(field, declaration);\n\n      const resolver = def.providersResolver;\n      const processProvidersFn = (providers: Provider[]) => this.getOverriddenProviders(providers);\n      this.storeFieldOfDefOnType(declaration, field, 'providersResolver');\n      def.providersResolver = (ngDef: DirectiveDef) => resolver(ngDef, processProvidersFn);\n    }\n  }\n}\n\nfunction initResolvers(): Resolvers {\n  return {\n    module: new NgModuleResolver(),\n    component: new ComponentResolver(),\n    directive: new DirectiveResolver(),\n    pipe: new PipeResolver(),\n  };\n}\n\nfunction isStandaloneComponent(value: Type): value is ComponentType {\n  const def = getComponentDef(value);\n  return !!def?.standalone;\n}\n\nfunction getComponentDef(value: ComponentType): ComponentDef;\nfunction getComponentDef(value: Type): ComponentDef | null;\nfunction getComponentDef(value: Type): ComponentDef | null {\n  return (value as any).ɵcmp ?? null;\n}\n\nfunction hasNgModuleDef(value: Type): value is NgModuleType {\n  return value.hasOwnProperty('ɵmod');\n}\n\nfunction isNgModule(value: Type): boolean {\n  return hasNgModuleDef(value);\n}\n\nfunction maybeUnwrapFn(maybeFn: (() => T) | T): T {\n  return maybeFn instanceof Function ? maybeFn() : maybeFn;\n}\n\nfunction flatten(values: any[]): T[] {\n  const out: T[] = [];\n  values.forEach((value) => {\n    if (Array.isArray(value)) {\n      out.push(...flatten(value));\n    } else {\n      out.push(value);\n    }\n  });\n  return out;\n}\n\nfunction identityFn(value: T): T {\n  return value;\n}\n\nfunction flattenProviders(\n  providers: Array,\n  mapFn: (provider: Provider) => T,\n): T[];\nfunction flattenProviders(providers: Array): Provider[];\nfunction flattenProviders(\n  providers: Array,\n  mapFn: (provider: Provider) => any = identityFn,\n): any[] {\n  const out: any[] = [];\n  for (let provider of providers) {\n    if (isEnvironmentProviders(provider)) {\n      provider = provider.ɵproviders;\n    }\n    if (Array.isArray(provider)) {\n      out.push(...flattenProviders(provider, mapFn));\n    } else {\n      out.push(mapFn(provider));\n    }\n  }\n  return out;\n}\n\nfunction getProviderField(provider: Provider, field: string) {\n  return provider && typeof provider === 'object' && (provider as any)[field];\n}\n\nfunction getProviderToken(provider: Provider) {\n  return getProviderField(provider, 'provide') || provider;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders {\n  return value.hasOwnProperty('ngModule');\n}\n\nfunction forEachRight(values: T[], fn: (value: T, idx: number) => void): void {\n  for (let idx = values.length - 1; idx >= 0; idx--) {\n    fn(values[idx], idx);\n  }\n}\n\nfunction invalidTypeError(name: string, expectedType: string): Error {\n  return new Error(`${name} class doesn't have @${expectedType} decorator or is missing metadata.`);\n}\n\nclass R3TestCompiler implements Compiler {\n  constructor(private testBed: TestBedCompiler) {}\n\n  compileModuleSync(moduleType: Type): NgModuleFactory {\n    this.testBed._compileNgModuleSync(moduleType);\n    return new R3NgModuleFactory(moduleType);\n  }\n\n  async compileModuleAsync(moduleType: Type): Promise> {\n    await this.testBed._compileNgModuleAsync(moduleType);\n    return new R3NgModuleFactory(moduleType);\n  }\n\n  compileModuleAndAllComponentsSync(moduleType: Type): ModuleWithComponentFactories {\n    const ngModuleFactory = this.compileModuleSync(moduleType);\n    const componentFactories = this.testBed._getComponentFactories(moduleType as NgModuleType);\n    return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n  }\n\n  async compileModuleAndAllComponentsAsync(\n    moduleType: Type,\n  ): Promise> {\n    const ngModuleFactory = await this.compileModuleAsync(moduleType);\n    const componentFactories = this.testBed._getComponentFactories(moduleType as NgModuleType);\n    return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n  }\n\n  clearCache(): void {}\n\n  clearCacheFor(type: Type): void {}\n\n  getModuleId(moduleType: Type): string | undefined {\n    const meta = this.testBed._getModuleResolver().resolve(moduleType);\n    return (meta && meta.id) || undefined;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// The formatter and CI disagree on how this import statement should be formatted. Both try to keep\n// it on one line, too, which has gotten very hard to read & manage. So disable the formatter for\n// this statement only.\n\nimport {\n  Component,\n  ComponentRef,\n  Directive,\n  EnvironmentInjector,\n  InjectFlags,\n  InjectOptions,\n  Injector,\n  NgModule,\n  NgZone,\n  Pipe,\n  PlatformRef,\n  ProviderToken,\n  runInInjectionContext,\n  Type,\n  ɵconvertToBitFlags as convertToBitFlags,\n  ɵDeferBlockBehavior as DeferBlockBehavior,\n  ɵEffectScheduler as EffectScheduler,\n  ɵflushModuleScopingQueueAsMuchAsPossible as flushModuleScopingQueueAsMuchAsPossible,\n  ɵgetAsyncClassMetadataFn as getAsyncClassMetadataFn,\n  ɵgetUnknownElementStrictMode as getUnknownElementStrictMode,\n  ɵgetUnknownPropertyStrictMode as getUnknownPropertyStrictMode,\n  ɵRender3ComponentFactory as ComponentFactory,\n  ɵRender3NgModuleRef as NgModuleRef,\n  ɵresetCompiledComponents as resetCompiledComponents,\n  ɵsetAllowDuplicateNgModuleIdsForTest as setAllowDuplicateNgModuleIdsForTest,\n  ɵsetUnknownElementStrictMode as setUnknownElementStrictMode,\n  ɵsetUnknownPropertyStrictMode as setUnknownPropertyStrictMode,\n  ɵstringify as stringify,\n  ɵZONELESS_ENABLED as ZONELESS_ENABLED,\n} from '@angular/core';\n\nimport {\n  ComponentFixture,\n  PseudoApplicationComponentFixture,\n  ScheduledComponentFixture,\n} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {\n  ComponentFixtureNoNgZone,\n  DEFER_BLOCK_DEFAULT_BEHAVIOR,\n  ModuleTeardownOptions,\n  TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT,\n  TestComponentRenderer,\n  TestEnvironmentOptions,\n  TestModuleMetadata,\n  THROW_ON_UNKNOWN_ELEMENTS_DEFAULT,\n  THROW_ON_UNKNOWN_PROPERTIES_DEFAULT,\n} from './test_bed_common';\nimport {TestBedCompiler} from './test_bed_compiler';\n\n/**\n * Static methods implemented by the `TestBed`.\n *\n * @publicApi\n */\nexport interface TestBedStatic extends TestBed {\n  new (...args: any[]): TestBed;\n}\n\n/**\n * @publicApi\n */\nexport interface TestBed {\n  get platform(): PlatformRef;\n\n  get ngModule(): Type | Type[];\n\n  /**\n   * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n   * angular module. These are common to every test in the suite.\n   *\n   * This may only be called once, to set up the common providers for the current test\n   * suite on the current platform. If you absolutely need to change the providers,\n   * first use `resetTestEnvironment`.\n   *\n   * Test modules and platforms for individual platforms are available from\n   * '@angular//testing'.\n   */\n  initTestEnvironment(\n    ngModule: Type | Type[],\n    platform: PlatformRef,\n    options?: TestEnvironmentOptions,\n  ): void;\n\n  /**\n   * Reset the providers for the test injector.\n   */\n  resetTestEnvironment(): void;\n\n  resetTestingModule(): TestBed;\n\n  configureCompiler(config: {providers?: any[]; useJit?: boolean}): void;\n\n  configureTestingModule(moduleDef: TestModuleMetadata): TestBed;\n\n  compileComponents(): Promise;\n\n  inject(\n    token: ProviderToken,\n    notFoundValue: undefined,\n    options: InjectOptions & {\n      optional?: false;\n    },\n  ): T;\n  inject(\n    token: ProviderToken,\n    notFoundValue: null | undefined,\n    options: InjectOptions,\n  ): T | null;\n  inject(token: ProviderToken, notFoundValue?: T, options?: InjectOptions): T;\n  /** @deprecated use object-based flags (`InjectOptions`) instead. */\n  inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T;\n  /** @deprecated use object-based flags (`InjectOptions`) instead. */\n  inject(token: ProviderToken, notFoundValue: null, flags?: InjectFlags): T | null;\n\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any;\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  get(token: any, notFoundValue?: any): any;\n\n  /**\n   * Runs the given function in the `EnvironmentInjector` context of `TestBed`.\n   *\n   * @see {@link EnvironmentInjector#runInContext}\n   */\n  runInInjectionContext(fn: () => T): T;\n\n  execute(tokens: any[], fn: Function, context?: any): any;\n\n  overrideModule(ngModule: Type, override: MetadataOverride): TestBed;\n\n  overrideComponent(component: Type, override: MetadataOverride): TestBed;\n\n  overrideDirective(directive: Type, override: MetadataOverride): TestBed;\n\n  overridePipe(pipe: Type, override: MetadataOverride): TestBed;\n\n  overrideTemplate(component: Type, template: string): TestBed;\n\n  /**\n   * Overwrites all providers for the given token with the given provider definition.\n   */\n  overrideProvider(\n    token: any,\n    provider: {useFactory: Function; deps: any[]; multi?: boolean},\n  ): TestBed;\n  overrideProvider(token: any, provider: {useValue: any; multi?: boolean}): TestBed;\n  overrideProvider(\n    token: any,\n    provider: {useFactory?: Function; useValue?: any; deps?: any[]; multi?: boolean},\n  ): TestBed;\n\n  overrideTemplateUsingTestingModule(component: Type, template: string): TestBed;\n\n  createComponent(component: Type): ComponentFixture;\n\n  /**\n   * Execute any pending effects.\n   *\n   * @developerPreview\n   */\n  flushEffects(): void;\n}\n\nlet _nextRootElementId = 0;\n\n/**\n * Returns a singleton of the `TestBed` class.\n *\n * @publicApi\n */\nexport function getTestBed(): TestBed {\n  return TestBedImpl.INSTANCE;\n}\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * TestBed is the primary api for writing unit tests for Angular applications and libraries.\n */\nexport class TestBedImpl implements TestBed {\n  private static _INSTANCE: TestBedImpl | null = null;\n\n  static get INSTANCE(): TestBedImpl {\n    return (TestBedImpl._INSTANCE = TestBedImpl._INSTANCE || new TestBedImpl());\n  }\n\n  /**\n   * Teardown options that have been configured at the environment level.\n   * Used as a fallback if no instance-level options have been provided.\n   */\n  private static _environmentTeardownOptions: ModuleTeardownOptions | undefined;\n\n  /**\n   * \"Error on unknown elements\" option that has been configured at the environment level.\n   * Used as a fallback if no instance-level option has been provided.\n   */\n  private static _environmentErrorOnUnknownElementsOption: boolean | undefined;\n\n  /**\n   * \"Error on unknown properties\" option that has been configured at the environment level.\n   * Used as a fallback if no instance-level option has been provided.\n   */\n  private static _environmentErrorOnUnknownPropertiesOption: boolean | undefined;\n\n  /**\n   * Teardown options that have been configured at the `TestBed` instance level.\n   * These options take precedence over the environment-level ones.\n   */\n  private _instanceTeardownOptions: ModuleTeardownOptions | undefined;\n\n  /**\n   * Defer block behavior option that specifies whether defer blocks will be triggered manually\n   * or set to play through.\n   */\n  private _instanceDeferBlockBehavior = DEFER_BLOCK_DEFAULT_BEHAVIOR;\n\n  /**\n   * \"Error on unknown elements\" option that has been configured at the `TestBed` instance level.\n   * This option takes precedence over the environment-level one.\n   */\n  private _instanceErrorOnUnknownElementsOption: boolean | undefined;\n\n  /**\n   * \"Error on unknown properties\" option that has been configured at the `TestBed` instance level.\n   * This option takes precedence over the environment-level one.\n   */\n  private _instanceErrorOnUnknownPropertiesOption: boolean | undefined;\n\n  /**\n   * Stores the previous \"Error on unknown elements\" option value,\n   * allowing to restore it in the reset testing module logic.\n   */\n  private _previousErrorOnUnknownElementsOption: boolean | undefined;\n\n  /**\n   * Stores the previous \"Error on unknown properties\" option value,\n   * allowing to restore it in the reset testing module logic.\n   */\n  private _previousErrorOnUnknownPropertiesOption: boolean | undefined;\n\n  /**\n   * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n   * angular module. These are common to every test in the suite.\n   *\n   * This may only be called once, to set up the common providers for the current test\n   * suite on the current platform. If you absolutely need to change the providers,\n   * first use `resetTestEnvironment`.\n   *\n   * Test modules and platforms for individual platforms are available from\n   * '@angular//testing'.\n   *\n   * @publicApi\n   */\n  static initTestEnvironment(\n    ngModule: Type | Type[],\n    platform: PlatformRef,\n    options?: TestEnvironmentOptions,\n  ): TestBed {\n    const testBed = TestBedImpl.INSTANCE;\n    testBed.initTestEnvironment(ngModule, platform, options);\n    return testBed;\n  }\n\n  /**\n   * Reset the providers for the test injector.\n   *\n   * @publicApi\n   */\n  static resetTestEnvironment(): void {\n    TestBedImpl.INSTANCE.resetTestEnvironment();\n  }\n\n  static configureCompiler(config: {providers?: any[]; useJit?: boolean}): TestBed {\n    return TestBedImpl.INSTANCE.configureCompiler(config);\n  }\n\n  /**\n   * Allows overriding default providers, directives, pipes, modules of the test injector,\n   * which are defined in test_injector.js\n   */\n  static configureTestingModule(moduleDef: TestModuleMetadata): TestBed {\n    return TestBedImpl.INSTANCE.configureTestingModule(moduleDef);\n  }\n\n  /**\n   * Compile components with a `templateUrl` for the test's NgModule.\n   * It is necessary to call this function\n   * as fetching urls is asynchronous.\n   */\n  static compileComponents(): Promise {\n    return TestBedImpl.INSTANCE.compileComponents();\n  }\n\n  static overrideModule(ngModule: Type, override: MetadataOverride): TestBed {\n    return TestBedImpl.INSTANCE.overrideModule(ngModule, override);\n  }\n\n  static overrideComponent(component: Type, override: MetadataOverride): TestBed {\n    return TestBedImpl.INSTANCE.overrideComponent(component, override);\n  }\n\n  static overrideDirective(directive: Type, override: MetadataOverride): TestBed {\n    return TestBedImpl.INSTANCE.overrideDirective(directive, override);\n  }\n\n  static overridePipe(pipe: Type, override: MetadataOverride): TestBed {\n    return TestBedImpl.INSTANCE.overridePipe(pipe, override);\n  }\n\n  static overrideTemplate(component: Type, template: string): TestBed {\n    return TestBedImpl.INSTANCE.overrideTemplate(component, template);\n  }\n\n  /**\n   * Overrides the template of the given component, compiling the template\n   * in the context of the TestingModule.\n   *\n   * Note: This works for JIT and AOTed components as well.\n   */\n  static overrideTemplateUsingTestingModule(component: Type, template: string): TestBed {\n    return TestBedImpl.INSTANCE.overrideTemplateUsingTestingModule(component, template);\n  }\n\n  static overrideProvider(\n    token: any,\n    provider: {\n      useFactory: Function;\n      deps: any[];\n    },\n  ): TestBed;\n  static overrideProvider(token: any, provider: {useValue: any}): TestBed;\n  static overrideProvider(\n    token: any,\n    provider: {\n      useFactory?: Function;\n      useValue?: any;\n      deps?: any[];\n    },\n  ): TestBed {\n    return TestBedImpl.INSTANCE.overrideProvider(token, provider);\n  }\n\n  static inject(\n    token: ProviderToken,\n    notFoundValue: undefined,\n    options: InjectOptions & {\n      optional?: false;\n    },\n  ): T;\n  static inject(\n    token: ProviderToken,\n    notFoundValue: null | undefined,\n    options: InjectOptions,\n  ): T | null;\n  static inject(token: ProviderToken, notFoundValue?: T, options?: InjectOptions): T;\n  /** @deprecated use object-based flags (`InjectOptions`) instead. */\n  static inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T;\n  /** @deprecated use object-based flags (`InjectOptions`) instead. */\n  static inject(token: ProviderToken, notFoundValue: null, flags?: InjectFlags): T | null;\n  static inject(\n    token: ProviderToken,\n    notFoundValue?: T | null,\n    flags?: InjectFlags | InjectOptions,\n  ): T | null {\n    return TestBedImpl.INSTANCE.inject(token, notFoundValue, convertToBitFlags(flags));\n  }\n\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  static get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any;\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  static get(token: any, notFoundValue?: any): any;\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  static get(\n    token: any,\n    notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n    flags: InjectFlags = InjectFlags.Default,\n  ): any {\n    return TestBedImpl.INSTANCE.inject(token, notFoundValue, flags);\n  }\n\n  /**\n   * Runs the given function in the `EnvironmentInjector` context of `TestBed`.\n   *\n   * @see {@link EnvironmentInjector#runInContext}\n   */\n  static runInInjectionContext(fn: () => T): T {\n    return TestBedImpl.INSTANCE.runInInjectionContext(fn);\n  }\n\n  static createComponent(component: Type): ComponentFixture {\n    return TestBedImpl.INSTANCE.createComponent(component);\n  }\n\n  static resetTestingModule(): TestBed {\n    return TestBedImpl.INSTANCE.resetTestingModule();\n  }\n\n  static execute(tokens: any[], fn: Function, context?: any): any {\n    return TestBedImpl.INSTANCE.execute(tokens, fn, context);\n  }\n\n  static get platform(): PlatformRef {\n    return TestBedImpl.INSTANCE.platform;\n  }\n\n  static get ngModule(): Type | Type[] {\n    return TestBedImpl.INSTANCE.ngModule;\n  }\n\n  static flushEffects(): void {\n    return TestBedImpl.INSTANCE.flushEffects();\n  }\n\n  // Properties\n\n  platform: PlatformRef = null!;\n  ngModule: Type | Type[] = null!;\n\n  private _compiler: TestBedCompiler | null = null;\n  private _testModuleRef: NgModuleRef | null = null;\n\n  private _activeFixtures: ComponentFixture[] = [];\n\n  /**\n   * Internal-only flag to indicate whether a module\n   * scoping queue has been checked and flushed already.\n   * @nodoc\n   */\n  globalCompilationChecked = false;\n\n  /**\n   * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n   * angular module. These are common to every test in the suite.\n   *\n   * This may only be called once, to set up the common providers for the current test\n   * suite on the current platform. If you absolutely need to change the providers,\n   * first use `resetTestEnvironment`.\n   *\n   * Test modules and platforms for individual platforms are available from\n   * '@angular//testing'.\n   *\n   * @publicApi\n   */\n  initTestEnvironment(\n    ngModule: Type | Type[],\n    platform: PlatformRef,\n    options?: TestEnvironmentOptions,\n  ): void {\n    if (this.platform || this.ngModule) {\n      throw new Error('Cannot set base providers because it has already been called');\n    }\n\n    TestBedImpl._environmentTeardownOptions = options?.teardown;\n\n    TestBedImpl._environmentErrorOnUnknownElementsOption = options?.errorOnUnknownElements;\n\n    TestBedImpl._environmentErrorOnUnknownPropertiesOption = options?.errorOnUnknownProperties;\n\n    this.platform = platform;\n    this.ngModule = ngModule;\n    this._compiler = new TestBedCompiler(this.platform, this.ngModule);\n\n    // TestBed does not have an API which can reliably detect the start of a test, and thus could be\n    // used to track the state of the NgModule registry and reset it correctly. Instead, when we\n    // know we're in a testing scenario, we disable the check for duplicate NgModule registration\n    // completely.\n    setAllowDuplicateNgModuleIdsForTest(true);\n  }\n\n  /**\n   * Reset the providers for the test injector.\n   *\n   * @publicApi\n   */\n  resetTestEnvironment(): void {\n    this.resetTestingModule();\n    this._compiler = null;\n    this.platform = null!;\n    this.ngModule = null!;\n    TestBedImpl._environmentTeardownOptions = undefined;\n    setAllowDuplicateNgModuleIdsForTest(false);\n  }\n\n  resetTestingModule(): this {\n    this.checkGlobalCompilationFinished();\n    resetCompiledComponents();\n    if (this._compiler !== null) {\n      this.compiler.restoreOriginalState();\n    }\n    this._compiler = new TestBedCompiler(this.platform, this.ngModule);\n    // Restore the previous value of the \"error on unknown elements\" option\n    setUnknownElementStrictMode(\n      this._previousErrorOnUnknownElementsOption ?? THROW_ON_UNKNOWN_ELEMENTS_DEFAULT,\n    );\n    // Restore the previous value of the \"error on unknown properties\" option\n    setUnknownPropertyStrictMode(\n      this._previousErrorOnUnknownPropertiesOption ?? THROW_ON_UNKNOWN_PROPERTIES_DEFAULT,\n    );\n\n    // We have to chain a couple of try/finally blocks, because each step can\n    // throw errors and we don't want it to interrupt the next step and we also\n    // want an error to be thrown at the end.\n    try {\n      this.destroyActiveFixtures();\n    } finally {\n      try {\n        if (this.shouldTearDownTestingModule()) {\n          this.tearDownTestingModule();\n        }\n      } finally {\n        this._testModuleRef = null;\n        this._instanceTeardownOptions = undefined;\n        this._instanceErrorOnUnknownElementsOption = undefined;\n        this._instanceErrorOnUnknownPropertiesOption = undefined;\n        this._instanceDeferBlockBehavior = DEFER_BLOCK_DEFAULT_BEHAVIOR;\n      }\n    }\n    return this;\n  }\n\n  configureCompiler(config: {providers?: any[]; useJit?: boolean}): this {\n    if (config.useJit != null) {\n      throw new Error('JIT compiler is not configurable via TestBed APIs.');\n    }\n\n    if (config.providers !== undefined) {\n      this.compiler.setCompilerProviders(config.providers);\n    }\n    return this;\n  }\n\n  configureTestingModule(moduleDef: TestModuleMetadata): this {\n    this.assertNotInstantiated('TestBed.configureTestingModule', 'configure the test module');\n\n    // Trigger module scoping queue flush before executing other TestBed operations in a test.\n    // This is needed for the first test invocation to ensure that globally declared modules have\n    // their components scoped properly. See the `checkGlobalCompilationFinished` function\n    // description for additional info.\n    this.checkGlobalCompilationFinished();\n\n    // Always re-assign the options, even if they're undefined.\n    // This ensures that we don't carry them between tests.\n    this._instanceTeardownOptions = moduleDef.teardown;\n    this._instanceErrorOnUnknownElementsOption = moduleDef.errorOnUnknownElements;\n    this._instanceErrorOnUnknownPropertiesOption = moduleDef.errorOnUnknownProperties;\n    this._instanceDeferBlockBehavior = moduleDef.deferBlockBehavior ?? DEFER_BLOCK_DEFAULT_BEHAVIOR;\n    // Store the current value of the strict mode option,\n    // so we can restore it later\n    this._previousErrorOnUnknownElementsOption = getUnknownElementStrictMode();\n    setUnknownElementStrictMode(this.shouldThrowErrorOnUnknownElements());\n    this._previousErrorOnUnknownPropertiesOption = getUnknownPropertyStrictMode();\n    setUnknownPropertyStrictMode(this.shouldThrowErrorOnUnknownProperties());\n    this.compiler.configureTestingModule(moduleDef);\n    return this;\n  }\n\n  compileComponents(): Promise {\n    return this.compiler.compileComponents();\n  }\n\n  inject(\n    token: ProviderToken,\n    notFoundValue: undefined,\n    options: InjectOptions & {\n      optional: true;\n    },\n  ): T | null;\n  inject(token: ProviderToken, notFoundValue?: T, options?: InjectOptions): T;\n  inject(token: ProviderToken, notFoundValue: null, options?: InjectOptions): T | null;\n  /** @deprecated use object-based flags (`InjectOptions`) instead. */\n  inject(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): T;\n  /** @deprecated use object-based flags (`InjectOptions`) instead. */\n  inject(token: ProviderToken, notFoundValue: null, flags?: InjectFlags): T | null;\n  inject(\n    token: ProviderToken,\n    notFoundValue?: T | null,\n    flags?: InjectFlags | InjectOptions,\n  ): T | null {\n    if ((token as unknown) === TestBed) {\n      return this as any;\n    }\n    const UNDEFINED = {} as unknown as T;\n    const result = this.testModuleRef.injector.get(token, UNDEFINED, convertToBitFlags(flags));\n    return result === UNDEFINED\n      ? (this.compiler.injector.get(token, notFoundValue, flags) as any)\n      : result;\n  }\n\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  get(token: ProviderToken, notFoundValue?: T, flags?: InjectFlags): any;\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  get(token: any, notFoundValue?: any): any;\n  /** @deprecated from v9.0.0 use TestBed.inject */\n  get(\n    token: any,\n    notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n    flags: InjectFlags = InjectFlags.Default,\n  ): any {\n    return this.inject(token, notFoundValue, flags);\n  }\n\n  runInInjectionContext(fn: () => T): T {\n    return runInInjectionContext(this.inject(EnvironmentInjector), fn);\n  }\n\n  execute(tokens: any[], fn: Function, context?: any): any {\n    const params = tokens.map((t) => this.inject(t));\n    return fn.apply(context, params);\n  }\n\n  overrideModule(ngModule: Type, override: MetadataOverride): this {\n    this.assertNotInstantiated('overrideModule', 'override module metadata');\n    this.compiler.overrideModule(ngModule, override);\n    return this;\n  }\n\n  overrideComponent(component: Type, override: MetadataOverride): this {\n    this.assertNotInstantiated('overrideComponent', 'override component metadata');\n    this.compiler.overrideComponent(component, override);\n    return this;\n  }\n\n  overrideTemplateUsingTestingModule(component: Type, template: string): this {\n    this.assertNotInstantiated(\n      'TestBed.overrideTemplateUsingTestingModule',\n      'Cannot override template when the test module has already been instantiated',\n    );\n    this.compiler.overrideTemplateUsingTestingModule(component, template);\n    return this;\n  }\n\n  overrideDirective(directive: Type, override: MetadataOverride): this {\n    this.assertNotInstantiated('overrideDirective', 'override directive metadata');\n    this.compiler.overrideDirective(directive, override);\n    return this;\n  }\n\n  overridePipe(pipe: Type, override: MetadataOverride): this {\n    this.assertNotInstantiated('overridePipe', 'override pipe metadata');\n    this.compiler.overridePipe(pipe, override);\n    return this;\n  }\n\n  /**\n   * Overwrites all providers for the given token with the given provider definition.\n   */\n  overrideProvider(\n    token: any,\n    provider: {useFactory?: Function; useValue?: any; deps?: any[]},\n  ): this {\n    this.assertNotInstantiated('overrideProvider', 'override provider');\n    this.compiler.overrideProvider(token, provider);\n    return this;\n  }\n\n  overrideTemplate(component: Type, template: string): TestBed {\n    return this.overrideComponent(component, {set: {template, templateUrl: null!}});\n  }\n\n  createComponent(type: Type): ComponentFixture {\n    const testComponentRenderer = this.inject(TestComponentRenderer);\n    const rootElId = `root${_nextRootElementId++}`;\n    testComponentRenderer.insertRootElement(rootElId);\n\n    if (getAsyncClassMetadataFn(type)) {\n      throw new Error(\n        `Component '${type.name}' has unresolved metadata. ` +\n          `Please call \\`await TestBed.compileComponents()\\` before running this test.`,\n      );\n    }\n\n    const componentDef = (type as any).ɵcmp;\n\n    if (!componentDef) {\n      throw new Error(`It looks like '${stringify(type)}' has not been compiled.`);\n    }\n\n    const componentFactory = new ComponentFactory(componentDef);\n    const initComponent = () => {\n      const componentRef = componentFactory.create(\n        Injector.NULL,\n        [],\n        `#${rootElId}`,\n        this.testModuleRef,\n      ) as ComponentRef;\n      return this.runInInjectionContext(() => {\n        const isZoneless = this.inject(ZONELESS_ENABLED);\n        const fixture = isZoneless\n          ? new ScheduledComponentFixture(componentRef)\n          : new PseudoApplicationComponentFixture(componentRef);\n        fixture.initialize();\n        return fixture;\n      });\n    };\n    const noNgZone = this.inject(ComponentFixtureNoNgZone, false);\n    const ngZone = noNgZone ? null : this.inject(NgZone, null);\n    const fixture = ngZone ? ngZone.run(initComponent) : initComponent();\n    this._activeFixtures.push(fixture);\n    return fixture;\n  }\n\n  /**\n   * @internal strip this from published d.ts files due to\n   * https://github.com/microsoft/TypeScript/issues/36216\n   */\n  private get compiler(): TestBedCompiler {\n    if (this._compiler === null) {\n      throw new Error(`Need to call TestBed.initTestEnvironment() first`);\n    }\n    return this._compiler;\n  }\n\n  /**\n   * @internal strip this from published d.ts files due to\n   * https://github.com/microsoft/TypeScript/issues/36216\n   */\n  private get testModuleRef(): NgModuleRef {\n    if (this._testModuleRef === null) {\n      this._testModuleRef = this.compiler.finalize();\n    }\n    return this._testModuleRef;\n  }\n\n  private assertNotInstantiated(methodName: string, methodDescription: string) {\n    if (this._testModuleRef !== null) {\n      throw new Error(\n        `Cannot ${methodDescription} when the test module has already been instantiated. ` +\n          `Make sure you are not using \\`inject\\` before \\`${methodName}\\`.`,\n      );\n    }\n  }\n\n  /**\n   * Check whether the module scoping queue should be flushed, and flush it if needed.\n   *\n   * When the TestBed is reset, it clears the JIT module compilation queue, cancelling any\n   * in-progress module compilation. This creates a potential hazard - the very first time the\n   * TestBed is initialized (or if it's reset without being initialized), there may be pending\n   * compilations of modules declared in global scope. These compilations should be finished.\n   *\n   * To ensure that globally declared modules have their components scoped properly, this function\n   * is called whenever TestBed is initialized or reset. The _first_ time that this happens, prior\n   * to any other operations, the scoping queue is flushed.\n   */\n  private checkGlobalCompilationFinished(): void {\n    // Checking _testNgModuleRef is null should not be necessary, but is left in as an additional\n    // guard that compilations queued in tests (after instantiation) are never flushed accidentally.\n    if (!this.globalCompilationChecked && this._testModuleRef === null) {\n      flushModuleScopingQueueAsMuchAsPossible();\n    }\n    this.globalCompilationChecked = true;\n  }\n\n  private destroyActiveFixtures(): void {\n    let errorCount = 0;\n    this._activeFixtures.forEach((fixture) => {\n      try {\n        fixture.destroy();\n      } catch (e) {\n        errorCount++;\n        console.error('Error during cleanup of component', {\n          component: fixture.componentInstance,\n          stacktrace: e,\n        });\n      }\n    });\n    this._activeFixtures = [];\n\n    if (errorCount > 0 && this.shouldRethrowTeardownErrors()) {\n      throw Error(\n        `${errorCount} ${errorCount === 1 ? 'component' : 'components'} ` +\n          `threw errors during cleanup`,\n      );\n    }\n  }\n\n  shouldRethrowTeardownErrors(): boolean {\n    const instanceOptions = this._instanceTeardownOptions;\n    const environmentOptions = TestBedImpl._environmentTeardownOptions;\n\n    // If the new teardown behavior hasn't been configured, preserve the old behavior.\n    if (!instanceOptions && !environmentOptions) {\n      return TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;\n    }\n\n    // Otherwise use the configured behavior or default to rethrowing.\n    return (\n      instanceOptions?.rethrowErrors ??\n      environmentOptions?.rethrowErrors ??\n      this.shouldTearDownTestingModule()\n    );\n  }\n\n  shouldThrowErrorOnUnknownElements(): boolean {\n    // Check if a configuration has been provided to throw when an unknown element is found\n    return (\n      this._instanceErrorOnUnknownElementsOption ??\n      TestBedImpl._environmentErrorOnUnknownElementsOption ??\n      THROW_ON_UNKNOWN_ELEMENTS_DEFAULT\n    );\n  }\n\n  shouldThrowErrorOnUnknownProperties(): boolean {\n    // Check if a configuration has been provided to throw when an unknown property is found\n    return (\n      this._instanceErrorOnUnknownPropertiesOption ??\n      TestBedImpl._environmentErrorOnUnknownPropertiesOption ??\n      THROW_ON_UNKNOWN_PROPERTIES_DEFAULT\n    );\n  }\n\n  shouldTearDownTestingModule(): boolean {\n    return (\n      this._instanceTeardownOptions?.destroyAfterEach ??\n      TestBedImpl._environmentTeardownOptions?.destroyAfterEach ??\n      TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT\n    );\n  }\n\n  getDeferBlockBehavior(): DeferBlockBehavior {\n    return this._instanceDeferBlockBehavior;\n  }\n\n  tearDownTestingModule() {\n    // If the module ref has already been destroyed, we won't be able to get a test renderer.\n    if (this._testModuleRef === null) {\n      return;\n    }\n    // Resolve the renderer ahead of time, because we want to remove the root elements as the very\n    // last step, but the injector will be destroyed as a part of the module ref destruction.\n    const testRenderer = this.inject(TestComponentRenderer);\n    try {\n      this._testModuleRef.destroy();\n    } catch (e) {\n      if (this.shouldRethrowTeardownErrors()) {\n        throw e;\n      } else {\n        console.error('Error during cleanup of a testing module', {\n          component: this._testModuleRef.instance,\n          stacktrace: e,\n        });\n      }\n    } finally {\n      testRenderer.removeAllRootElements?.();\n    }\n  }\n\n  /**\n   * Execute any pending effects.\n   *\n   * @developerPreview\n   */\n  flushEffects(): void {\n    this.inject(EffectScheduler).flush();\n  }\n}\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * `TestBed` is the primary api for writing unit tests for Angular applications and libraries.\n *\n * @publicApi\n */\nexport const TestBed: TestBedStatic = TestBedImpl;\n\n/**\n * Allows injecting dependencies in `beforeEach()` and `it()`. Note: this function\n * (imported from the `@angular/core/testing` package) can **only** be used to inject dependencies\n * in tests. To inject dependencies in your application code, use the [`inject`](api/core/inject)\n * function from the `@angular/core` package instead.\n *\n * Example:\n *\n * ```\n * beforeEach(inject([Dependency, AClass], (dep, object) => {\n *   // some code that uses `dep` and `object`\n *   // ...\n * }));\n *\n * it('...', inject([AClass], (object) => {\n *   object.doSomething();\n *   expect(...);\n * })\n * ```\n *\n * @publicApi\n */\nexport function inject(tokens: any[], fn: Function): () => any {\n  const testBed = TestBedImpl.INSTANCE;\n  // Not using an arrow function to preserve context passed from call site\n  return function (this: unknown) {\n    return testBed.execute(tokens, fn, this);\n  };\n}\n\n/**\n * @publicApi\n */\nexport class InjectSetupWrapper {\n  constructor(private _moduleDef: () => TestModuleMetadata) {}\n\n  private _addModule() {\n    const moduleDef = this._moduleDef();\n    if (moduleDef) {\n      TestBedImpl.configureTestingModule(moduleDef);\n    }\n  }\n\n  inject(tokens: any[], fn: Function): () => any {\n    const self = this;\n    // Not using an arrow function to preserve context passed from call site\n    return function (this: unknown) {\n      self._addModule();\n      return inject(tokens, fn).call(this);\n    };\n  }\n}\n\n/**\n * @publicApi\n */\nexport function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;\nexport function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;\nexport function withModule(\n  moduleDef: TestModuleMetadata,\n  fn?: Function | null,\n): (() => any) | InjectSetupWrapper {\n  if (fn) {\n    // Not using an arrow function to preserve context passed from call site\n    return function (this: unknown) {\n      const testBed = TestBedImpl.INSTANCE;\n      if (moduleDef) {\n        testBed.configureTestingModule(moduleDef);\n      }\n      return fn.apply(this);\n    };\n  }\n  return new InjectSetupWrapper(() => moduleDef);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Public Test Library for unit testing Angular applications. Assumes that you are running\n * with Jasmine, Mocha, or a similar framework which exports a beforeEach function and\n * allows tests to be asynchronous by either returning a promise or using a 'done' parameter.\n */\n\nimport {resetFakeAsyncZoneIfExists} from './fake_async';\nimport {TestBedImpl} from './test_bed';\n\n// Reset the test providers and the fake async zone before each test.\n// We keep a guard because somehow this file can make it into a bundle and be executed\n// beforeEach is only defined when executing the tests\nglobalThis.beforeEach?.(getCleanupHook(false));\n\n// We provide both a `beforeEach` and `afterEach`, because the updated behavior for\n// tearing down the module is supposed to run after the test so that we can associate\n// teardown errors with the correct test.\n// We keep a guard because somehow this file can make it into a bundle and be executed\n// afterEach is only defined when executing the tests\nglobalThis.afterEach?.(getCleanupHook(true));\n\nfunction getCleanupHook(expectedTeardownValue: boolean) {\n  return () => {\n    const testBed = TestBedImpl.INSTANCE;\n    if (testBed.shouldTearDownTestingModule() === expectedTeardownValue) {\n      testBed.resetTestingModule();\n      resetFakeAsyncZoneIfExists();\n    }\n  };\n}\n\n/**\n * This API should be removed. But doing so seems to break `google3` and so it requires a bit of\n * investigation.\n *\n * A work around is to mark it as `@codeGenApi` for now and investigate later.\n *\n * @codeGenApi\n */\n// TODO(iminar): Remove this code in a safe way.\nexport const __core_private_testing_placeholder__ = '';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the core/testing package.\n */\n\nexport * from './async';\nexport {ComponentFixture} from './component_fixture';\nexport {\n  resetFakeAsyncZone,\n  discardPeriodicTasks,\n  fakeAsync,\n  flush,\n  flushMicrotasks,\n  tick,\n} from './fake_async';\nexport {\n  TestBed,\n  getTestBed,\n  TestBedStatic,\n  inject,\n  InjectSetupWrapper,\n  withModule,\n} from './test_bed';\nexport {\n  TestComponentRenderer,\n  ComponentFixtureAutoDetect,\n  ComponentFixtureNoNgZone,\n  TestModuleMetadata,\n  TestEnvironmentOptions,\n  ModuleTeardownOptions,\n} from './test_bed_common';\nexport * from './test_hooks';\nexport * from './metadata_override';\nexport {MetadataOverrider as ɵMetadataOverrider} from './metadata_overrider';\nexport {\n  ɵDeferBlockBehavior as DeferBlockBehavior,\n  ɵDeferBlockState as DeferBlockState,\n} from '@angular/core';\nexport {DeferBlockFixture} from './defer';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// \n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["DeferBlockState","triggerResourceLoading","renderDeferBlockState","CONTAINER_HEADER_OFFSET","getDeferBlocks","DeferBlockBehavior","inject","NoopNgZone","EffectScheduler","PendingTasks","stringify","ReflectionCapabilities","getAsyncClassMetadataFn","USE_RUNTIME_DEPS_TRACKER_FOR_JIT","depsTracker","getInjectableDef","NG_COMP_DEF","NgModuleRef","DEFAULT_LOCALE_ID","setLocaleId","ComponentFactory","compileComponent","NG_DIR_DEF","compileDirective","NG_PIPE_DEF","compilePipe","NG_MOD_DEF","transitiveScopesFor","patchComponentDefWithScope","NG_INJ_DEF","compileNgModuleDefs","internalProvideZoneChangeDetection","ChangeDetectionScheduler","ChangeDetectionSchedulerImpl","DEFER_BLOCK_CONFIG","isEnvironmentProviders","R3NgModuleFactory","convertToBitFlags","setAllowDuplicateNgModuleIdsForTest","resetCompiledComponents","setUnknownElementStrictMode","setUnknownPropertyStrictMode","getUnknownElementStrictMode","getUnknownPropertyStrictMode","ZONELESS_ENABLED","flushModuleScopingQueueAsMuchAsPossible"],"mappings":";;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,YAAY,CAAC,EAAY,EAAA;AACvC,IAAA,MAAM,KAAK,GAAQ,OAAO,IAAI,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7D,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,YAAA;AACL,YAAA,OAAO,OAAO,CAAC,MAAM,CACnB,4EAA4E;AAC1E,gBAAA,yDAAyD,CAC5D,CAAC;AACJ,SAAC,CAAC;KACH;AACD,IAAA,MAAM,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;AAChE,IAAA,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;AACnC,QAAA,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC;KACtB;IACD,OAAO,YAAA;AACL,QAAA,OAAO,O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