{"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","call","__extends","TypeError","String","__","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","pop","length","push","__values","o","s","m","i","__read","r","ar","__spreadArray","to","from","il","j","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","concat","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","arguments","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,EAA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,EAAQC,GAE5C,MAAM,IAAIxhB,MAAMgB,IAmlFpB1E,EAAQW,aAAeA,EACvBX,EAAQolB,WA9FR,SAASA,GAAWlT,EAAWtR,GAC3B,OAAIA,EAEO,WACH,IAAIwb,EAAU6F,KAId,OAHI/P,GACAkK,EAAQnK,uBAAuBC,GAE5BtR,EAAG8F,MAAMhG,OAGjB,IAAIyjB,IAAmB,WAAc,OAAOjS;;;;;;;QAoFvDlS,EAAQqlB,mBAAqBxZ,EAC7B7L,EAAQslB,iBAAmBlF,EAC3BpgB,EAAQulB,wBAA0B3E,EAClC5gB,EAAQwlB,yCAA2C1E,EACnD9gB,EAAQylB,yCAA2ClI,EACnDvd,EAAQ0lB,yCAA2C5H,EAEnD/Y,OAAOoE,eAAenJ,EAAS,aAAc,CAAEkG,OAAO","sourcesContent":["/**\n * @license Angular v12.0.0-next.7\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');\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/testing');\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/testing\";\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 (Object.prototype.hasOwnProperty.call(b, p))\n d[p] = b[p]; };\n return extendStatics(d, b);\n };\n function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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, o) {\n for (var p in m)\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p))\n __createBinding(o, 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 /** @deprecated */\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 /** @deprecated */\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 function __spreadArray(to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\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 (k !== \"default\" && Object.prototype.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, __spreadArray([], __read(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, __spreadArray([], __read(moduleDef.imports)));\n }\n if (moduleDef.providers !== undefined) {\n (_c = this.providers).push.apply(_c, __spreadArray([], __read(moduleDef.providers)));\n }\n if (moduleDef.schemas !== undefined) {\n (_d = this.schemas).push.apply(_d, __spreadArray([], __read(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 = __spreadArray(__spreadArray([], __read(injectorDef.providers)), __read((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: __spreadArray([], __read(this.rootProviderOverrides)),\n });\n var ngZone = new core.NgZone({ enableLongStackTrace: true });\n var providers = __spreadArray(__spreadArray([\n { provide: core.NgZone, useValue: ngZone },\n { provide: core.Compiler, useFactory: function () { return new R3TestCompiler(_this); } }\n ], __read(this.providers)), __read(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, __spreadArray([], __read(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 = __spreadArray(__spreadArray([], __read(flattenedProviders)), __read(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, __spreadArray([], __read(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, __spreadArray([], __read(moduleDef.providers)));\n }\n if (moduleDef.declarations) {\n (_b = this._declarations).push.apply(_b, __spreadArray([], __read(moduleDef.declarations)));\n }\n if (moduleDef.imports) {\n (_c = this._imports).push.apply(_c, __spreadArray([], __read(moduleDef.imports)));\n }\n if (moduleDef.schemas) {\n (_d = this._schemas).push.apply(_d, __spreadArray([], __read(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 = __spreadArray(__spreadArray([], __read(this._declarations)), __read(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: __spreadArray([], __read(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(__spreadArray([this._testEnvAotSummaries], __read(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"]}