{"version":3,"sources":["packages/core/core-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","core","testing","compiler","this","waitForAsync","fn","_Zone","Zone","Promise","reject","asyncTest","__symbol__","ComponentFixture","componentRef","ngZone","_autoDetect","_this","_isStable","_isDestroyed","_resolve","_promise","_onUnstableSubscription","_onStableSubscription","_onMicrotaskEmptySubscription","_onErrorSubscription","changeDetectorRef","elementRef","location","debugElement","getDebugNode","nativeElement","componentInstance","instance","runOutsideAngular","onUnstable","subscribe","next","onMicrotaskEmpty","detectChanges","onStable","scheduleMicroTask","current","hasPendingMacrotasks","onError","error","prototype","_tick","checkNoChanges","run","autoDetectChanges","autoDetect","Error","isStable","whenStable","resolve","res","_getRenderer","undefined","_renderer","injector","get","RendererFactory2","whenRenderingDone","renderer","destroy","unsubscribe","fakeAsyncTestModule","fakeAsyncTestModuleNotLoadedErrorMessage","resetFakeAsyncZone","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","create","__awaiter","thisArg","_arguments","P","generator","fulfilled","value","step","e","rejected","result","done","adopt","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","__values","o","s","m","i","__read","r","ar","__spread","arguments","concat","AsyncTestCompleter","rej","_reject","fail","stackTrace","defineProperty","enumerable","configurable","resolveComponentResources","resourceResolver","componentResolved","urlMap","Map","cachedResourceResolve","url","promise","resp","set","unwrapResponse","componentResourceResolutionQueue","forEach","component","type","promises","templateUrl","template","styleUrls","styles","styleOffset","styleUrl","index","style","splice","indexOf","fullyResolved","all","componentDefResolved","componentDefPendingResolution","delete","clearResolutionOfComponentResourcesQueue","Set","isComponentDefPendingResolution","has","old","response","text","_nextReferenceId","MetadataOverrider","_references","overrideMetadata","metadataClass","oldMetadata","override","props","_valueProps","obj","keys","prop","startsWith","proto","getPrototypeOf","protoProp","desc","getOwnPropertyDescriptor","remove","add","ɵstringify","setMetadata","metadata","removeMetadata","references","removeObjects","_loop_1","removeValue","isArray","_propHashKey","_loop_2","propValue","filter","addMetadata","addValue","propName","JSON","stringify","key","_serializeReference","ref","id","TestingModuleOverride","reflection","ɵReflectionCapabilities","OverrideResolver","overrides","resolved","addOverride","setOverrides","clear","_a","_b","getAnnotation","annotations","annotation","Directive","Component","Pipe","NgModule","overrider_1","DirectiveResolver","_super","ComponentResolver","PipeResolver","NgModuleResolver","R3TestBedCompiler","platform","additionalModuleTypes","originalComponentResolutionQueue","declarations","imports","providers","schemas","pendingComponents","pendingDirectives","pendingPipes","seenComponents","seenDirectives","overriddenModules","existingComponentStyles","resolvers","initResolvers","directive","pipe","componentToModuleScope","initialNgDefs","defCleanupOps","_injector","compilerProviders","providerOverrides","rootProviderOverrides","providerOverridesByModule","providerOverridesByToken","moduleProvidersOverridden","testModuleRef","testModuleType","DynamicTestModule","setCompilerProviders","configureTestingModule","moduleDef","_c","_d","queueTypeArray","DECLARATION","queueTypesFromModulesArray","overrideModule","ngModule","invalidTypeError","name","recompileNgModule","overrideComponent","overrideDirective","overridePipe","overrideProvider","token","provider","providerDef","useFactory","provide","deps","multi","useValue","injectableDef","ɵgetInjectableDef","providedIn","existingOverrides","overrideTemplateUsingTestingModule","def","ɵNG_COMP_DEF","overrideStyleUrls","OVERRIDE_TEMPLATE","compileComponents","resourceLoader_1","clearComponentResolutionQueue","compileTypesSync","ResourceLoader","finalize","compileTestModule","applyTransitiveScopes","applyProviderOverrides","patchComponentsWithExistingStyles","ɵRender3NgModuleRef","ApplicationInitStatus","runInitializers","localeId","LOCALE_ID","ɵDEFAULT_LOCALE_ID","ɵsetLocaleId","_compileNgModuleSync","moduleType","applyProviderOverridesToModule","_compileNgModuleAsync","_getModuleResolver","_getComponentFactories","maybeUnwrapFn","ɵmod","reduce","factories","declaration","componentDef","ɵcmp","ɵRender3ComponentFactory","needsAsyncResources","maybeStoreNgDef","ɵcompileComponent","ɵNG_DIR_DEF","ɵcompileDirective","ɵNG_PIPE_DEF","ɵcompilePipe","size","affectedModules","collectModulesAffectedByOverrides","ɵNG_MOD_DEF","storeFieldOfDefOnType","transitiveCompileScopes","moduleToScope","componentType","moduleScope","isTestingModule","isTestingModuleOverride","ɵtransitiveScopesFor","getScopeOfModule","ɵpatchComponentDefWithScope","maybeApplyOverrides","field","hasProviderOverrides","patchDefWithProviderOverrides","e_1","e_2","injectorDef","ɵNG_INJ_DEF","getOverriddenProviders","imports_1","imports_1_1","importedModule","e_1_1","flatten","object","fieldName","originalValue","e_2_1","arr","e_3","arr_1","arr_1_1","queueType","e_3_1","ɵcompileNgModuleDefs","processedNgModuleDefs","queueTypesFromModulesArrayRecur","e_4","arr_2","arr_2_1","hasNgModuleDef","e_4_1","seenModules","calcAffectedModulesRecur","path","e_5","arr_3","arr_3_1","item","e_5_1","currentDef","defField","restoreComponentResolutionQueue","queue","restoreOriginalState","forEachRight","descriptor","RootScopeModule","NgZone","enableLongStackTrace","Compiler","R3TestCompiler","CompilerModule","COMPILER_OPTIONS","opts","CompilerModuleFactory","ɵNgModuleFactory","getSingleProviderOverrides","getProviderToken","getProviderOverrides","flattenedProviders","overriddenProviders","final","seenOverriddenProviders","unshift","assign","providersResolver","resolver_1","processProvidersFn_1","ngDef","maybeFn","Function","values","mapFn","out","getProviderField","idx","expectedType","testBed","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","ngModuleFactory","componentFactories","ModuleWithComponentFactories","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","meta","TestComponentRenderer","insertRootElement","rootElementId","ComponentFixtureAutoDetect","InjectionToken","ComponentFixtureNoNgZone","_nextRootElementId","TestBedRender3","_compiler","_testModuleRef","_activeFixtures","_globalCompilationChecked","initTestEnvironment","aotSummaries","_getTestBedRender3","resetTestEnvironment","configureCompiler","config","overrideTemplate","inject","notFoundValue","flags","Injector","THROW_IF_NOT_FOUND","InjectFlags","Default","createComponent","resetTestingModule","checkGlobalCompilationFinished","ɵresetCompiledComponents","destroyActiveFixtures","useJit","assertNotInstantiated","UNDEFINED","execute","tokens","context","params","map","testComponentRenderer","rootElId","noNgZone","componentFactory","initComponent","NULL","fixture","methodName","methodDescription","ɵflushModuleScopingQueueAsMuchAsPossible","console","stacktrace","unimplemented","TestingCompiler","loadAotSummaries","summaries","getComponentFactory","getComponentFromError","decorators","Injectable","testBed$1","TestingCompilerFactory","_nextRootElementId$1","TestBedViewEngine","_instantiated","_moduleRef","_moduleFactory","_compilerOptions","_moduleOverrides","_componentOverrides","_directiveOverrides","_pipeOverrides","_providers","_declarations","_imports","_schemas","_testEnvAotSummaries","_aotSummaries","_templateOverrides","_isRoot","_rootProviderOverrides","_getTestBedViewEngine","getTestBed","ɵclearOverrides","_assertNotInstantiated","_createCompilerAndModule","moduleAndComponentFactories","_initIfNeeded","errorCompType","compFactory","templateOf","ɵoverrideComponentView","shouldCoalesceEventChangeDetection","ngZoneInjector","parent","TestBed","entry","rootScopeImports","args","jit","ɵINJECTOR_SCOPE","compilerFactory","createTestingCompiler","overrideProviderImpl","deprecated","dep","depToken","depFlags","Optional","SkipSelf","ɵoverrideProvider","deprecatedBehavior","OverrideComponent","selector","ɵivyEnabled","completer","InjectSetupWrapper","_moduleDef","_addModule","_global","window","beforeEach","__core_private_testing_placeholder__","async","discardPeriodicTasks","fakeAsync","flush","maxTurns","flushMicrotasks","tick","millis","tickOptions","processNewMacroTasksSynchronously","withModule","ɵMetadataOverrider","ɵTestingCompiler","ɵTestingCompilerFactory","ɵangular_packages_core_testing_testing_a","ɵangular_packages_core_testing_testing_b","ɵangular_packages_core_testing_testing_c"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,iBAAkBA,QAAQ,sBAChG,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,wBAAyB,CAAC,UAAW,gBAAiB,qBAAsBJ,GACtGA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAI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QqlB,yCAA2C5H,EAEnD1Y,OAAOiE,eAAehJ,EAAS,aAAc,CAAE+F,OAAO","sourcesContent":["/**\n * @license Angular v11.2.5\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/compiler')) :\n typeof define === 'function' && define.amd ? define('@angular/core/testing', ['exports', '@angular/core', '@angular/compiler'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.core = global.ng.core || {}, global.ng.core.testing = {}), global.ng.core, global.ng.compiler));\n}(this, (function (exports, core, compiler) { 'use strict';\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 * 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 */\n function waitForAsync(fn) {\n var _Zone = typeof Zone !== 'undefined' ? Zone : null;\n if (!_Zone) {\n return function () {\n return Promise.reject('Zone is needed for the waitForAsync() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone.js');\n };\n }\n var asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n return function () {\n return Promise.reject('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/dist/zone-testing.js');\n };\n }\n /**\n * @deprecated use `waitForAsync()`, (expected removal in v12)\n * @see {@link waitForAsync}\n * @publicApi\n * */\n function async(fn) {\n return waitForAsync(fn);\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 * Fixture for debugging and testing a component.\n *\n * @publicApi\n */\n var ComponentFixture = /** @class */ (function () {\n function ComponentFixture(componentRef, ngZone, _autoDetect) {\n var _this = this;\n this.componentRef = componentRef;\n this.ngZone = ngZone;\n this._autoDetect = _autoDetect;\n this._isStable = true;\n this._isDestroyed = false;\n this._resolve = null;\n this._promise = null;\n this._onUnstableSubscription = null;\n this._onStableSubscription = null;\n this._onMicrotaskEmptySubscription = null;\n this._onErrorSubscription = null;\n this.changeDetectorRef = componentRef.changeDetectorRef;\n this.elementRef = componentRef.location;\n this.debugElement = core.getDebugNode(this.elementRef.nativeElement);\n this.componentInstance = componentRef.instance;\n this.nativeElement = this.elementRef.nativeElement;\n this.componentRef = componentRef;\n this.ngZone = ngZone;\n if (ngZone) {\n // Create subscriptions outside the NgZone so that the callbacks run oustide\n // of NgZone.\n ngZone.runOutsideAngular(function () {\n _this._onUnstableSubscription = ngZone.onUnstable.subscribe({\n next: function () {\n _this._isStable = false;\n }\n });\n _this._onMicrotaskEmptySubscription = ngZone.onMicrotaskEmpty.subscribe({\n next: function () {\n if (_this._autoDetect) {\n // Do a change detection run with checkNoChanges set to true to check\n // there are no changes on the second run.\n _this.detectChanges(true);\n }\n }\n });\n _this._onStableSubscription = ngZone.onStable.subscribe({\n next: function () {\n _this._isStable = true;\n // Check whether there is a pending whenStable() completer to resolve.\n if (_this._promise !== null) {\n // If so check whether there are no pending macrotasks before resolving.\n // Do this check in the next tick so that ngZone gets a chance to update the state of\n // pending macrotasks.\n scheduleMicroTask(function () {\n if (!ngZone.hasPendingMacrotasks) {\n if (_this._promise !== null) {\n _this._resolve(true);\n _this._resolve = null;\n _this._promise = null;\n }\n }\n });\n }\n }\n });\n _this._onErrorSubscription = ngZone.onError.subscribe({\n next: function (error) {\n throw error;\n }\n });\n });\n }\n }\n ComponentFixture.prototype._tick = function (checkNoChanges) {\n this.changeDetectorRef.detectChanges();\n if (checkNoChanges) {\n this.checkNoChanges();\n }\n };\n /**\n * Trigger a change detection cycle for the component.\n */\n ComponentFixture.prototype.detectChanges = function (checkNoChanges) {\n var _this = this;\n if (checkNoChanges === void 0) { checkNoChanges = true; }\n if (this.ngZone != null) {\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(function () {\n _this._tick(checkNoChanges);\n });\n }\n else {\n // Running without zone. Just do the change detection.\n this._tick(checkNoChanges);\n }\n };\n /**\n * Do a change detection run to make sure there were no changes.\n */\n ComponentFixture.prototype.checkNoChanges = function () {\n this.changeDetectorRef.checkNoChanges();\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 ComponentFixture.prototype.autoDetectChanges = function (autoDetect) {\n if (autoDetect === void 0) { autoDetect = true; }\n if (this.ngZone == null) {\n throw new Error('Cannot call autoDetectChanges when ComponentFixtureNoNgZone is set');\n }\n this._autoDetect = autoDetect;\n this.detectChanges();\n };\n /**\n * Return whether the fixture is currently stable or has async tasks that have not been completed\n * yet.\n */\n ComponentFixture.prototype.isStable = function () {\n return this._isStable && !this.ngZone.hasPendingMacrotasks;\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 ComponentFixture.prototype.whenStable = function () {\n var _this = this;\n if (this.isStable()) {\n return Promise.resolve(false);\n }\n else if (this._promise !== null) {\n return this._promise;\n }\n else {\n this._promise = new Promise(function (res) {\n _this._resolve = res;\n });\n return this._promise;\n }\n };\n ComponentFixture.prototype._getRenderer = function () {\n if (this._renderer === undefined) {\n this._renderer = this.componentRef.injector.get(core.RendererFactory2, null);\n }\n return this._renderer;\n };\n /**\n * Get a promise that resolves when the ui state is stable following animations.\n */\n ComponentFixture.prototype.whenRenderingDone = function () {\n var renderer = this._getRenderer();\n if (renderer && renderer.whenRenderingDone) {\n return renderer.whenRenderingDone();\n }\n return this.whenStable();\n };\n /**\n * Trigger component destruction.\n */\n ComponentFixture.prototype.destroy = function () {\n if (!this._isDestroyed) {\n this.componentRef.destroy();\n if (this._onUnstableSubscription != null) {\n this._onUnstableSubscription.unsubscribe();\n this._onUnstableSubscription = null;\n }\n if (this._onStableSubscription != null) {\n this._onStableSubscription.unsubscribe();\n this._onStableSubscription = null;\n }\n if (this._onMicrotaskEmptySubscription != null) {\n this._onMicrotaskEmptySubscription.unsubscribe();\n this._onMicrotaskEmptySubscription = null;\n }\n if (this._onErrorSubscription != null) {\n this._onErrorSubscription.unsubscribe();\n this._onErrorSubscription = null;\n }\n this._isDestroyed = true;\n }\n };\n return ComponentFixture;\n }());\n function scheduleMicroTask(fn) {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\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 var _Zone = typeof Zone !== 'undefined' ? Zone : null;\n var fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];\n var 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/dist/zone-testing.js\";\n /**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @publicApi\n */\n function resetFakeAsyncZone() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.resetFakeAsyncZone();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\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 will be thrown.\n *\n * Can be used to wrap inject() calls.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns The function wrapped to be executed in the fakeAsync zone\n *\n * @publicApi\n */\n function fakeAsync(fn) {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.fakeAsync(fn);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\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 * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param millis, the number of millisecond to advance the virtual timer\n * @param tickOptions, the options of tick with a flag called\n * processNewMacroTasksSynchronously, whether to invoke the new macroTasks, by default is\n * false, means the new macroTasks will be invoked\n *\n * For example,\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 * in this case, we have a nested timeout (new macroTask), when we tick, both the\n * funcWithNestedTimeout and the nested timeout both will be invoked.\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 * if we pass the tickOptions with processNewMacroTasksSynchronously to be false, the nested timeout\n * will not be invoked.\n *\n *\n * @publicApi\n */\n function tick(millis, tickOptions) {\n if (millis === void 0) { millis = 0; }\n if (tickOptions === void 0) { tickOptions = {\n processNewMacroTasksSynchronously: true\n }; }\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis, tickOptions);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n }\n /**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by\n * draining the macrotask queue until it is empty. The returned value is the milliseconds\n * of time that would have been elapsed.\n *\n * @param maxTurns\n * @returns The simulated time elapsed, in millis.\n *\n * @publicApi\n */\n function flush(maxTurns) {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flush(maxTurns);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n }\n /**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\n function discardPeriodicTasks() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n }\n /**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\n function flushMicrotasks() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n }\n\n /*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */\n /* global Reflect, Promise */\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b)\n if (b.hasOwnProperty(p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n }\n var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n function __rest(s, e) {\n var t = {};\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n }\n function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\")\n r = Reflect.decorate(decorators, target, key, desc);\n else\n for (var i = decorators.length - 1; i >= 0; i--)\n if (d = decorators[i])\n r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n }\n function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); };\n }\n function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\")\n return Reflect.metadata(metadataKey, metadataValue);\n }\n function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try {\n step(generator.next(value));\n }\n catch (e) {\n reject(e);\n } }\n function rejected(value) { try {\n step(generator[\"throw\"](value));\n }\n catch (e) {\n reject(e);\n } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n }\n function __generator(thisArg, body) {\n var _ = { label: 0, sent: function () { if (t[0] & 1)\n throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f)\n throw new TypeError(\"Generator is already executing.\");\n while (_)\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)\n return t;\n if (y = 0, t)\n op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return { value: op[1], done: false };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2])\n _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n }\n catch (e) {\n op = [6, e];\n y = 0;\n }\n finally {\n f = t = 0;\n }\n if (op[0] & 5)\n throw op[1];\n return { value: op[0] ? op[1] : void 0, done: true };\n }\n }\n var __createBinding = Object.create ? (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });\n }) : (function (o, m, k, k2) {\n if (k2 === undefined)\n k2 = k;\n o[k2] = m[k];\n });\n function __exportStar(m, exports) {\n for (var p in m)\n if (p !== \"default\" && !exports.hasOwnProperty(p))\n __createBinding(exports, m, p);\n }\n function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m)\n return m.call(o);\n if (o && typeof o.length === \"number\")\n return {\n next: function () {\n if (o && i >= o.length)\n o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n }\n function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m)\n return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done)\n ar.push(r.value);\n }\n catch (error) {\n e = { error: error };\n }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"]))\n m.call(i);\n }\n finally {\n if (e)\n throw e.error;\n }\n }\n return ar;\n }\n function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n }\n function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n }\n ;\n function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n }\n function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n])\n i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try {\n step(g[n](v));\n }\n catch (e) {\n settle(q[0][3], e);\n } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length)\n resume(q[0][0], q[0][1]); }\n }\n function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\n }\n function __asyncValues(o) {\n if (!Symbol.asyncIterator)\n throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }\n }\n function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", { value: raw });\n }\n else {\n cooked.raw = raw;\n }\n return cooked;\n }\n ;\n var __setModuleDefault = Object.create ? (function (o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n }) : function (o, v) {\n o[\"default\"] = v;\n };\n function __importStar(mod) {\n if (mod && mod.__esModule)\n return mod;\n var result = {};\n if (mod != null)\n for (var k in mod)\n if (Object.hasOwnProperty.call(mod, k))\n __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n }\n function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n }\n function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\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 * Injectable completer that allows signaling completion of an asynchronous test. Used internally.\n */\n var AsyncTestCompleter = /** @class */ (function () {\n function AsyncTestCompleter() {\n var _this = this;\n this._promise = new Promise(function (res, rej) {\n _this._resolve = res;\n _this._reject = rej;\n });\n }\n AsyncTestCompleter.prototype.done = function (value) {\n this._resolve(value);\n };\n AsyncTestCompleter.prototype.fail = function (error, stackTrace) {\n this._reject(error);\n };\n Object.defineProperty(AsyncTestCompleter.prototype, \"promise\", {\n get: function () {\n return this._promise;\n },\n enumerable: false,\n configurable: true\n });\n return AsyncTestCompleter;\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 * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\n function resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n var componentResolved = [];\n // Cache so that we don't fetch the same resource more than once.\n var urlMap = new Map();\n function cachedResourceResolve(url) {\n var promise = urlMap.get(url);\n if (!promise) {\n var resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach(function (component, type) {\n var promises = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then(function (template) {\n component.template = template;\n }));\n }\n var styleUrls = component.styleUrls;\n var styles = component.styles || (component.styles = []);\n var styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach(function (styleUrl, index) {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then(function (style) {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n var fullyResolved = Promise.all(promises).then(function () { return componentDefResolved(type); });\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(function () { return undefined; });\n }\n var componentResourceResolutionQueue = new Map();\n // Track when existing ɵcmp for a Type is waiting on resources.\n var componentDefPendingResolution = new Set();\n function maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n }\n function isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n }\n function componentNeedsResolution(component) {\n return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n }\n function clearResolutionOfComponentResourcesQueue() {\n var old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n }\n function restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach(function (_, type) { return componentDefPendingResolution.add(type); });\n componentResourceResolutionQueue = queue;\n }\n function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n }\n function unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n }\n function componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\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 var _nextReferenceId = 0;\n var MetadataOverrider = /** @class */ (function () {\n function MetadataOverrider() {\n this._references = new Map();\n }\n /**\n * Creates a new instance for the given metadata class\n * based on an old instance and overrides.\n */\n MetadataOverrider.prototype.overrideMetadata = function (metadataClass, oldMetadata, override) {\n var props = {};\n if (oldMetadata) {\n _valueProps(oldMetadata).forEach(function (prop) { return props[prop] = oldMetadata[prop]; });\n }\n if (override.set) {\n if (override.remove || override.add) {\n throw new Error(\"Cannot set and add/remove \" + core.ɵ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 return MetadataOverrider;\n }());\n function removeMetadata(metadata, remove, references) {\n var removeObjects = new Set();\n var _loop_1 = function (prop) {\n var removeValue = remove[prop];\n if (Array.isArray(removeValue)) {\n removeValue.forEach(function (value) {\n removeObjects.add(_propHashKey(prop, value, references));\n });\n }\n else {\n removeObjects.add(_propHashKey(prop, removeValue, references));\n }\n };\n for (var prop in remove) {\n _loop_1(prop);\n }\n var _loop_2 = function (prop) {\n var propValue = metadata[prop];\n if (Array.isArray(propValue)) {\n metadata[prop] = propValue.filter(function (value) { return !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 for (var prop in metadata) {\n _loop_2(prop);\n }\n }\n function addMetadata(metadata, add) {\n for (var prop in add) {\n var addValue = add[prop];\n var propValue = metadata[prop];\n if (propValue != null && Array.isArray(propValue)) {\n metadata[prop] = propValue.concat(addValue);\n }\n else {\n metadata[prop] = addValue;\n }\n }\n }\n function setMetadata(metadata, set) {\n for (var prop in set) {\n metadata[prop] = set[prop];\n }\n }\n function _propHashKey(propName, propValue, references) {\n var replacer = function (key, value) {\n if (typeof value === 'function') {\n value = _serializeReference(value, references);\n }\n return value;\n };\n return propName + \":\" + JSON.stringify(propValue, replacer);\n }\n function _serializeReference(ref, references) {\n var id = references.get(ref);\n if (!id) {\n id = \"\" + core.ɵstringify(ref) + _nextReferenceId++;\n references.set(ref, id);\n }\n return id;\n }\n function _valueProps(obj) {\n var props = [];\n // regular public props\n Object.keys(obj).forEach(function (prop) {\n if (!prop.startsWith('_')) {\n props.push(prop);\n }\n });\n // getters\n var proto = obj;\n while (proto = Object.getPrototypeOf(proto)) {\n Object.keys(proto).forEach(function (protoProp) {\n var 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 var reflection = new core.ɵReflectionCapabilities();\n /**\n * Allows to override ivy metadata for tests (via the `TestBed`).\n */\n var OverrideResolver = /** @class */ (function () {\n function OverrideResolver() {\n this.overrides = new Map();\n this.resolved = new Map();\n }\n OverrideResolver.prototype.addOverride = function (type, override) {\n var overrides = this.overrides.get(type) || [];\n overrides.push(override);\n this.overrides.set(type, overrides);\n this.resolved.delete(type);\n };\n OverrideResolver.prototype.setOverrides = function (overrides) {\n var _this = this;\n this.overrides.clear();\n overrides.forEach(function (_a) {\n var _b = __read(_a, 2), type = _b[0], override = _b[1];\n _this.addOverride(type, override);\n });\n };\n OverrideResolver.prototype.getAnnotation = function (type) {\n var 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 (var i = annotations.length - 1; i >= 0; i--) {\n var annotation = annotations[i];\n var isKnownType = annotation instanceof core.Directive || annotation instanceof core.Component ||\n annotation instanceof core.Pipe || annotation instanceof core.NgModule;\n if (isKnownType) {\n return annotation instanceof this.type ? annotation : null;\n }\n }\n return null;\n };\n OverrideResolver.prototype.resolve = function (type) {\n var _this = this;\n var resolved = this.resolved.get(type) || null;\n if (!resolved) {\n resolved = this.getAnnotation(type);\n if (resolved) {\n var overrides = this.overrides.get(type);\n if (overrides) {\n var overrider_1 = new MetadataOverrider();\n overrides.forEach(function (override) {\n resolved = overrider_1.overrideMetadata(_this.type, resolved, override);\n });\n }\n }\n this.resolved.set(type, resolved);\n }\n return resolved;\n };\n return OverrideResolver;\n }());\n var DirectiveResolver = /** @class */ (function (_super) {\n __extends(DirectiveResolver, _super);\n function DirectiveResolver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(DirectiveResolver.prototype, \"type\", {\n get: function () {\n return core.Directive;\n },\n enumerable: false,\n configurable: true\n });\n return DirectiveResolver;\n }(OverrideResolver));\n var ComponentResolver = /** @class */ (function (_super) {\n __extends(ComponentResolver, _super);\n function ComponentResolver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ComponentResolver.prototype, \"type\", {\n get: function () {\n return core.Component;\n },\n enumerable: false,\n configurable: true\n });\n return ComponentResolver;\n }(OverrideResolver));\n var PipeResolver = /** @class */ (function (_super) {\n __extends(PipeResolver, _super);\n function PipeResolver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(PipeResolver.prototype, \"type\", {\n get: function () {\n return core.Pipe;\n },\n enumerable: false,\n configurable: true\n });\n return PipeResolver;\n }(OverrideResolver));\n var NgModuleResolver = /** @class */ (function (_super) {\n __extends(NgModuleResolver, _super);\n function NgModuleResolver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(NgModuleResolver.prototype, \"type\", {\n get: function () {\n return core.NgModule;\n },\n enumerable: false,\n configurable: true\n });\n return NgModuleResolver;\n }(OverrideResolver));\n\n var TestingModuleOverride;\n (function (TestingModuleOverride) {\n TestingModuleOverride[TestingModuleOverride[\"DECLARATION\"] = 0] = \"DECLARATION\";\n TestingModuleOverride[TestingModuleOverride[\"OVERRIDE_TEMPLATE\"] = 1] = \"OVERRIDE_TEMPLATE\";\n })(TestingModuleOverride || (TestingModuleOverride = {}));\n function isTestingModuleOverride(value) {\n return value === TestingModuleOverride.DECLARATION ||\n value === TestingModuleOverride.OVERRIDE_TEMPLATE;\n }\n var R3TestBedCompiler = /** @class */ (function () {\n function R3TestBedCompiler(platform, additionalModuleTypes) {\n this.platform = platform;\n this.additionalModuleTypes = additionalModuleTypes;\n this.originalComponentResolutionQueue = null;\n // Testing module configuration\n this.declarations = [];\n this.imports = [];\n this.providers = [];\n this.schemas = [];\n // Queues of components/directives/pipes that should be recompiled.\n this.pendingComponents = new Set();\n this.pendingDirectives = new Set();\n this.pendingPipes = new Set();\n // Keep track of all components and directives, so we can patch Providers onto defs later.\n this.seenComponents = new Set();\n this.seenDirectives = new Set();\n // Keep track of overridden modules, so that we can collect all affected ones in the module tree.\n this.overriddenModules = new Set();\n // Store resolved styles for Components that have template overrides present and `styleUrls`\n // defined at the same time.\n this.existingComponentStyles = new Map();\n this.resolvers = initResolvers();\n this.componentToModuleScope = new Map();\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 // TODO: we should support the case with multiple defs on a type\n this.initialNgDefs = new Map();\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 this.defCleanupOps = [];\n this._injector = null;\n this.compilerProviders = null;\n this.providerOverrides = [];\n this.rootProviderOverrides = [];\n // Overrides for injectables with `{providedIn: SomeModule}` need to be tracked and added to that\n // module's provider list.\n this.providerOverridesByModule = new Map();\n this.providerOverridesByToken = new Map();\n this.moduleProvidersOverridden = new Set();\n this.testModuleRef = null;\n var DynamicTestModule = /** @class */ (function () {\n function DynamicTestModule() {\n }\n return DynamicTestModule;\n }());\n this.testModuleType = DynamicTestModule;\n }\n R3TestBedCompiler.prototype.setCompilerProviders = function (providers) {\n this.compilerProviders = providers;\n this._injector = null;\n };\n R3TestBedCompiler.prototype.configureTestingModule = function (moduleDef) {\n var _a, _b, _c, _d;\n // Enqueue any compilation tasks for the directly declared component.\n if (moduleDef.declarations !== undefined) {\n this.queueTypeArray(moduleDef.declarations, TestingModuleOverride.DECLARATION);\n (_a = this.declarations).push.apply(_a, __spread(moduleDef.declarations));\n }\n // Enqueue any compilation tasks for imported modules.\n if (moduleDef.imports !== undefined) {\n this.queueTypesFromModulesArray(moduleDef.imports);\n (_b = this.imports).push.apply(_b, __spread(moduleDef.imports));\n }\n if (moduleDef.providers !== undefined) {\n (_c = this.providers).push.apply(_c, __spread(moduleDef.providers));\n }\n if (moduleDef.schemas !== undefined) {\n (_d = this.schemas).push.apply(_d, __spread(moduleDef.schemas));\n }\n };\n R3TestBedCompiler.prototype.overrideModule = function (ngModule, override) {\n this.overriddenModules.add(ngModule);\n // Compile the module right away.\n this.resolvers.module.addOverride(ngModule, override);\n var metadata = this.resolvers.module.resolve(ngModule);\n if (metadata === null) {\n throw invalidTypeError(ngModule.name, 'NgModule');\n }\n this.recompileNgModule(ngModule, metadata);\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 R3TestBedCompiler.prototype.overrideComponent = function (component, override) {\n this.resolvers.component.addOverride(component, override);\n this.pendingComponents.add(component);\n };\n R3TestBedCompiler.prototype.overrideDirective = function (directive, override) {\n this.resolvers.directive.addOverride(directive, override);\n this.pendingDirectives.add(directive);\n };\n R3TestBedCompiler.prototype.overridePipe = function (pipe, override) {\n this.resolvers.pipe.addOverride(pipe, override);\n this.pendingPipes.add(pipe);\n };\n R3TestBedCompiler.prototype.overrideProvider = function (token, provider) {\n var providerDef;\n if (provider.useFactory !== undefined) {\n providerDef = {\n provide: token,\n useFactory: provider.useFactory,\n deps: provider.deps || [],\n multi: provider.multi\n };\n }\n else if (provider.useValue !== undefined) {\n providerDef = { provide: token, useValue: provider.useValue, multi: provider.multi };\n }\n else {\n providerDef = { provide: token };\n }\n var injectableDef = typeof token !== 'string' ? core.ɵgetInjectableDef(token) : null;\n var isRoot = injectableDef !== null && injectableDef.providedIn === 'root';\n var overridesBucket = isRoot ? this.rootProviderOverrides : this.providerOverrides;\n overridesBucket.push(providerDef);\n // Keep overrides grouped by token as well for fast lookups using token\n this.providerOverridesByToken.set(token, providerDef);\n if (injectableDef !== null && injectableDef.providedIn !== null &&\n typeof injectableDef.providedIn !== 'string') {\n var existingOverrides = this.providerOverridesByModule.get(injectableDef.providedIn);\n if (existingOverrides !== undefined) {\n existingOverrides.push(providerDef);\n }\n else {\n this.providerOverridesByModule.set(injectableDef.providedIn, [providerDef]);\n }\n }\n };\n R3TestBedCompiler.prototype.overrideTemplateUsingTestingModule = function (type, template) {\n var _this = this;\n var def = type[core.ɵNG_COMP_DEF];\n var hasStyleUrls = function () {\n var metadata = _this.resolvers.component.resolve(type);\n return !!metadata.styleUrls && metadata.styleUrls.length > 0;\n };\n var overrideStyleUrls = !!def && !isComponentDefPendingResolution(type) && hasStyleUrls();\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 var override = overrideStyleUrls ? { template: template, styles: [], styleUrls: [] } : { template: template };\n this.overrideComponent(type, { set: override });\n if (overrideStyleUrls && def.styles && def.styles.length > 0) {\n this.existingComponentStyles.set(type, def.styles);\n }\n // Set the component's scope to be the testing module.\n this.componentToModuleScope.set(type, TestingModuleOverride.OVERRIDE_TEMPLATE);\n };\n R3TestBedCompiler.prototype.compileComponents = function () {\n return __awaiter(this, void 0, void 0, function () {\n var needsAsyncResources, resourceLoader_1, resolver;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.clearComponentResolutionQueue();\n needsAsyncResources = this.compileTypesSync();\n if (!needsAsyncResources) return [3 /*break*/, 2];\n resolver = function (url) {\n if (!resourceLoader_1) {\n resourceLoader_1 = _this.injector.get(compiler.ResourceLoader);\n }\n return Promise.resolve(resourceLoader_1.get(url));\n };\n return [4 /*yield*/, resolveComponentResources(resolver)];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n };\n R3TestBedCompiler.prototype.finalize = function () {\n // One last compile\n this.compileTypesSync();\n // Create the testing module itself.\n this.compileTestModule();\n this.applyTransitiveScopes();\n this.applyProviderOverrides();\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 // Clear the componentToModuleScope map, so that future compilations don't reset the scope of\n // every component.\n this.componentToModuleScope.clear();\n var parentInjector = this.platform.injector;\n this.testModuleRef = new core.ɵRender3NgModuleRef(this.testModuleType, parentInjector);\n // ApplicationInitStatus.runInitializers() is marked @internal to core.\n // Cast it to any before accessing it.\n this.testModuleRef.injector.get(core.ApplicationInitStatus).runInitializers();\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 var localeId = this.testModuleRef.injector.get(core.LOCALE_ID, core.ɵDEFAULT_LOCALE_ID);\n core.ɵsetLocaleId(localeId);\n return this.testModuleRef;\n };\n /**\n * @internal\n */\n R3TestBedCompiler.prototype._compileNgModuleSync = function (moduleType) {\n this.queueTypesFromModulesArray([moduleType]);\n this.compileTypesSync();\n this.applyProviderOverrides();\n this.applyProviderOverridesToModule(moduleType);\n this.applyTransitiveScopes();\n };\n /**\n * @internal\n */\n R3TestBedCompiler.prototype._compileNgModuleAsync = function (moduleType) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.queueTypesFromModulesArray([moduleType]);\n return [4 /*yield*/, this.compileComponents()];\n case 1:\n _a.sent();\n this.applyProviderOverrides();\n this.applyProviderOverridesToModule(moduleType);\n this.applyTransitiveScopes();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @internal\n */\n R3TestBedCompiler.prototype._getModuleResolver = function () {\n return this.resolvers.module;\n };\n /**\n * @internal\n */\n R3TestBedCompiler.prototype._getComponentFactories = function (moduleType) {\n var _this = this;\n return maybeUnwrapFn(moduleType.ɵmod.declarations).reduce(function (factories, declaration) {\n var componentDef = declaration.ɵcmp;\n componentDef && factories.push(new core.ɵRender3ComponentFactory(componentDef, _this.testModuleRef));\n return factories;\n }, []);\n };\n R3TestBedCompiler.prototype.compileTypesSync = function () {\n var _this = this;\n // Compile all queued components, directives, pipes.\n var needsAsyncResources = false;\n this.pendingComponents.forEach(function (declaration) {\n needsAsyncResources = needsAsyncResources || isComponentDefPendingResolution(declaration);\n var metadata = _this.resolvers.component.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Component');\n }\n _this.maybeStoreNgDef(core.ɵNG_COMP_DEF, declaration);\n core.ɵcompileComponent(declaration, metadata);\n });\n this.pendingComponents.clear();\n this.pendingDirectives.forEach(function (declaration) {\n var metadata = _this.resolvers.directive.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Directive');\n }\n _this.maybeStoreNgDef(core.ɵNG_DIR_DEF, declaration);\n core.ɵcompileDirective(declaration, metadata);\n });\n this.pendingDirectives.clear();\n this.pendingPipes.forEach(function (declaration) {\n var metadata = _this.resolvers.pipe.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Pipe');\n }\n _this.maybeStoreNgDef(core.ɵNG_PIPE_DEF, declaration);\n core.ɵcompilePipe(declaration, metadata);\n });\n this.pendingPipes.clear();\n return needsAsyncResources;\n };\n R3TestBedCompiler.prototype.applyTransitiveScopes = function () {\n var _this = this;\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-calculatation.\n var testingModuleDef = this.testModuleType[core.ɵNG_MOD_DEF];\n var affectedModules = this.collectModulesAffectedByOverrides(testingModuleDef.imports);\n if (affectedModules.size > 0) {\n affectedModules.forEach(function (moduleType) {\n _this.storeFieldOfDefOnType(moduleType, core.ɵNG_MOD_DEF, 'transitiveCompileScopes');\n moduleType[core.ɵNG_MOD_DEF].transitiveCompileScopes = null;\n });\n }\n }\n var moduleToScope = new Map();\n var getScopeOfModule = function (moduleType) {\n if (!moduleToScope.has(moduleType)) {\n var isTestingModule = isTestingModuleOverride(moduleType);\n var realType = isTestingModule ? _this.testModuleType : moduleType;\n moduleToScope.set(moduleType, core.ɵtransitiveScopesFor(realType));\n }\n return moduleToScope.get(moduleType);\n };\n this.componentToModuleScope.forEach(function (moduleType, componentType) {\n var moduleScope = getScopeOfModule(moduleType);\n _this.storeFieldOfDefOnType(componentType, core.ɵNG_COMP_DEF, 'directiveDefs');\n _this.storeFieldOfDefOnType(componentType, core.ɵNG_COMP_DEF, 'pipeDefs');\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 _this.storeFieldOfDefOnType(componentType, core.ɵNG_COMP_DEF, 'tView');\n core.ɵpatchComponentDefWithScope(componentType.ɵcmp, moduleScope);\n });\n this.componentToModuleScope.clear();\n };\n R3TestBedCompiler.prototype.applyProviderOverrides = function () {\n var _this = this;\n var maybeApplyOverrides = function (field) { return function (type) {\n var resolver = field === core.ɵNG_COMP_DEF ? _this.resolvers.component : _this.resolvers.directive;\n var metadata = resolver.resolve(type);\n if (_this.hasProviderOverrides(metadata.providers)) {\n _this.patchDefWithProviderOverrides(type, field);\n }\n }; };\n this.seenComponents.forEach(maybeApplyOverrides(core.ɵNG_COMP_DEF));\n this.seenDirectives.forEach(maybeApplyOverrides(core.ɵNG_DIR_DEF));\n this.seenComponents.clear();\n this.seenDirectives.clear();\n };\n R3TestBedCompiler.prototype.applyProviderOverridesToModule = function (moduleType) {\n var e_1, _a, e_2, _b;\n if (this.moduleProvidersOverridden.has(moduleType)) {\n return;\n }\n this.moduleProvidersOverridden.add(moduleType);\n var injectorDef = moduleType[core.ɵNG_INJ_DEF];\n if (this.providerOverridesByToken.size > 0) {\n var providers = __spread(injectorDef.providers, (this.providerOverridesByModule.get(moduleType) || []));\n if (this.hasProviderOverrides(providers)) {\n this.maybeStoreNgDef(core.ɵNG_INJ_DEF, moduleType);\n this.storeFieldOfDefOnType(moduleType, core.ɵNG_INJ_DEF, 'providers');\n injectorDef.providers = this.getOverriddenProviders(providers);\n }\n // Apply provider overrides to imported modules recursively\n var moduleDef = moduleType[core.ɵNG_MOD_DEF];\n var imports = maybeUnwrapFn(moduleDef.imports);\n try {\n for (var imports_1 = __values(imports), imports_1_1 = imports_1.next(); !imports_1_1.done; imports_1_1 = imports_1.next()) {\n var importedModule = imports_1_1.value;\n this.applyProviderOverridesToModule(importedModule);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (imports_1_1 && !imports_1_1.done && (_a = imports_1.return)) _a.call(imports_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n // Also override the providers on any ModuleWithProviders imports since those don't appear in\n // the moduleDef.\n for (var _c = __values(flatten(injectorDef.imports)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var importedModule = _d.value;\n if (isModuleWithProviders(importedModule)) {\n this.defCleanupOps.push({\n object: importedModule,\n fieldName: 'providers',\n originalValue: importedModule.providers\n });\n importedModule.providers = this.getOverriddenProviders(importedModule.providers);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n };\n R3TestBedCompiler.prototype.patchComponentsWithExistingStyles = function () {\n this.existingComponentStyles.forEach(function (styles, type) { return type[core.ɵNG_COMP_DEF].styles = styles; });\n this.existingComponentStyles.clear();\n };\n R3TestBedCompiler.prototype.queueTypeArray = function (arr, moduleType) {\n var e_3, _a;\n try {\n for (var arr_1 = __values(arr), arr_1_1 = arr_1.next(); !arr_1_1.done; arr_1_1 = arr_1.next()) {\n var value = arr_1_1.value;\n if (Array.isArray(value)) {\n this.queueTypeArray(value, moduleType);\n }\n else {\n this.queueType(value, moduleType);\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (arr_1_1 && !arr_1_1.done && (_a = arr_1.return)) _a.call(arr_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n R3TestBedCompiler.prototype.recompileNgModule = function (ngModule, metadata) {\n // Cache the initial ngModuleDef as it will be overwritten.\n this.maybeStoreNgDef(core.ɵNG_MOD_DEF, ngModule);\n this.maybeStoreNgDef(core.ɵNG_INJ_DEF, ngModule);\n core.ɵcompileNgModuleDefs(ngModule, metadata);\n };\n R3TestBedCompiler.prototype.queueType = function (type, moduleType) {\n var 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(core.ɵNG_COMP_DEF)) {\n this.pendingComponents.add(type);\n }\n this.seenComponents.add(type);\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 (!this.componentToModuleScope.has(type) ||\n this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION) {\n this.componentToModuleScope.set(type, moduleType);\n }\n return;\n }\n var directive = this.resolvers.directive.resolve(type);\n if (directive) {\n if (!type.hasOwnProperty(core.ɵNG_DIR_DEF)) {\n this.pendingDirectives.add(type);\n }\n this.seenDirectives.add(type);\n return;\n }\n var pipe = this.resolvers.pipe.resolve(type);\n if (pipe && !type.hasOwnProperty(core.ɵNG_PIPE_DEF)) {\n this.pendingPipes.add(type);\n return;\n }\n };\n R3TestBedCompiler.prototype.queueTypesFromModulesArray = function (arr) {\n var _this = this;\n // Because we may encounter the same NgModule while processing the imports and exports of an\n // NgModule tree, we cache them in this set so we can skip ones that have already been seen\n // encountered. In some test setups, this caching resulted in 10X runtime improvement.\n var processedNgModuleDefs = new Set();\n var queueTypesFromModulesArrayRecur = function (arr) {\n var e_4, _a;\n try {\n for (var arr_2 = __values(arr), arr_2_1 = arr_2.next(); !arr_2_1.done; arr_2_1 = arr_2.next()) {\n var value = arr_2_1.value;\n if (Array.isArray(value)) {\n queueTypesFromModulesArrayRecur(value);\n }\n else if (hasNgModuleDef(value)) {\n var def = value.ɵmod;\n if (processedNgModuleDefs.has(def)) {\n continue;\n }\n processedNgModuleDefs.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 }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (arr_2_1 && !arr_2_1.done && (_a = arr_2.return)) _a.call(arr_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n };\n queueTypesFromModulesArrayRecur(arr);\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 R3TestBedCompiler.prototype.collectModulesAffectedByOverrides = function (arr) {\n var _this = this;\n var seenModules = new Set();\n var affectedModules = new Set();\n var calcAffectedModulesRecur = function (arr, path) {\n var e_5, _a;\n try {\n for (var arr_3 = __values(arr), arr_3_1 = arr_3.next(); !arr_3_1.done; arr_3_1 = arr_3.next()) {\n var value = arr_3_1.value;\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 }\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(function (item) { return affectedModules.add(item); });\n }\n continue;\n }\n seenModules.add(value);\n if (_this.overriddenModules.has(value)) {\n path.forEach(function (item) { return affectedModules.add(item); });\n }\n // Examine module imports recursively to look for overridden modules.\n var moduleDef = value[core.ɵNG_MOD_DEF];\n calcAffectedModulesRecur(maybeUnwrapFn(moduleDef.imports), path.concat(value));\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (arr_3_1 && !arr_3_1.done && (_a = arr_3.return)) _a.call(arr_3);\n }\n finally { if (e_5) throw e_5.error; }\n }\n };\n calcAffectedModulesRecur(arr, []);\n return affectedModules;\n };\n R3TestBedCompiler.prototype.maybeStoreNgDef = function (prop, type) {\n if (!this.initialNgDefs.has(type)) {\n var currentDef = Object.getOwnPropertyDescriptor(type, prop);\n this.initialNgDefs.set(type, [prop, currentDef]);\n }\n };\n R3TestBedCompiler.prototype.storeFieldOfDefOnType = function (type, defField, fieldName) {\n var def = type[defField];\n var originalValue = def[fieldName];\n this.defCleanupOps.push({ object: def, fieldName: fieldName, originalValue: originalValue });\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 R3TestBedCompiler.prototype.clearComponentResolutionQueue = function () {\n var _this = this;\n if (this.originalComponentResolutionQueue === null) {\n this.originalComponentResolutionQueue = new Map();\n }\n clearResolutionOfComponentResourcesQueue().forEach(function (value, key) { return _this.originalComponentResolutionQueue.set(key, value); });\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 R3TestBedCompiler.prototype.restoreComponentResolutionQueue = function () {\n if (this.originalComponentResolutionQueue !== null) {\n restoreComponentResolutionQueue(this.originalComponentResolutionQueue);\n this.originalComponentResolutionQueue = null;\n }\n };\n R3TestBedCompiler.prototype.restoreOriginalState = function () {\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, function (op) {\n op.object[op.fieldName] = op.originalValue;\n });\n // Restore initial component/directive/pipe defs\n this.initialNgDefs.forEach(function (value, type) {\n var _a = __read(value, 2), prop = _a[0], descriptor = _a[1];\n if (!descriptor) {\n // Delete operations are generally undesirable since they have performance implications\n // on objects they were applied to. In this particular case, situations where this code\n // is invoked should be quite rare to cause any noticeable impact, since it's applied\n // only to some test cases (for example when class with no annotations extends some\n // @Component) when we need to clear 'ɵcmp' field on a given class to restore\n // its original state (before applying overrides and running tests).\n delete type[prop];\n }\n else {\n Object.defineProperty(type, prop, descriptor);\n }\n });\n this.initialNgDefs.clear();\n this.moduleProvidersOverridden.clear();\n this.restoreComponentResolutionQueue();\n // Restore the locale ID to the default value, this shouldn't be necessary but we never know\n core.ɵsetLocaleId(core.ɵDEFAULT_LOCALE_ID);\n };\n R3TestBedCompiler.prototype.compileTestModule = function () {\n var _this = this;\n var RootScopeModule = /** @class */ (function () {\n function RootScopeModule() {\n }\n return RootScopeModule;\n }());\n core.ɵcompileNgModuleDefs(RootScopeModule, {\n providers: __spread(this.rootProviderOverrides),\n });\n var ngZone = new core.NgZone({ enableLongStackTrace: true });\n var providers = __spread([\n { provide: core.NgZone, useValue: ngZone },\n { provide: core.Compiler, useFactory: function () { return new R3TestCompiler(_this); } }\n ], this.providers, this.providerOverrides);\n var imports = [RootScopeModule, this.additionalModuleTypes, this.imports || []];\n // clang-format off\n core.ɵcompileNgModuleDefs(this.testModuleType, {\n declarations: this.declarations,\n imports: imports,\n schemas: this.schemas,\n providers: providers,\n }, /* allowDuplicateDeclarationsInRoot */ true);\n // clang-format on\n this.applyProviderOverridesToModule(this.testModuleType);\n };\n Object.defineProperty(R3TestBedCompiler.prototype, \"injector\", {\n get: function () {\n if (this._injector !== null) {\n return this._injector;\n }\n var providers = [];\n var compilerOptions = this.platform.injector.get(core.COMPILER_OPTIONS);\n compilerOptions.forEach(function (opts) {\n if (opts.providers) {\n providers.push(opts.providers);\n }\n });\n if (this.compilerProviders !== null) {\n providers.push.apply(providers, __spread(this.compilerProviders));\n }\n // TODO(ocombe): make this work with an Injector directly instead of creating a module for it\n var CompilerModule = /** @class */ (function () {\n function CompilerModule() {\n }\n return CompilerModule;\n }());\n core.ɵcompileNgModuleDefs(CompilerModule, { providers: providers });\n var CompilerModuleFactory = new core.ɵNgModuleFactory(CompilerModule);\n this._injector = CompilerModuleFactory.create(this.platform.injector).injector;\n return this._injector;\n },\n enumerable: false,\n configurable: true\n });\n // get overrides for a specific provider (if any)\n R3TestBedCompiler.prototype.getSingleProviderOverrides = function (provider) {\n var token = getProviderToken(provider);\n return this.providerOverridesByToken.get(token) || null;\n };\n R3TestBedCompiler.prototype.getProviderOverrides = function (providers) {\n var _this = this;\n if (!providers || !providers.length || this.providerOverridesByToken.size === 0)\n return [];\n // There are two flattening operations here. The inner flatten() operates on the metadata's\n // providers and applies a mapping function which retrieves overrides for each incoming\n // provider. The outer flatten() then flattens the produced overrides array. If this is not\n // 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(flatten(providers, function (provider) { return _this.getSingleProviderOverrides(provider) || []; }));\n };\n R3TestBedCompiler.prototype.getOverriddenProviders = function (providers) {\n var _this = this;\n if (!providers || !providers.length || this.providerOverridesByToken.size === 0)\n return [];\n var flattenedProviders = flatten(providers);\n var overrides = this.getProviderOverrides(flattenedProviders);\n var overriddenProviders = __spread(flattenedProviders, overrides);\n var final = [];\n var seenOverriddenProviders = new Set();\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, function (provider) {\n var token = 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(Object.assign(Object.assign({}, provider), { multi: false }));\n }\n }\n else {\n final.unshift(provider);\n }\n });\n return final;\n };\n R3TestBedCompiler.prototype.hasProviderOverrides = function (providers) {\n return this.getProviderOverrides(providers).length > 0;\n };\n R3TestBedCompiler.prototype.patchDefWithProviderOverrides = function (declaration, field) {\n var _this = this;\n var def = declaration[field];\n if (def && def.providersResolver) {\n this.maybeStoreNgDef(field, declaration);\n var resolver_1 = def.providersResolver;\n var processProvidersFn_1 = function (providers) { return _this.getOverriddenProviders(providers); };\n this.storeFieldOfDefOnType(declaration, field, 'providersResolver');\n def.providersResolver = function (ngDef) { return resolver_1(ngDef, processProvidersFn_1); };\n }\n };\n return R3TestBedCompiler;\n }());\n function initResolvers() {\n return {\n module: new NgModuleResolver(),\n component: new ComponentResolver(),\n directive: new DirectiveResolver(),\n pipe: new PipeResolver()\n };\n }\n function hasNgModuleDef(value) {\n return value.hasOwnProperty('ɵmod');\n }\n function maybeUnwrapFn(maybeFn) {\n return maybeFn instanceof Function ? maybeFn() : maybeFn;\n }\n function flatten(values, mapFn) {\n var out = [];\n values.forEach(function (value) {\n if (Array.isArray(value)) {\n out.push.apply(out, __spread(flatten(value, mapFn)));\n }\n else {\n out.push(mapFn ? mapFn(value) : value);\n }\n });\n return out;\n }\n function getProviderField(provider, field) {\n return provider && typeof provider === 'object' && provider[field];\n }\n function getProviderToken(provider) {\n return getProviderField(provider, 'provide') || provider;\n }\n function isModuleWithProviders(value) {\n return value.hasOwnProperty('ngModule');\n }\n function forEachRight(values, fn) {\n for (var idx = values.length - 1; idx >= 0; idx--) {\n fn(values[idx], idx);\n }\n }\n function invalidTypeError(name, expectedType) {\n return new Error(name + \" class doesn't have @\" + expectedType + \" decorator or is missing metadata.\");\n }\n var R3TestCompiler = /** @class */ (function () {\n function R3TestCompiler(testBed) {\n this.testBed = testBed;\n }\n R3TestCompiler.prototype.compileModuleSync = function (moduleType) {\n this.testBed._compileNgModuleSync(moduleType);\n return new core.ɵNgModuleFactory(moduleType);\n };\n R3TestCompiler.prototype.compileModuleAsync = function (moduleType) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.testBed._compileNgModuleAsync(moduleType)];\n case 1:\n _a.sent();\n return [2 /*return*/, new core.ɵNgModuleFactory(moduleType)];\n }\n });\n });\n };\n R3TestCompiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {\n var ngModuleFactory = this.compileModuleSync(moduleType);\n var componentFactories = this.testBed._getComponentFactories(moduleType);\n return new core.ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n };\n R3TestCompiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {\n return __awaiter(this, void 0, void 0, function () {\n var ngModuleFactory, componentFactories;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.compileModuleAsync(moduleType)];\n case 1:\n ngModuleFactory = _a.sent();\n componentFactories = this.testBed._getComponentFactories(moduleType);\n return [2 /*return*/, new core.ModuleWithComponentFactories(ngModuleFactory, componentFactories)];\n }\n });\n });\n };\n R3TestCompiler.prototype.clearCache = function () { };\n R3TestCompiler.prototype.clearCacheFor = function (type) { };\n R3TestCompiler.prototype.getModuleId = function (moduleType) {\n var meta = this.testBed._getModuleResolver().resolve(moduleType);\n return meta && meta.id || undefined;\n };\n return R3TestCompiler;\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 * An abstract class for inserting the root test component element in a platform independent way.\n *\n * @publicApi\n */\n var TestComponentRenderer = /** @class */ (function () {\n function TestComponentRenderer() {\n }\n TestComponentRenderer.prototype.insertRootElement = function (rootElementId) { };\n return TestComponentRenderer;\n }());\n /**\n * @publicApi\n */\n var ComponentFixtureAutoDetect = new core.InjectionToken('ComponentFixtureAutoDetect');\n /**\n * @publicApi\n */\n var ComponentFixtureNoNgZone = new core.InjectionToken('ComponentFixtureNoNgZone');\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 var _nextRootElementId = 0;\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 * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`\n * according to the compiler used.\n */\n var TestBedRender3 = /** @class */ (function () {\n function TestBedRender3() {\n // Properties\n this.platform = null;\n this.ngModule = null;\n this._compiler = null;\n this._testModuleRef = null;\n this._activeFixtures = [];\n this._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 TestBedRender3.initTestEnvironment = function (ngModule, platform, aotSummaries) {\n var testBed = _getTestBedRender3();\n testBed.initTestEnvironment(ngModule, platform, aotSummaries);\n return testBed;\n };\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n TestBedRender3.resetTestEnvironment = function () {\n _getTestBedRender3().resetTestEnvironment();\n };\n TestBedRender3.configureCompiler = function (config) {\n _getTestBedRender3().configureCompiler(config);\n return TestBedRender3;\n };\n /**\n * Allows overriding default providers, directives, pipes, modules of the test injector,\n * which are defined in test_injector.js\n */\n TestBedRender3.configureTestingModule = function (moduleDef) {\n _getTestBedRender3().configureTestingModule(moduleDef);\n return TestBedRender3;\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 TestBedRender3.compileComponents = function () {\n return _getTestBedRender3().compileComponents();\n };\n TestBedRender3.overrideModule = function (ngModule, override) {\n _getTestBedRender3().overrideModule(ngModule, override);\n return TestBedRender3;\n };\n TestBedRender3.overrideComponent = function (component, override) {\n _getTestBedRender3().overrideComponent(component, override);\n return TestBedRender3;\n };\n TestBedRender3.overrideDirective = function (directive, override) {\n _getTestBedRender3().overrideDirective(directive, override);\n return TestBedRender3;\n };\n TestBedRender3.overridePipe = function (pipe, override) {\n _getTestBedRender3().overridePipe(pipe, override);\n return TestBedRender3;\n };\n TestBedRender3.overrideTemplate = function (component, template) {\n _getTestBedRender3().overrideComponent(component, { set: { template: template, templateUrl: null } });\n return TestBedRender3;\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 TestBedRender3.overrideTemplateUsingTestingModule = function (component, template) {\n _getTestBedRender3().overrideTemplateUsingTestingModule(component, template);\n return TestBedRender3;\n };\n TestBedRender3.overrideProvider = function (token, provider) {\n _getTestBedRender3().overrideProvider(token, provider);\n return TestBedRender3;\n };\n TestBedRender3.inject = function (token, notFoundValue, flags) {\n return _getTestBedRender3().inject(token, notFoundValue, flags);\n };\n /** @deprecated from v9.0.0 use TestBed.inject */\n TestBedRender3.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = core.InjectFlags.Default; }\n return _getTestBedRender3().inject(token, notFoundValue, flags);\n };\n TestBedRender3.createComponent = function (component) {\n return _getTestBedRender3().createComponent(component);\n };\n TestBedRender3.resetTestingModule = function () {\n _getTestBedRender3().resetTestingModule();\n return TestBedRender3;\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 TestBedRender3.prototype.initTestEnvironment = function (ngModule, platform, aotSummaries) {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n this.platform = platform;\n this.ngModule = ngModule;\n this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);\n };\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n TestBedRender3.prototype.resetTestEnvironment = function () {\n this.resetTestingModule();\n this._compiler = null;\n this.platform = null;\n this.ngModule = null;\n };\n TestBedRender3.prototype.resetTestingModule = function () {\n this.checkGlobalCompilationFinished();\n core.ɵresetCompiledComponents();\n if (this._compiler !== null) {\n this.compiler.restoreOriginalState();\n }\n this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);\n this._testModuleRef = null;\n this.destroyActiveFixtures();\n };\n TestBedRender3.prototype.configureCompiler = function (config) {\n if (config.useJit != null) {\n throw new Error('the Render3 compiler JiT mode is not configurable !');\n }\n if (config.providers !== undefined) {\n this.compiler.setCompilerProviders(config.providers);\n }\n };\n TestBedRender3.prototype.configureTestingModule = function (moduleDef) {\n this.assertNotInstantiated('R3TestBed.configureTestingModule', 'configure the test module');\n this.compiler.configureTestingModule(moduleDef);\n };\n TestBedRender3.prototype.compileComponents = function () {\n return this.compiler.compileComponents();\n };\n TestBedRender3.prototype.inject = function (token, notFoundValue, flags) {\n if (token === TestBedRender3) {\n return this;\n }\n var UNDEFINED = {};\n var result = this.testModuleRef.injector.get(token, UNDEFINED, flags);\n return result === UNDEFINED ? this.compiler.injector.get(token, notFoundValue, flags) :\n result;\n };\n /** @deprecated from v9.0.0 use TestBed.inject */\n TestBedRender3.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = core.InjectFlags.Default; }\n return this.inject(token, notFoundValue, flags);\n };\n TestBedRender3.prototype.execute = function (tokens, fn, context) {\n var _this = this;\n var params = tokens.map(function (t) { return _this.inject(t); });\n return fn.apply(context, params);\n };\n TestBedRender3.prototype.overrideModule = function (ngModule, override) {\n this.assertNotInstantiated('overrideModule', 'override module metadata');\n this.compiler.overrideModule(ngModule, override);\n };\n TestBedRender3.prototype.overrideComponent = function (component, override) {\n this.assertNotInstantiated('overrideComponent', 'override component metadata');\n this.compiler.overrideComponent(component, override);\n };\n TestBedRender3.prototype.overrideTemplateUsingTestingModule = function (component, template) {\n this.assertNotInstantiated('R3TestBed.overrideTemplateUsingTestingModule', 'Cannot override template when the test module has already been instantiated');\n this.compiler.overrideTemplateUsingTestingModule(component, template);\n };\n TestBedRender3.prototype.overrideDirective = function (directive, override) {\n this.assertNotInstantiated('overrideDirective', 'override directive metadata');\n this.compiler.overrideDirective(directive, override);\n };\n TestBedRender3.prototype.overridePipe = function (pipe, override) {\n this.assertNotInstantiated('overridePipe', 'override pipe metadata');\n this.compiler.overridePipe(pipe, override);\n };\n /**\n * Overwrites all providers for the given token with the given provider definition.\n */\n TestBedRender3.prototype.overrideProvider = function (token, provider) {\n this.assertNotInstantiated('overrideProvider', 'override provider');\n this.compiler.overrideProvider(token, provider);\n };\n TestBedRender3.prototype.createComponent = function (type) {\n var _this = this;\n var testComponentRenderer = this.inject(TestComponentRenderer);\n var rootElId = \"root\" + _nextRootElementId++;\n testComponentRenderer.insertRootElement(rootElId);\n var componentDef = type.ɵcmp;\n if (!componentDef) {\n throw new Error(\"It looks like '\" + core.ɵstringify(type) + \"' has not been IVY compiled - it has no '\\u0275cmp' field\");\n }\n // TODO: Don't cast as `InjectionToken`, proper type is boolean[]\n var noNgZone = this.inject(ComponentFixtureNoNgZone, false);\n // TODO: Don't cast as `InjectionToken`, proper type is boolean[]\n var autoDetect = this.inject(ComponentFixtureAutoDetect, false);\n var ngZone = noNgZone ? null : this.inject(core.NgZone, null);\n var componentFactory = new core.ɵRender3ComponentFactory(componentDef);\n var initComponent = function () {\n var componentRef = componentFactory.create(core.Injector.NULL, [], \"#\" + rootElId, _this.testModuleRef);\n return new ComponentFixture(componentRef, ngZone, autoDetect);\n };\n var fixture = ngZone ? ngZone.run(initComponent) : initComponent();\n this._activeFixtures.push(fixture);\n return fixture;\n };\n Object.defineProperty(TestBedRender3.prototype, \"compiler\", {\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get: function () {\n if (this._compiler === null) {\n throw new Error(\"Need to call TestBed.initTestEnvironment() first\");\n }\n return this._compiler;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TestBedRender3.prototype, \"testModuleRef\", {\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n get: function () {\n if (this._testModuleRef === null) {\n this._testModuleRef = this.compiler.finalize();\n }\n return this._testModuleRef;\n },\n enumerable: false,\n configurable: true\n });\n TestBedRender3.prototype.assertNotInstantiated = function (methodName, methodDescription) {\n if (this._testModuleRef !== null) {\n throw new Error(\"Cannot \" + methodDescription + \" when the test module has already been instantiated. \" +\n (\"Make sure you are not using `inject` before `\" + methodName + \"`.\"));\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 TestBedRender3.prototype.checkGlobalCompilationFinished = function () {\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 core.ɵflushModuleScopingQueueAsMuchAsPossible();\n }\n this._globalCompilationChecked = true;\n };\n TestBedRender3.prototype.destroyActiveFixtures = function () {\n this._activeFixtures.forEach(function (fixture) {\n try {\n fixture.destroy();\n }\n catch (e) {\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n };\n return TestBedRender3;\n }());\n var testBed;\n function _getTestBedRender3() {\n return testBed = testBed || new TestBedRender3();\n }\n\n function unimplemented() {\n throw Error('unimplemented');\n }\n /**\n * Special interface to the compiler only used by testing\n *\n * @publicApi\n */\n var TestingCompiler = /** @class */ (function (_super) {\n __extends(TestingCompiler, _super);\n function TestingCompiler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(TestingCompiler.prototype, \"injector\", {\n get: function () {\n throw unimplemented();\n },\n enumerable: false,\n configurable: true\n });\n TestingCompiler.prototype.overrideModule = function (module, overrides) {\n throw unimplemented();\n };\n TestingCompiler.prototype.overrideDirective = function (directive, overrides) {\n throw unimplemented();\n };\n TestingCompiler.prototype.overrideComponent = function (component, overrides) {\n throw unimplemented();\n };\n TestingCompiler.prototype.overridePipe = function (directive, overrides) {\n throw unimplemented();\n };\n /**\n * Allows to pass the compile summary from AOT compilation to the JIT compiler,\n * so that it can use the code generated by AOT.\n */\n TestingCompiler.prototype.loadAotSummaries = function (summaries) {\n throw unimplemented();\n };\n /**\n * Gets the component factory for the given component.\n * This assumes that the component has been compiled before calling this call using\n * `compileModuleAndAllComponents*`.\n */\n TestingCompiler.prototype.getComponentFactory = function (component) {\n throw unimplemented();\n };\n /**\n * Returns the component type that is stored in the given error.\n * This can be used for errors created by compileModule...\n */\n TestingCompiler.prototype.getComponentFromError = function (error) {\n throw unimplemented();\n };\n return TestingCompiler;\n }(core.Compiler));\n TestingCompiler.decorators = [\n { type: core.Injectable }\n ];\n /**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\n var TestingCompilerFactory = /** @class */ (function () {\n function TestingCompilerFactory() {\n }\n return TestingCompilerFactory;\n }());\n\n var _nextRootElementId$1 = 0;\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 * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`\n * according to the compiler used.\n */\n var TestBedViewEngine = /** @class */ (function () {\n function TestBedViewEngine() {\n this._instantiated = false;\n this._compiler = null;\n this._moduleRef = null;\n this._moduleFactory = null;\n this._compilerOptions = [];\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._activeFixtures = [];\n this._testEnvAotSummaries = function () { return []; };\n this._aotSummaries = [];\n this._templateOverrides = [];\n this._isRoot = true;\n this._rootProviderOverrides = [];\n this.platform = null;\n this.ngModule = null;\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 TestBedViewEngine.initTestEnvironment = function (ngModule, platform, aotSummaries) {\n var testBed = _getTestBedViewEngine();\n testBed.initTestEnvironment(ngModule, platform, aotSummaries);\n return testBed;\n };\n /**\n * Reset the providers for the test injector.\n */\n TestBedViewEngine.resetTestEnvironment = function () {\n _getTestBedViewEngine().resetTestEnvironment();\n };\n TestBedViewEngine.resetTestingModule = function () {\n _getTestBedViewEngine().resetTestingModule();\n return TestBedViewEngine;\n };\n /**\n * Allows overriding default compiler providers and settings\n * which are defined in test_injector.js\n */\n TestBedViewEngine.configureCompiler = function (config) {\n _getTestBedViewEngine().configureCompiler(config);\n return TestBedViewEngine;\n };\n /**\n * Allows overriding default providers, directives, pipes, modules of the test injector,\n * which are defined in test_injector.js\n */\n TestBedViewEngine.configureTestingModule = function (moduleDef) {\n _getTestBedViewEngine().configureTestingModule(moduleDef);\n return TestBedViewEngine;\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 TestBedViewEngine.compileComponents = function () {\n return getTestBed().compileComponents();\n };\n TestBedViewEngine.overrideModule = function (ngModule, override) {\n _getTestBedViewEngine().overrideModule(ngModule, override);\n return TestBedViewEngine;\n };\n TestBedViewEngine.overrideComponent = function (component, override) {\n _getTestBedViewEngine().overrideComponent(component, override);\n return TestBedViewEngine;\n };\n TestBedViewEngine.overrideDirective = function (directive, override) {\n _getTestBedViewEngine().overrideDirective(directive, override);\n return TestBedViewEngine;\n };\n TestBedViewEngine.overridePipe = function (pipe, override) {\n _getTestBedViewEngine().overridePipe(pipe, override);\n return TestBedViewEngine;\n };\n TestBedViewEngine.overrideTemplate = function (component, template) {\n _getTestBedViewEngine().overrideComponent(component, { set: { template: template, templateUrl: null } });\n return TestBedViewEngine;\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 TestBedViewEngine.overrideTemplateUsingTestingModule = function (component, template) {\n _getTestBedViewEngine().overrideTemplateUsingTestingModule(component, template);\n return TestBedViewEngine;\n };\n TestBedViewEngine.overrideProvider = function (token, provider) {\n _getTestBedViewEngine().overrideProvider(token, provider);\n return TestBedViewEngine;\n };\n TestBedViewEngine.inject = function (token, notFoundValue, flags) {\n return _getTestBedViewEngine().inject(token, notFoundValue, flags);\n };\n /** @deprecated from v9.0.0 use TestBed.inject */\n TestBedViewEngine.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = core.InjectFlags.Default; }\n return _getTestBedViewEngine().inject(token, notFoundValue, flags);\n };\n TestBedViewEngine.createComponent = function (component) {\n return _getTestBedViewEngine().createComponent(component);\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 TestBedViewEngine.prototype.initTestEnvironment = function (ngModule, platform, aotSummaries) {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n this.platform = platform;\n this.ngModule = ngModule;\n if (aotSummaries) {\n this._testEnvAotSummaries = aotSummaries;\n }\n };\n /**\n * Reset the providers for the test injector.\n */\n TestBedViewEngine.prototype.resetTestEnvironment = function () {\n this.resetTestingModule();\n this.platform = null;\n this.ngModule = null;\n this._testEnvAotSummaries = function () { return []; };\n };\n TestBedViewEngine.prototype.resetTestingModule = function () {\n core.ɵclearOverrides();\n this._aotSummaries = [];\n this._templateOverrides = [];\n this._compiler = null;\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._isRoot = true;\n this._rootProviderOverrides = [];\n this._moduleRef = null;\n this._moduleFactory = null;\n this._compilerOptions = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._instantiated = false;\n this._activeFixtures.forEach(function (fixture) {\n try {\n fixture.destroy();\n }\n catch (e) {\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n };\n TestBedViewEngine.prototype.configureCompiler = function (config) {\n this._assertNotInstantiated('TestBed.configureCompiler', 'configure the compiler');\n this._compilerOptions.push(config);\n };\n TestBedViewEngine.prototype.configureTestingModule = function (moduleDef) {\n var _a, _b, _c, _d;\n this._assertNotInstantiated('TestBed.configureTestingModule', 'configure the test module');\n if (moduleDef.providers) {\n (_a = this._providers).push.apply(_a, __spread(moduleDef.providers));\n }\n if (moduleDef.declarations) {\n (_b = this._declarations).push.apply(_b, __spread(moduleDef.declarations));\n }\n if (moduleDef.imports) {\n (_c = this._imports).push.apply(_c, __spread(moduleDef.imports));\n }\n if (moduleDef.schemas) {\n (_d = this._schemas).push.apply(_d, __spread(moduleDef.schemas));\n }\n if (moduleDef.aotSummaries) {\n this._aotSummaries.push(moduleDef.aotSummaries);\n }\n };\n TestBedViewEngine.prototype.compileComponents = function () {\n var _this = this;\n if (this._moduleFactory || this._instantiated) {\n return Promise.resolve(null);\n }\n var moduleType = this._createCompilerAndModule();\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType)\n .then(function (moduleAndComponentFactories) {\n _this._moduleFactory = moduleAndComponentFactories.ngModuleFactory;\n });\n };\n TestBedViewEngine.prototype._initIfNeeded = function () {\n var e_1, _a;\n if (this._instantiated) {\n return;\n }\n if (!this._moduleFactory) {\n try {\n var moduleType = this._createCompilerAndModule();\n this._moduleFactory =\n this._compiler.compileModuleAndAllComponentsSync(moduleType).ngModuleFactory;\n }\n catch (e) {\n var errorCompType = this._compiler.getComponentFromError(e);\n if (errorCompType) {\n throw new Error(\"This test module uses the component \" + core.ɵstringify(errorCompType) + \" which is using a \\\"templateUrl\\\" or \\\"styleUrls\\\", but they were never compiled. \" +\n \"Please call \\\"TestBed.compileComponents\\\" before your test.\");\n }\n else {\n throw e;\n }\n }\n }\n try {\n for (var _b = __values(this._templateOverrides), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = _c.value, component = _d.component, templateOf = _d.templateOf;\n var compFactory = this._compiler.getComponentFactory(templateOf);\n core.ɵoverrideComponentView(component, compFactory);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var ngZone = new core.NgZone({ enableLongStackTrace: true, shouldCoalesceEventChangeDetection: false });\n var providers = [{ provide: core.NgZone, useValue: ngZone }];\n var ngZoneInjector = core.Injector.create({\n providers: providers,\n parent: this.platform.injector,\n name: this._moduleFactory.moduleType.name\n });\n this._moduleRef = this._moduleFactory.create(ngZoneInjector);\n // ApplicationInitStatus.runInitializers() is marked @internal to core. So casting to any\n // before accessing it.\n this._moduleRef.injector.get(core.ApplicationInitStatus).runInitializers();\n this._instantiated = true;\n };\n TestBedViewEngine.prototype._createCompilerAndModule = function () {\n var e_2, _a;\n var _this = this;\n var providers = this._providers.concat([{ provide: TestBed, useValue: this }]);\n var declarations = __spread(this._declarations, this._templateOverrides.map(function (entry) { return entry.templateOf; }));\n var rootScopeImports = [];\n var rootProviderOverrides = this._rootProviderOverrides;\n if (this._isRoot) {\n var RootScopeModule = /** @class */ (function () {\n function RootScopeModule() {\n }\n return RootScopeModule;\n }());\n RootScopeModule.decorators = [\n { type: core.NgModule, args: [{\n providers: __spread(rootProviderOverrides),\n jit: true,\n },] }\n ];\n rootScopeImports.push(RootScopeModule);\n }\n providers.push({ provide: core.ɵINJECTOR_SCOPE, useValue: this._isRoot ? 'root' : null });\n var imports = [rootScopeImports, this.ngModule, this._imports];\n var schemas = this._schemas;\n var DynamicTestModule = /** @class */ (function () {\n function DynamicTestModule() {\n }\n return DynamicTestModule;\n }());\n DynamicTestModule.decorators = [\n { type: core.NgModule, args: [{ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true },] }\n ];\n var compilerFactory = this.platform.injector.get(TestingCompilerFactory);\n this._compiler = compilerFactory.createTestingCompiler(this._compilerOptions);\n try {\n for (var _b = __values(__spread([this._testEnvAotSummaries], this._aotSummaries)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var summary = _c.value;\n this._compiler.loadAotSummaries(summary);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this._moduleOverrides.forEach(function (entry) { return _this._compiler.overrideModule(entry[0], entry[1]); });\n this._componentOverrides.forEach(function (entry) { return _this._compiler.overrideComponent(entry[0], entry[1]); });\n this._directiveOverrides.forEach(function (entry) { return _this._compiler.overrideDirective(entry[0], entry[1]); });\n this._pipeOverrides.forEach(function (entry) { return _this._compiler.overridePipe(entry[0], entry[1]); });\n return DynamicTestModule;\n };\n TestBedViewEngine.prototype._assertNotInstantiated = function (methodName, methodDescription) {\n if (this._instantiated) {\n throw new Error(\"Cannot \" + methodDescription + \" when the test module has already been instantiated. \" +\n (\"Make sure you are not using `inject` before `\" + methodName + \"`.\"));\n }\n };\n TestBedViewEngine.prototype.inject = function (token, notFoundValue, flags) {\n this._initIfNeeded();\n if (token === TestBed) {\n return this;\n }\n // Tests can inject things from the ng module and from the compiler,\n // but the ng module can't inject things from the compiler and vice versa.\n var UNDEFINED = {};\n var result = this._moduleRef.injector.get(token, UNDEFINED, flags);\n return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue, flags) :\n result;\n };\n /** @deprecated from v9.0.0 use TestBed.inject */\n TestBedViewEngine.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = core.InjectFlags.Default; }\n return this.inject(token, notFoundValue, flags);\n };\n TestBedViewEngine.prototype.execute = function (tokens, fn, context) {\n var _this = this;\n this._initIfNeeded();\n var params = tokens.map(function (t) { return _this.inject(t); });\n return fn.apply(context, params);\n };\n TestBedViewEngine.prototype.overrideModule = function (ngModule, override) {\n this._assertNotInstantiated('overrideModule', 'override module metadata');\n this._moduleOverrides.push([ngModule, override]);\n };\n TestBedViewEngine.prototype.overrideComponent = function (component, override) {\n this._assertNotInstantiated('overrideComponent', 'override component metadata');\n this._componentOverrides.push([component, override]);\n };\n TestBedViewEngine.prototype.overrideDirective = function (directive, override) {\n this._assertNotInstantiated('overrideDirective', 'override directive metadata');\n this._directiveOverrides.push([directive, override]);\n };\n TestBedViewEngine.prototype.overridePipe = function (pipe, override) {\n this._assertNotInstantiated('overridePipe', 'override pipe metadata');\n this._pipeOverrides.push([pipe, override]);\n };\n TestBedViewEngine.prototype.overrideProvider = function (token, provider) {\n this._assertNotInstantiated('overrideProvider', 'override provider');\n this.overrideProviderImpl(token, provider);\n };\n TestBedViewEngine.prototype.overrideProviderImpl = function (token, provider, deprecated) {\n if (deprecated === void 0) { deprecated = false; }\n var def = null;\n if (typeof token !== 'string' && (def = core.ɵgetInjectableDef(token)) && def.providedIn === 'root') {\n if (provider.useFactory) {\n this._rootProviderOverrides.push({ provide: token, useFactory: provider.useFactory, deps: provider.deps || [] });\n }\n else {\n this._rootProviderOverrides.push({ provide: token, useValue: provider.useValue });\n }\n }\n var flags = 0;\n var value;\n if (provider.useFactory) {\n flags |= 1024 /* TypeFactoryProvider */;\n value = provider.useFactory;\n }\n else {\n flags |= 256 /* TypeValueProvider */;\n value = provider.useValue;\n }\n var deps = (provider.deps || []).map(function (dep) {\n var depFlags = 0 /* None */;\n var depToken;\n if (Array.isArray(dep)) {\n dep.forEach(function (entry) {\n if (entry instanceof core.Optional) {\n depFlags |= 2 /* Optional */;\n }\n else if (entry instanceof core.SkipSelf) {\n depFlags |= 1 /* SkipSelf */;\n }\n else {\n depToken = entry;\n }\n });\n }\n else {\n depToken = dep;\n }\n return [depFlags, depToken];\n });\n core.ɵoverrideProvider({ token: token, flags: flags, deps: deps, value: value, deprecatedBehavior: deprecated });\n };\n TestBedViewEngine.prototype.overrideTemplateUsingTestingModule = function (component, template) {\n this._assertNotInstantiated('overrideTemplateUsingTestingModule', 'override template');\n var OverrideComponent = /** @class */ (function () {\n function OverrideComponent() {\n }\n return OverrideComponent;\n }());\n OverrideComponent.decorators = [\n { type: core.Component, args: [{ selector: 'empty', template: template, jit: true },] }\n ];\n this._templateOverrides.push({ component: component, templateOf: OverrideComponent });\n };\n TestBedViewEngine.prototype.createComponent = function (component) {\n var _this = this;\n this._initIfNeeded();\n var componentFactory = this._compiler.getComponentFactory(component);\n if (!componentFactory) {\n throw new Error(\"Cannot create the component \" + core.ɵstringify(component) + \" as it was not imported into the testing module!\");\n }\n // TODO: Don't cast as `InjectionToken`, declared type is boolean[]\n var noNgZone = this.inject(ComponentFixtureNoNgZone, false);\n // TODO: Don't cast as `InjectionToken`, declared type is boolean[]\n var autoDetect = this.inject(ComponentFixtureAutoDetect, false);\n var ngZone = noNgZone ? null : this.inject(core.NgZone, null);\n var testComponentRenderer = this.inject(TestComponentRenderer);\n var rootElId = \"root\" + _nextRootElementId$1++;\n testComponentRenderer.insertRootElement(rootElId);\n var initComponent = function () {\n var componentRef = componentFactory.create(core.Injector.NULL, [], \"#\" + rootElId, _this._moduleRef);\n return new ComponentFixture(componentRef, ngZone, autoDetect);\n };\n var fixture = !ngZone ? initComponent() : ngZone.run(initComponent);\n this._activeFixtures.push(fixture);\n return fixture;\n };\n return TestBedViewEngine;\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 * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`\n * according to the compiler used.\n *\n * @publicApi\n */\n var TestBed = core.ɵivyEnabled ? TestBedRender3 : TestBedViewEngine;\n /**\n * Returns a singleton of the applicable `TestBed`.\n *\n * It will be either an instance of `TestBedViewEngine` or `TestBedRender3`.\n *\n * @publicApi\n */\n var getTestBed = core.ɵivyEnabled ? _getTestBedRender3 : _getTestBedViewEngine;\n var testBed$1;\n function _getTestBedViewEngine() {\n return testBed$1 = testBed$1 || new TestBedViewEngine();\n }\n /**\n * Allows injecting dependencies in `beforeEach()` and `it()`.\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 * Notes:\n * - inject is currently a function because of some Traceur limitation the syntax should\n * eventually\n * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`\n *\n * @publicApi\n */\n function inject(tokens, fn) {\n var testBed = getTestBed();\n if (tokens.indexOf(AsyncTestCompleter) >= 0) {\n // Not using an arrow function to preserve context passed from call site\n return function () {\n var _this = this;\n // Return an async test method that returns a Promise if AsyncTestCompleter is one of\n // the injected tokens.\n return testBed.compileComponents().then(function () {\n var completer = testBed.inject(AsyncTestCompleter);\n testBed.execute(tokens, fn, _this);\n return completer.promise;\n });\n };\n }\n else {\n // Not using an arrow function to preserve context passed from call site\n return function () {\n return testBed.execute(tokens, fn, this);\n };\n }\n }\n /**\n * @publicApi\n */\n var InjectSetupWrapper = /** @class */ (function () {\n function InjectSetupWrapper(_moduleDef) {\n this._moduleDef = _moduleDef;\n }\n InjectSetupWrapper.prototype._addModule = function () {\n var moduleDef = this._moduleDef();\n if (moduleDef) {\n getTestBed().configureTestingModule(moduleDef);\n }\n };\n InjectSetupWrapper.prototype.inject = function (tokens, fn) {\n var self = this;\n // Not using an arrow function to preserve context passed from call site\n return function () {\n self._addModule();\n return inject(tokens, fn).call(this);\n };\n };\n return InjectSetupWrapper;\n }());\n function withModule(moduleDef, fn) {\n if (fn) {\n // Not using an arrow function to preserve context passed from call site\n return function () {\n var testBed = getTestBed();\n if (moduleDef) {\n testBed.configureTestingModule(moduleDef);\n }\n return fn.apply(this);\n };\n }\n return new InjectSetupWrapper(function () { return moduleDef; });\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 var _global = (typeof window === 'undefined' ? global : window);\n // Reset the test providers and the fake async zone before each test.\n if (_global.beforeEach) {\n _global.beforeEach(function () {\n TestBed.resetTestingModule();\n resetFakeAsyncZone();\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.\n var __core_private_testing_placeholder__ = '';\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 * @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 * @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 // This file only reexports content of the `src` folder. Keep it that way.\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 * Generated bundle index. Do not edit.\n */\n\n exports.ComponentFixture = ComponentFixture;\n exports.ComponentFixtureAutoDetect = ComponentFixtureAutoDetect;\n exports.ComponentFixtureNoNgZone = ComponentFixtureNoNgZone;\n exports.InjectSetupWrapper = InjectSetupWrapper;\n exports.TestBed = TestBed;\n exports.TestComponentRenderer = TestComponentRenderer;\n exports.__core_private_testing_placeholder__ = __core_private_testing_placeholder__;\n exports.async = async;\n exports.discardPeriodicTasks = discardPeriodicTasks;\n exports.fakeAsync = fakeAsync;\n exports.flush = flush;\n exports.flushMicrotasks = flushMicrotasks;\n exports.getTestBed = getTestBed;\n exports.inject = inject;\n exports.resetFakeAsyncZone = resetFakeAsyncZone;\n exports.tick = tick;\n exports.waitForAsync = waitForAsync;\n exports.withModule = withModule;\n exports.ɵMetadataOverrider = MetadataOverrider;\n exports.ɵTestingCompiler = TestingCompiler;\n exports.ɵTestingCompilerFactory = TestingCompilerFactory;\n exports.ɵangular_packages_core_testing_testing_a = TestBedViewEngine;\n exports.ɵangular_packages_core_testing_testing_b = TestBedRender3;\n exports.ɵangular_packages_core_testing_testing_c = _getTestBedRender3;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=core-testing.umd.js.map\n"]}