@angular/core 7.2.10 → 7.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/core/core-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","core","testing","this","_global","window","runInTestZone","fn","context","finishCallback","failCallback","currentZone","Zone","current","AsyncTestZoneSpec","undefined","Error","ProxyZoneSpec","proxyZoneSpec","get","assertPresent","proxyZone","getZoneWith","previousDelegate","getDelegate","parent","run","testZoneSpec","setDelegate","error","runGuarded","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","hasPendingMacrotasks","onError","prototype","_tick","checkNoChanges","autoDetectChanges","autoDetect","isStable","whenStable","Promise","resolve","res","_getRenderer","_renderer","injector","RendererFactory2","whenRenderingDone","renderer","destroy","unsubscribe","_Zone","FakeAsyncTestZoneSpec","_fakeAsyncTestZoneSpec","resetFakeAsyncZoneFallback","resetDelegate","_inFakeAsyncCall","_getFakeAsyncZoneSpec","flushMicrotasksFallback","flushMicrotasks","_Zone$1","fakeAsyncTestModule","__symbol__","resetFakeAsyncZone","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__values","o","m","Symbol","iterator","value","done","__read","e","ar","push","__spread","concat","AsyncTestCompleter","rej","_reject","fail","stackTrace","enumerable","configurable","_nextReferenceId","MetadataOverrider","_references","Map","overrideMetadata","metadataClass","oldMetadata","override","props","_valueProps","obj","keys","forEach","prop","startsWith","proto","getPrototypeOf","protoProp","set","remove","add","ɵstringify","setMetadata","metadata","removeMetadata","references","removeObjects","Set","_loop_1","removeValue","_propHashKey","_loop_2","propValue","filter","has","addMetadata","addValue","propName","JSON","stringify","_serializeReference","ref","id","testBed","reflection","ɵReflectionCapabilities","OverrideResolver","overrides","resolved","setOverrides","clear","_a","_b","type","getAnnotation","annotations","find","a","overrider_1","DirectiveResolver","_super","Directive","ComponentResolver","Component","PipeResolver","Pipe","NgModuleResolver","NgModule","TestComponentRenderer","insertRootElement","rootElementId","ComponentFixtureAutoDetect","InjectionToken","ComponentFixtureNoNgZone","_nextRootElementId","EMPTY_ARRAY","TestBedRender3","platform","ngModule","_moduleOverrides","_componentOverrides","_directiveOverrides","_pipeOverrides","_providerOverrides","_rootProviderOverrides","_providerOverridesByToken","_templateOverrides","_providers","_declarations","_imports","_schemas","_activeFixtures","_moduleRef","_testModuleType","_instantiated","initTestEnvironment","aotSummaries","_getTestBedRender3","resetTestEnvironment","configureCompiler","config","configureTestingModule","moduleDef","compileComponents","overrideModule","overrideComponent","component","overrideDirective","directive","overridePipe","pipe","overrideTemplate","template","templateUrl","overrideTemplateUsingTestingModule","overrideProvider","token","provider","deprecatedOverrideProvider","notFoundValue","Injector","THROW_IF_NOT_FOUND","createComponent","resetTestingModule","ɵresetCompiledComponents","fixture","console","stacktrace","useJit","providers","_c","_d","_assertNotInstantiated","declarations","imports","schemas","_initIfNeeded","execute","tokens","params","map","injectableDef","providerDef","useFactory","provide","deps","useValue","ɵgetInjectableDef","providedIn","overridesForToken","testComponentRenderer","rootElId","componentDef","ngComponentDef","noNgZone","NgZone","componentFactory","ɵRender3ComponentFactory","initComponent","NULL","resolvers","_getResolvers","_createTestModule","_compileNgModule","ɵRender3NgModuleRef","ApplicationInitStatus","runInitializers","_getProviderOverrides","methodName","methodDescription","rootProviderOverrides","RootScopeModule","jit","enableLongStackTrace","DynamicTestModule","_getMetaWithOverrides","meta","providerOverrides","flatten","moduleType","ɵcompileNgModuleDefs","compiledComponents","resolveForwardRef","declaration","metadata_1","ɵcompileComponent","metadata_2","ɵcompileDirective","ɵcompilePipe","transitiveScope","_transitiveScopesFor","cmp","scope","ɵpatchComponentDefWithScope","isNgModule","name","def","ngModuleDef","transitiveCompileScopes","scopes","compilation","directives","pipes","exported","declared","ngPipeDef","imported","importedScope","entry","exportedTyped","exportedScope","values","mapFn","out","isArray","unimplemented","testBed$1","TestingCompiler","loadAotSummaries","summaries","getComponentFactory","getComponentFromError","Injectable","Compiler","TestingCompilerFactory","UNDEFINED","_nextRootElementId$1","TestBedViewEngine","_compiler","_moduleFactory","_compilerOptions","_testEnvAotSummaries","_aotSummaries","_isRoot","_getTestBedViewEngine","getTestBed","ɵclearOverrides","_createCompilerAndModule","compileModuleAndAllComponentsAsync","then","moduleAndComponentFactories","ngModuleFactory","e_1","compileModuleAndAllComponentsSync","errorCompType","compFactory","templateOf","ɵoverrideComponentView","e_1_1","return","ngZoneInjector","e_2","TestBed","rootScopeImports","ɵAPP_ROOT","compilerFactory","createTestingCompiler","e_2_1","result","overrideProviderImpl","deprecated","flags","dep","depToken","depFlags","Optional","SkipSelf","ɵoverrideProvider","deprecatedBehavior","OverrideComponent","selector","ɵivyEnabled","inject","indexOf","completer","promise","InjectSetupWrapper","_moduleDef","_addModule","_global$1","beforeEach","ɵangular_packages_core_testing_testing_b","ɵangular_packages_core_testing_testing_c","ɵangular_packages_core_testing_testing_a","withModule","ɵMetadataOverrider","async","reject","asyncTest","asyncFallback","jasmine","err","fakeAsync","fakeAsyncFallback","args","_i","lastProxyZoneSpec","pendingPeriodicTimers","pendingTimers","tick","millis","tickFallback","flush","maxTurns","flushFallback","discardPeriodicTasks","discardPeriodicTasksFallback","__core_private_testing_placeholder__","ɵTestingCompiler","ɵTestingCompilerFactory"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,kBACtE,mBAAXC,QAAyBA,OAA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b,EAAQoc,KAtmDR,SAASA,GAAKC,GAEV,YADe,IAAXA,IAAqBA,EAAS,GAC9BrW,EACOA,EAAoBoW,KAAKC,GArGxC,SAASC,EAAaD,QACH,IAAXA,IAAqBA,EAAS,GAClCzW,IAAwBwW,KAAKC,GAsGlBC,CAAaD,IAimD5Brc,EAAQuc,MAplDR,SAASA,GAAMC,GACX,OAAIxW,EACOA,EAAoBuW,MAAMC,GAzGzC,SAASC,EAAcD,GACnB,OAAO5W,IAAwB2W,MAAMC,GA2G1BC,CAAcD,IAglD7Bxc,EAAQ0c,qBAxkDR,SAASA,KACL,GAAI1W,EACA,OAAOA,EAAoB0W,wBA9GnC,SAASC,IACU/W,IACNsW,sBAAsB3U,OAAS,EA+GpCoV,IAokDR3c,EAAQ8F,gBA5jDR,SAASA,KACL,OAAIE,EACOA,EAAoBF,kBAGpBD,KAwjDf7F,EAAQ6N,sBAAwBA,EAChC7N,EAAQgO,2BAA6BA,EACrChO,EAAQkO,yBAA2BA,EACnClO,EAAQ4c,qCA3DmC,GA4D3C5c,EAAQ6c,iBAAmB3F,EAC3BlX,EAAQ8c,wBAA0BrF,EAElCnR,OAAO8B,eAAepI,EAAS,cAAgB0I,OAAO","sourcesContent":["/**\n * @license Angular v7.2.10\n * (c) 2010-2019 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')) :\n typeof define === 'function' && define.amd ? define('@angular/core/testing', ['exports', '@angular/core'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.core = global.ng.core || {}, global.ng.core.testing = {}), global.ng.core));\n}(this, function (exports, core) { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. 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 /**\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('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n *\n */\n function asyncFallback(fn) {\n // If we're running using the Jasmine test framework, adapt to call the 'done'\n // function when asynchronous activity is finished.\n if (_global.jasmine) {\n // Not using an arrow function to preserve context passed from call site\n return function (done) {\n if (!done) {\n // if we run beforeEach in @angular/core/testing/testing_internal then we get no done\n // fake it here and assume sync.\n done = function () { };\n done.fail = function (e) { throw e; };\n }\n runInTestZone(fn, this, done, function (err) {\n if (typeof err === 'string') {\n return done.fail(new Error(err));\n }\n else {\n done.fail(err);\n }\n });\n };\n }\n // Otherwise, return a promise which will resolve when asynchronous activity\n // is finished. This will be correctly consumed by the Mocha framework with\n // it('...', async(myFn)); or can be used in a custom framework.\n // Not using an arrow function to preserve context passed from call site\n return function () {\n var _this = this;\n return new Promise(function (finishCallback, failCallback) {\n runInTestZone(fn, _this, finishCallback, failCallback);\n });\n };\n }\n function runInTestZone(fn, context, finishCallback, failCallback) {\n var currentZone = Zone.current;\n var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];\n if (AsyncTestZoneSpec === undefined) {\n throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/async-test.js');\n }\n var ProxyZoneSpec = Zone['ProxyZoneSpec'];\n if (ProxyZoneSpec === undefined) {\n throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/proxy.js');\n }\n var proxyZoneSpec = ProxyZoneSpec.get();\n ProxyZoneSpec.assertPresent();\n // We need to create the AsyncTestZoneSpec outside the ProxyZone.\n // If we do it in ProxyZone then we will get to infinite recursion.\n var proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');\n var previousDelegate = proxyZoneSpec.getDelegate();\n proxyZone.parent.run(function () {\n var testZoneSpec = new AsyncTestZoneSpec(function () {\n // Need to restore the original zone.\n currentZone.run(function () {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n finishCallback();\n });\n }, function (error) {\n // Need to restore the original zone.\n currentZone.run(function () {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n failCallback(error);\n });\n }, 'test');\n proxyZoneSpec.setDelegate(testZoneSpec);\n });\n return Zone.current.runGuarded(fn, context);\n }\n\n /**\n * @license\n * Copyright Google Inc. 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('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n * @publicApi\n */\n function async(fn) {\n var _Zone = typeof Zone !== 'undefined' ? Zone : null;\n if (!_Zone) {\n return function () {\n return Promise.reject('Zone is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone.js');\n };\n }\n var asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n // not using new version of zone.js\n // TODO @JiaLiPassion, remove this after all library updated to\n // newest version of zone.js(0.8.25)\n return asyncFallback(fn);\n }\n\n /**\n * @license\n * Copyright Google Inc. 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 =\n ngZone.onUnstable.subscribe({ next: function () { _this._isStable = false; } });\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 =\n ngZone.onError.subscribe({ next: function (error) { throw error; } });\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 () { _this._tick(checkNoChanges); });\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 () { this.changeDetectorRef.checkNoChanges(); };\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 () { return this._isStable && !this.ngZone.hasPendingMacrotasks; };\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) { _this._resolve = res; });\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 Inc. 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 * fakeAsync has been moved to zone.js\n * this file is for fallback in case old version of zone.js is used\n */\n var _Zone = typeof Zone !== 'undefined' ? Zone : null;\n var FakeAsyncTestZoneSpec = _Zone && _Zone['FakeAsyncTestZoneSpec'];\n var ProxyZoneSpec = _Zone && _Zone['ProxyZoneSpec'];\n var _fakeAsyncTestZoneSpec = null;\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 resetFakeAsyncZoneFallback() {\n _fakeAsyncTestZoneSpec = null;\n // in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.\n ProxyZoneSpec && ProxyZoneSpec.assertPresent().resetDelegate();\n }\n var _inFakeAsyncCall = false;\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 fakeAsyncFallback(fn) {\n // Not using an arrow function to preserve context passed from call site\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var proxyZoneSpec = ProxyZoneSpec.assertPresent();\n if (_inFakeAsyncCall) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _inFakeAsyncCall = true;\n try {\n if (!_fakeAsyncTestZoneSpec) {\n if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();\n }\n var res = void 0;\n var lastProxyZoneSpec = proxyZoneSpec.getDelegate();\n proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);\n try {\n res = fn.apply(this, args);\n flushMicrotasksFallback();\n }\n finally {\n proxyZoneSpec.setDelegate(lastProxyZoneSpec);\n }\n if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {\n throw new Error(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length + \" \" +\n \"periodic timer(s) still in the queue.\");\n }\n if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {\n throw new Error(_fakeAsyncTestZoneSpec.pendingTimers.length + \" timer(s) still in the queue.\");\n }\n return res;\n }\n finally {\n _inFakeAsyncCall = false;\n resetFakeAsyncZoneFallback();\n }\n };\n }\n function _getFakeAsyncZoneSpec() {\n if (_fakeAsyncTestZoneSpec == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n return _fakeAsyncTestZoneSpec;\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 * @publicApi\n */\n function tickFallback(millis) {\n if (millis === void 0) { millis = 0; }\n _getFakeAsyncZoneSpec().tick(millis);\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 flushFallback(maxTurns) {\n return _getFakeAsyncZoneSpec().flush(maxTurns);\n }\n /**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\n function discardPeriodicTasksFallback() {\n var zoneSpec = _getFakeAsyncZoneSpec();\n zoneSpec.pendingPeriodicTimers.length = 0;\n }\n /**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\n function flushMicrotasksFallback() {\n _getFakeAsyncZoneSpec().flushMicrotasks();\n }\n\n /**\n * @license\n * Copyright Google Inc. 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$1 = typeof Zone !== 'undefined' ? Zone : null;\n var fakeAsyncTestModule = _Zone$1 && _Zone$1[_Zone$1.__symbol__('fakeAsyncTest')];\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 else {\n return resetFakeAsyncZoneFallback();\n }\n }\n /**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception 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 else {\n return fakeAsyncFallback(fn);\n }\n }\n /**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @publicApi\n */\n function tick(millis) {\n if (millis === void 0) { millis = 0; }\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis);\n }\n else {\n return tickFallback(millis);\n }\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 else {\n return flushFallback(maxTurns);\n }\n }\n /**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\n function discardPeriodicTasks() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n }\n else {\n discardPeriodicTasksFallback();\n }\n }\n /**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\n function flushMicrotasks() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n }\n else {\n return flushMicrotasksFallback();\n }\n }\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise */\r\n\r\n var extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n\r\n function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n }\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n\r\n function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n }\r\n\r\n function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n }\n\n /**\n * @license\n * Copyright Google Inc. 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) { this._resolve(value); };\n AsyncTestCompleter.prototype.fail = function (error, stackTrace) { this._reject(error); };\n Object.defineProperty(AsyncTestCompleter.prototype, \"promise\", {\n get: function () { return this._promise; },\n enumerable: true,\n configurable: true\n });\n return AsyncTestCompleter;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 (removeValue instanceof Array) {\n removeValue.forEach(function (value) { removeObjects.add(_propHashKey(prop, value, references)); });\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 (propValue instanceof Array) {\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 && propValue instanceof Array) {\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 /**\n * @license\n * Copyright Google Inc. 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 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.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 var overrides = _this.overrides.get(type) || [];\n overrides.push(override);\n _this.overrides.set(type, overrides);\n });\n };\n OverrideResolver.prototype.getAnnotation = function (type) {\n var _this = this;\n return reflection.annotations(type).find(function (a) { return a instanceof _this.type; }) || 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 () { return core.Directive; },\n enumerable: true,\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 () { return core.Component; },\n enumerable: true,\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 () { return core.Pipe; },\n enumerable: true,\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 () { return core.NgModule; },\n enumerable: true,\n configurable: true\n });\n return NgModuleResolver;\n }(OverrideResolver));\n\n /**\n * @license\n * Copyright Google Inc. 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 Inc. 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 var EMPTY_ARRAY = [];\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 // metadata overrides\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._providerOverrides = [];\n this._rootProviderOverrides = [];\n this._providerOverridesByToken = new Map();\n this._templateOverrides = new Map();\n // test module configuration\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._activeFixtures = [];\n this._moduleRef = null;\n this._testModuleType = null;\n this._instantiated = 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/<platform_name>/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 () { _getTestBedRender3().resetTestEnvironment(); };\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 () { return _getTestBedRender3().compileComponents(); };\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.prototype.overrideTemplateUsingTestingModule = function (component, template) {\n if (this._instantiated) {\n throw new Error('Cannot override template when the test module has already been instantiated');\n }\n this._templateOverrides.set(component, template);\n };\n TestBedRender3.overrideProvider = function (token, provider) {\n _getTestBedRender3().overrideProvider(token, provider);\n return TestBedRender3;\n };\n TestBedRender3.deprecatedOverrideProvider = function (token, provider) {\n throw new Error('Render3TestBed.deprecatedOverrideProvider is not implemented');\n };\n TestBedRender3.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n return _getTestBedRender3().get(token, notFoundValue);\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/<platform_name>/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 };\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n TestBedRender3.prototype.resetTestEnvironment = function () {\n this.resetTestingModule();\n this.platform = null;\n this.ngModule = null;\n };\n TestBedRender3.prototype.resetTestingModule = function () {\n core.ɵresetCompiledComponents();\n // reset metadata overrides\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._providerOverrides = [];\n this._rootProviderOverrides = [];\n this._providerOverridesByToken.clear();\n this._templateOverrides.clear();\n // reset test module config\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._moduleRef = null;\n this._testModuleType = null;\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 TestBedRender3.prototype.configureCompiler = function (config) {\n var _a;\n if (config.useJit != null) {\n throw new Error('the Render3 compiler JiT mode is not configurable !');\n }\n if (config.providers) {\n (_a = this._providerOverrides).push.apply(_a, __spread(config.providers));\n }\n };\n TestBedRender3.prototype.configureTestingModule = function (moduleDef) {\n var _a, _b, _c, _d;\n this._assertNotInstantiated('R3TestBed.configureTestingModule', 'configure the test module');\n if (moduleDef.providers) {\n (_a = this._providers).push.apply(_a, __spread(moduleDef.providers));\n }\n if (moduleDef.declarations) {\n (_b = this._declarations).push.apply(_b, __spread(moduleDef.declarations));\n }\n if (moduleDef.imports) {\n (_c = this._imports).push.apply(_c, __spread(moduleDef.imports));\n }\n if (moduleDef.schemas) {\n (_d = this._schemas).push.apply(_d, __spread(moduleDef.schemas));\n }\n };\n TestBedRender3.prototype.compileComponents = function () {\n // assume for now that components don't use templateUrl / stylesUrl to unblock further testing\n // TODO(pk): plug into the ivy's resource fetching pipeline\n return Promise.resolve();\n };\n TestBedRender3.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n this._initIfNeeded();\n if (token === TestBedRender3) {\n return this;\n }\n return this._moduleRef.injector.get(token, notFoundValue);\n };\n TestBedRender3.prototype.execute = function (tokens, fn, context) {\n var _this = this;\n this._initIfNeeded();\n var params = tokens.map(function (t) { return _this.get(t); });\n return fn.apply(context, params);\n };\n TestBedRender3.prototype.overrideModule = function (ngModule, override) {\n this._assertNotInstantiated('overrideModule', 'override module metadata');\n this._moduleOverrides.push([ngModule, override]);\n };\n TestBedRender3.prototype.overrideComponent = function (component, override) {\n this._assertNotInstantiated('overrideComponent', 'override component metadata');\n this._componentOverrides.push([component, override]);\n };\n TestBedRender3.prototype.overrideDirective = function (directive, override) {\n this._assertNotInstantiated('overrideDirective', 'override directive metadata');\n this._directiveOverrides.push([directive, override]);\n };\n TestBedRender3.prototype.overridePipe = function (pipe, override) {\n this._assertNotInstantiated('overridePipe', 'override pipe metadata');\n this._pipeOverrides.push([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 var providerDef = provider.useFactory ?\n { provide: token, useFactory: provider.useFactory, deps: provider.deps || [] } :\n { provide: token, useValue: provider.useValue };\n var injectableDef;\n var isRoot = (typeof token !== 'string' && (injectableDef = core.ɵgetInjectableDef(token)) &&\n injectableDef.providedIn === 'root');\n var overridesBucket = isRoot ? this._rootProviderOverrides : this._providerOverrides;\n overridesBucket.push(providerDef);\n // keep all overrides grouped by token as well for fast lookups using token\n var overridesForToken = this._providerOverridesByToken.get(token) || [];\n overridesForToken.push(providerDef);\n this._providerOverridesByToken.set(token, overridesForToken);\n };\n TestBedRender3.prototype.deprecatedOverrideProvider = function (token, provider) {\n throw new Error('No implemented in IVY');\n };\n TestBedRender3.prototype.createComponent = function (type) {\n var _this = this;\n this._initIfNeeded();\n var testComponentRenderer = this.get(TestComponentRenderer);\n var rootElId = \"root\" + _nextRootElementId++;\n testComponentRenderer.insertRootElement(rootElId);\n var componentDef = type.ngComponentDef;\n if (!componentDef) {\n throw new Error(\"It looks like '\" + core.ɵstringify(type) + \"' has not been IVY compiled - it has no 'ngComponentDef' field\");\n }\n var noNgZone = this.get(ComponentFixtureNoNgZone, false);\n var autoDetect = this.get(ComponentFixtureAutoDetect, false);\n var ngZone = noNgZone ? null : this.get(core.NgZone, null);\n var componentFactory = new core.ɵRender3ComponentFactory(componentDef);\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 ? ngZone.run(initComponent) : initComponent();\n this._activeFixtures.push(fixture);\n return fixture;\n };\n // internal methods\n TestBedRender3.prototype._initIfNeeded = function () {\n if (this._instantiated) {\n return;\n }\n var resolvers = this._getResolvers();\n this._testModuleType = this._createTestModule();\n this._compileNgModule(this._testModuleType, resolvers);\n var parentInjector = this.platform.injector;\n this._moduleRef = new core.ɵRender3NgModuleRef(this._testModuleType, parentInjector);\n // ApplicationInitStatus.runInitializers() is marked @internal\n // to core. Cast it to any before accessing it.\n this._moduleRef.injector.get(core.ApplicationInitStatus).runInitializers();\n this._instantiated = true;\n };\n // get overrides for a specific provider (if any)\n TestBedRender3.prototype._getProviderOverrides = function (provider) {\n var token = typeof provider === 'object' && provider.hasOwnProperty('provide') ?\n provider.provide :\n provider;\n return this._providerOverridesByToken.get(token) || [];\n };\n // creates resolvers taking overrides into account\n TestBedRender3.prototype._getResolvers = function () {\n var module = new NgModuleResolver();\n module.setOverrides(this._moduleOverrides);\n var component = new ComponentResolver();\n component.setOverrides(this._componentOverrides);\n var directive = new DirectiveResolver();\n directive.setOverrides(this._directiveOverrides);\n var pipe = new PipeResolver();\n pipe.setOverrides(this._pipeOverrides);\n return { module: module, component: component, directive: directive, pipe: pipe };\n };\n TestBedRender3.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 TestBedRender3.prototype._createTestModule = function () {\n var rootProviderOverrides = this._rootProviderOverrides;\n var RootScopeModule = /** @class */ (function () {\n function RootScopeModule() {\n }\n RootScopeModule = __decorate([\n core.NgModule({\n providers: __spread(rootProviderOverrides),\n jit: true,\n })\n ], RootScopeModule);\n return RootScopeModule;\n }());\n var ngZone = new core.NgZone({ enableLongStackTrace: true });\n var providers = __spread([{ provide: core.NgZone, useValue: ngZone }], this._providers, this._providerOverrides);\n var declarations = this._declarations;\n var imports = [RootScopeModule, this.ngModule, this._imports];\n var schemas = this._schemas;\n var DynamicTestModule = /** @class */ (function () {\n function DynamicTestModule() {\n }\n DynamicTestModule = __decorate([\n core.NgModule({ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true })\n ], DynamicTestModule);\n return DynamicTestModule;\n }());\n return DynamicTestModule;\n };\n TestBedRender3.prototype._getMetaWithOverrides = function (meta, type) {\n var _this = this;\n var overrides = {};\n if (meta.providers && meta.providers.length) {\n var providerOverrides = flatten(meta.providers, function (provider) { return _this._getProviderOverrides(provider); });\n if (providerOverrides.length) {\n overrides.providers = __spread(meta.providers, providerOverrides);\n }\n }\n var hasTemplateOverride = !!type && this._templateOverrides.has(type);\n if (hasTemplateOverride) {\n overrides.template = this._templateOverrides.get(type);\n }\n return Object.keys(overrides).length ? __assign({}, meta, overrides) : meta;\n };\n TestBedRender3.prototype._compileNgModule = function (moduleType, resolvers) {\n var _this = this;\n var ngModule = resolvers.module.resolve(moduleType);\n if (ngModule === null) {\n throw new Error(core.ɵstringify(moduleType) + \" has not @NgModule annotation\");\n }\n var metadata = this._getMetaWithOverrides(ngModule);\n core.ɵcompileNgModuleDefs(moduleType, metadata);\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY, core.resolveForwardRef);\n var compiledComponents = [];\n // Compile the components, directives and pipes declared by this module\n declarations.forEach(function (declaration) {\n var component = resolvers.component.resolve(declaration);\n if (component) {\n var metadata_1 = _this._getMetaWithOverrides(component, declaration);\n core.ɵcompileComponent(declaration, metadata_1);\n compiledComponents.push(declaration);\n return;\n }\n var directive = resolvers.directive.resolve(declaration);\n if (directive) {\n var metadata_2 = _this._getMetaWithOverrides(directive);\n core.ɵcompileDirective(declaration, metadata_2);\n return;\n }\n var pipe = resolvers.pipe.resolve(declaration);\n if (pipe) {\n core.ɵcompilePipe(declaration, pipe);\n return;\n }\n });\n // Compile transitive modules, components, directives and pipes\n var transitiveScope = this._transitiveScopesFor(moduleType, resolvers);\n compiledComponents.forEach(function (cmp) {\n var scope = _this._templateOverrides.has(cmp) ?\n // if we have template override via `TestBed.overrideTemplateUsingTestingModule` -\n // define Component scope as TestingModule scope, instead of the scope of NgModule\n // where this Component was declared\n _this._transitiveScopesFor(_this._testModuleType, resolvers) :\n transitiveScope;\n core.ɵpatchComponentDefWithScope(cmp.ngComponentDef, scope);\n });\n };\n /**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given\n * module.\n *\n * This operation is memoized and the result is cached on the module's definition. It can be\n * called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n */\n TestBedRender3.prototype._transitiveScopesFor = function (moduleType, resolvers) {\n var _this = this;\n if (!isNgModule(moduleType)) {\n throw new Error(moduleType.name + \" does not have an ngModuleDef\");\n }\n var def = moduleType.ngModuleDef;\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n var scopes = {\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set(),\n },\n };\n def.declarations.forEach(function (declared) {\n var declaredWithDefs = declared;\n if (declaredWithDefs.ngPipeDef !== undefined) {\n scopes.compilation.pipes.add(declared);\n }\n else {\n scopes.compilation.directives.add(declared);\n }\n });\n def.imports.forEach(function (imported) {\n var ngModule = resolvers.module.resolve(imported);\n if (ngModule === null) {\n throw new Error(\"Importing \" + imported.name + \" which does not have an @ngModule\");\n }\n else {\n _this._compileNgModule(imported, resolvers);\n }\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n var importedScope = _this._transitiveScopesFor(imported, resolvers);\n importedScope.exported.directives.forEach(function (entry) { return scopes.compilation.directives.add(entry); });\n importedScope.exported.pipes.forEach(function (entry) { return scopes.compilation.pipes.add(entry); });\n });\n def.exports.forEach(function (exported) {\n var exportedTyped = exported;\n // Either the type is a module, a pipe, or a component/directive (which may not have an\n // ngComponentDef as it might be compiled asynchronously).\n if (isNgModule(exportedTyped)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n var exportedScope = _this._transitiveScopesFor(exportedTyped, resolvers);\n exportedScope.exported.directives.forEach(function (entry) {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(function (entry) {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n }\n else if (exportedTyped.ngPipeDef !== undefined) {\n scopes.exported.pipes.add(exportedTyped);\n }\n else {\n scopes.exported.directives.add(exportedTyped);\n }\n });\n def.transitiveCompileScopes = scopes;\n return scopes;\n };\n return TestBedRender3;\n }());\n var testBed;\n function _getTestBedRender3() {\n return testBed = testBed || new TestBedRender3();\n }\n function flatten(values, mapFn) {\n var out = [];\n values.forEach(function (value) {\n if (Array.isArray(value)) {\n out.push.apply(out, __spread(flatten(value, mapFn)));\n }\n else {\n out.push(mapFn ? mapFn(value) : value);\n }\n });\n return out;\n }\n function isNgModule(value) {\n return value.ngModuleDef !== undefined;\n }\n\n /**\n * @license\n * Copyright Google Inc. 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 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 () { throw unimplemented(); },\n enumerable: true,\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) { throw unimplemented(); };\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) { throw unimplemented(); };\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) { throw unimplemented(); };\n TestingCompiler = __decorate([\n core.Injectable()\n ], TestingCompiler);\n return TestingCompiler;\n }(core.Compiler));\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 /**\n * @license\n * Copyright Google Inc. 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 UNDEFINED = new Object();\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/<platform_name>/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 () { _getTestBedViewEngine().resetTestEnvironment(); };\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 () { return getTestBed().compileComponents(); };\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.deprecatedOverrideProvider = function (token, provider) {\n _getTestBedViewEngine().deprecatedOverrideProvider(token, provider);\n return TestBedViewEngine;\n };\n TestBedViewEngine.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n return _getTestBedViewEngine().get(token, notFoundValue);\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/<platform_name>/testing'.\n */\n TestBedViewEngine.prototype.initTestEnvironment = function (ngModule, platform, aotSummaries) {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n this.platform = platform;\n this.ngModule = ngModule;\n if (aotSummaries) {\n this._testEnvAotSummaries = aotSummaries;\n }\n };\n /**\n * Reset the providers for the test injector.\n */\n TestBedViewEngine.prototype.resetTestEnvironment = function () {\n this.resetTestingModule();\n this.platform = null;\n this.ngModule = null;\n this._testEnvAotSummaries = function () { return []; };\n };\n TestBedViewEngine.prototype.resetTestingModule = function () {\n core.ɵclearOverrides();\n this._aotSummaries = [];\n this._templateOverrides = [];\n this._compiler = null;\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._isRoot = true;\n this._rootProviderOverrides = [];\n this._moduleRef = null;\n this._moduleFactory = null;\n this._compilerOptions = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._instantiated = false;\n this._activeFixtures.forEach(function (fixture) {\n try {\n fixture.destroy();\n }\n catch (e) {\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n };\n TestBedViewEngine.prototype.configureCompiler = function (config) {\n this._assertNotInstantiated('TestBed.configureCompiler', 'configure the compiler');\n this._compilerOptions.push(config);\n };\n TestBedViewEngine.prototype.configureTestingModule = function (moduleDef) {\n var _a, _b, _c, _d;\n this._assertNotInstantiated('TestBed.configureTestingModule', 'configure the test module');\n if (moduleDef.providers) {\n (_a = this._providers).push.apply(_a, __spread(moduleDef.providers));\n }\n if (moduleDef.declarations) {\n (_b = this._declarations).push.apply(_b, __spread(moduleDef.declarations));\n }\n if (moduleDef.imports) {\n (_c = this._imports).push.apply(_c, __spread(moduleDef.imports));\n }\n if (moduleDef.schemas) {\n (_d = this._schemas).push.apply(_d, __spread(moduleDef.schemas));\n }\n if (moduleDef.aotSummaries) {\n this._aotSummaries.push(moduleDef.aotSummaries);\n }\n };\n TestBedViewEngine.prototype.compileComponents = function () {\n var _this = this;\n if (this._moduleFactory || this._instantiated) {\n return Promise.resolve(null);\n }\n var moduleType = this._createCompilerAndModule();\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType)\n .then(function (moduleAndComponentFactories) {\n _this._moduleFactory = moduleAndComponentFactories.ngModuleFactory;\n });\n };\n TestBedViewEngine.prototype._initIfNeeded = function () {\n var e_1, _a;\n if (this._instantiated) {\n return;\n }\n if (!this._moduleFactory) {\n try {\n var moduleType = this._createCompilerAndModule();\n this._moduleFactory =\n this._compiler.compileModuleAndAllComponentsSync(moduleType).ngModuleFactory;\n }\n catch (e) {\n var errorCompType = this._compiler.getComponentFromError(e);\n if (errorCompType) {\n throw new Error(\"This test module uses the component \" + core.ɵstringify(errorCompType) + \" which is using a \\\"templateUrl\\\" or \\\"styleUrls\\\", but they were never compiled. \" +\n \"Please call \\\"TestBed.compileComponents\\\" before your test.\");\n }\n else {\n throw e;\n }\n }\n }\n try {\n for (var _b = __values(this._templateOverrides), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = _c.value, component = _d.component, templateOf = _d.templateOf;\n var compFactory = this._compiler.getComponentFactory(templateOf);\n core.ɵoverrideComponentView(component, compFactory);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var ngZone = new core.NgZone({ enableLongStackTrace: true });\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 _this = this;\n var e_2, _a;\n var providers = this._providers.concat([{ provide: TestBed, useValue: this }]);\n var declarations = __spread(this._declarations, this._templateOverrides.map(function (entry) { return entry.templateOf; }));\n var rootScopeImports = [];\n var rootProviderOverrides = this._rootProviderOverrides;\n if (this._isRoot) {\n var RootScopeModule = /** @class */ (function () {\n function RootScopeModule() {\n }\n RootScopeModule = __decorate([\n core.NgModule({\n providers: __spread(rootProviderOverrides),\n jit: true,\n })\n ], RootScopeModule);\n return RootScopeModule;\n }());\n rootScopeImports.push(RootScopeModule);\n }\n providers.push({ provide: core.ɵAPP_ROOT, useValue: this._isRoot });\n var imports = [rootScopeImports, this.ngModule, this._imports];\n var schemas = this._schemas;\n var DynamicTestModule = /** @class */ (function () {\n function DynamicTestModule() {\n }\n DynamicTestModule = __decorate([\n core.NgModule({ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true })\n ], DynamicTestModule);\n return DynamicTestModule;\n }());\n var compilerFactory = this.platform.injector.get(TestingCompilerFactory);\n this._compiler = compilerFactory.createTestingCompiler(this._compilerOptions);\n try {\n for (var _b = __values(__spread([this._testEnvAotSummaries], this._aotSummaries)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var summary = _c.value;\n this._compiler.loadAotSummaries(summary);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this._moduleOverrides.forEach(function (entry) { return _this._compiler.overrideModule(entry[0], entry[1]); });\n this._componentOverrides.forEach(function (entry) { return _this._compiler.overrideComponent(entry[0], entry[1]); });\n this._directiveOverrides.forEach(function (entry) { return _this._compiler.overrideDirective(entry[0], entry[1]); });\n this._pipeOverrides.forEach(function (entry) { return _this._compiler.overridePipe(entry[0], entry[1]); });\n return DynamicTestModule;\n };\n TestBedViewEngine.prototype._assertNotInstantiated = function (methodName, methodDescription) {\n if (this._instantiated) {\n throw new Error(\"Cannot \" + methodDescription + \" when the test module has already been instantiated. \" +\n (\"Make sure you are not using `inject` before `\" + methodName + \"`.\"));\n }\n };\n TestBedViewEngine.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\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 result = this._moduleRef.injector.get(token, UNDEFINED);\n return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result;\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.get(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.overrideProviderImpl(token, provider);\n };\n TestBedViewEngine.prototype.deprecatedOverrideProvider = function (token, provider) {\n this.overrideProviderImpl(token, provider, /* deprecated */ true);\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 OverrideComponent = __decorate([\n core.Component({ selector: 'empty', template: template, jit: true })\n ], OverrideComponent);\n return OverrideComponent;\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 var noNgZone = this.get(ComponentFixtureNoNgZone, false);\n var autoDetect = this.get(ComponentFixtureAutoDetect, false);\n var ngZone = noNgZone ? null : this.get(core.NgZone, null);\n var testComponentRenderer = this.get(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.get(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 () { return testBed.execute(tokens, fn, this); };\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 Inc. 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$1 = (typeof window === 'undefined' ? global : window);\n // Reset the test providers and the fake async zone before each test.\n if (_global$1.beforeEach) {\n _global$1.beforeEach(function () {\n TestBed.resetTestingModule();\n resetFakeAsyncZone();\n });\n }\n // TODO(juliemr): remove this, only used because we need to export something to have compilation\n // work.\n var __core_private_testing_placeholder__ = '';\n\n /**\n * @license\n * Copyright Google Inc. 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 Inc. 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 Inc. 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 Inc. 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.ɵangular_packages_core_testing_testing_b = TestBedRender3;\n exports.ɵangular_packages_core_testing_testing_c = _getTestBedRender3;\n exports.ɵangular_packages_core_testing_testing_a = TestBedViewEngine;\n exports.TestBed = TestBed;\n exports.getTestBed = getTestBed;\n exports.inject = inject;\n exports.InjectSetupWrapper = InjectSetupWrapper;\n exports.withModule = withModule;\n exports.ɵMetadataOverrider = MetadataOverrider;\n exports.async = async;\n exports.ComponentFixture = ComponentFixture;\n exports.resetFakeAsyncZone = resetFakeAsyncZone;\n exports.fakeAsync = fakeAsync;\n exports.tick = tick;\n exports.flush = flush;\n exports.discardPeriodicTasks = discardPeriodicTasks;\n exports.flushMicrotasks = flushMicrotasks;\n exports.TestComponentRenderer = TestComponentRenderer;\n exports.ComponentFixtureAutoDetect = ComponentFixtureAutoDetect;\n exports.ComponentFixtureNoNgZone = ComponentFixtureNoNgZone;\n exports.__core_private_testing_placeholder__ = __core_private_testing_placeholder__;\n exports.ɵTestingCompiler = TestingCompiler;\n exports.ɵTestingCompilerFactory = TestingCompilerFactory;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=core-testing.umd.js.map\n"]}
1
+ {"version":3,"sources":["packages/core/core-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","core","testing","this","_global","window","runInTestZone","fn","context","finishCallback","failCallback","currentZone","Zone","current","AsyncTestZoneSpec","undefined","Error","ProxyZoneSpec","proxyZoneSpec","get","assertPresent","proxyZone","getZoneWith","previousDelegate","getDelegate","parent","run","testZoneSpec","setDelegate","error","runGuarded","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","hasPendingMacrotasks","onError","prototype","_tick","checkNoChanges","autoDetectChanges","autoDetect","isStable","whenStable","Promise","resolve","res","_getRenderer","_renderer","injector","RendererFactory2","whenRenderingDone","renderer","destroy","unsubscribe","_Zone","FakeAsyncTestZoneSpec","_fakeAsyncTestZoneSpec","resetFakeAsyncZoneFallback","resetDelegate","_inFakeAsyncCall","_getFakeAsyncZoneSpec","flushMicrotasksFallback","flushMicrotasks","_Zone$1","fakeAsyncTestModule","__symbol__","resetFakeAsyncZone","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__values","o","m","Symbol","iterator","value","done","__read","e","ar","push","__spread","concat","AsyncTestCompleter","rej","_reject","fail","stackTrace","enumerable","configurable","_nextReferenceId","MetadataOverrider","_references","Map","overrideMetadata","metadataClass","oldMetadata","override","props","_valueProps","obj","keys","forEach","prop","startsWith","proto","getPrototypeOf","protoProp","set","remove","add","ɵstringify","setMetadata","metadata","removeMetadata","references","removeObjects","Set","_loop_1","removeValue","_propHashKey","_loop_2","propValue","filter","has","addMetadata","addValue","propName","JSON","stringify","_serializeReference","ref","id","testBed","reflection","ɵReflectionCapabilities","OverrideResolver","overrides","resolved","setOverrides","clear","_a","_b","type","getAnnotation","annotations","find","a","overrider_1","DirectiveResolver","_super","Directive","ComponentResolver","Component","PipeResolver","Pipe","NgModuleResolver","NgModule","TestComponentRenderer","insertRootElement","rootElementId","ComponentFixtureAutoDetect","InjectionToken","ComponentFixtureNoNgZone","_nextRootElementId","EMPTY_ARRAY","TestBedRender3","platform","ngModule","_moduleOverrides","_componentOverrides","_directiveOverrides","_pipeOverrides","_providerOverrides","_rootProviderOverrides","_providerOverridesByToken","_templateOverrides","_providers","_declarations","_imports","_schemas","_activeFixtures","_moduleRef","_testModuleType","_instantiated","initTestEnvironment","aotSummaries","_getTestBedRender3","resetTestEnvironment","configureCompiler","config","configureTestingModule","moduleDef","compileComponents","overrideModule","overrideComponent","component","overrideDirective","directive","overridePipe","pipe","overrideTemplate","template","templateUrl","overrideTemplateUsingTestingModule","overrideProvider","token","provider","deprecatedOverrideProvider","notFoundValue","Injector","THROW_IF_NOT_FOUND","createComponent","resetTestingModule","ɵresetCompiledComponents","fixture","console","stacktrace","useJit","providers","_c","_d","_assertNotInstantiated","declarations","imports","schemas","_initIfNeeded","execute","tokens","params","map","injectableDef","providerDef","useFactory","provide","deps","useValue","ɵgetInjectableDef","providedIn","overridesForToken","testComponentRenderer","rootElId","componentDef","ngComponentDef","noNgZone","NgZone","componentFactory","ɵRender3ComponentFactory","initComponent","NULL","resolvers","_getResolvers","_createTestModule","_compileNgModule","ɵRender3NgModuleRef","ApplicationInitStatus","runInitializers","_getProviderOverrides","methodName","methodDescription","rootProviderOverrides","RootScopeModule","jit","enableLongStackTrace","DynamicTestModule","_getMetaWithOverrides","meta","providerOverrides","flatten","moduleType","ɵcompileNgModuleDefs","compiledComponents","resolveForwardRef","declaration","metadata_1","ɵcompileComponent","metadata_2","ɵcompileDirective","ɵcompilePipe","transitiveScope","_transitiveScopesFor","cmp","scope","ɵpatchComponentDefWithScope","isNgModule","name","def","ngModuleDef","transitiveCompileScopes","scopes","compilation","directives","pipes","exported","declared","ngPipeDef","imported","importedScope","entry","exportedTyped","exportedScope","values","mapFn","out","isArray","unimplemented","testBed$1","TestingCompiler","loadAotSummaries","summaries","getComponentFactory","getComponentFromError","Injectable","Compiler","TestingCompilerFactory","UNDEFINED","_nextRootElementId$1","TestBedViewEngine","_compiler","_moduleFactory","_compilerOptions","_testEnvAotSummaries","_aotSummaries","_isRoot","_getTestBedViewEngine","getTestBed","ɵclearOverrides","_createCompilerAndModule","compileModuleAndAllComponentsAsync","then","moduleAndComponentFactories","ngModuleFactory","e_1","compileModuleAndAllComponentsSync","errorCompType","compFactory","templateOf","ɵoverrideComponentView","e_1_1","return","ngZoneInjector","e_2","TestBed","rootScopeImports","ɵAPP_ROOT","compilerFactory","createTestingCompiler","e_2_1","result","overrideProviderImpl","deprecated","flags","dep","depToken","depFlags","Optional","SkipSelf","ɵoverrideProvider","deprecatedBehavior","OverrideComponent","selector","ɵivyEnabled","inject","indexOf","completer","promise","InjectSetupWrapper","_moduleDef","_addModule","_global$1","beforeEach","ɵangular_packages_core_testing_testing_b","ɵangular_packages_core_testing_testing_c","ɵangular_packages_core_testing_testing_a","withModule","ɵMetadataOverrider","async","reject","asyncTest","asyncFallback","jasmine","err","fakeAsync","fakeAsyncFallback","args","_i","lastProxyZoneSpec","pendingPeriodicTimers","pendingTimers","tick","millis","tickFallback","flush","maxTurns","flushFallback","discardPeriodicTasks","discardPeriodicTasksFallback","__core_private_testing_placeholder__","ɵTestingCompiler","ɵTestingCompilerFactory"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,kBACtE,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,yBAA0B,UAAW,iBAAkBJ,GACjFA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAK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oBoW,KAAKC,GArGxC,SAASC,EAAaD,QACH,IAAXA,IAAqBA,EAAS,GAClCzW,IAAwBwW,KAAKC,GAsGlBC,CAAaD,IAimD5Brc,EAAQuc,MAplDR,SAASA,GAAMC,GACX,OAAIxW,EACOA,EAAoBuW,MAAMC,GAzGzC,SAASC,EAAcD,GACnB,OAAO5W,IAAwB2W,MAAMC,GA2G1BC,CAAcD,IAglD7Bxc,EAAQ0c,qBAxkDR,SAASA,KACL,GAAI1W,EACA,OAAOA,EAAoB0W,wBA9GnC,SAASC,IACU/W,IACNsW,sBAAsB3U,OAAS,EA+GpCoV,IAokDR3c,EAAQ8F,gBA5jDR,SAASA,KACL,OAAIE,EACOA,EAAoBF,kBAGpBD,KAwjDf7F,EAAQ6N,sBAAwBA,EAChC7N,EAAQgO,2BAA6BA,EACrChO,EAAQkO,yBAA2BA,EACnClO,EAAQ4c,qCA3DmC,GA4D3C5c,EAAQ6c,iBAAmB3F,EAC3BlX,EAAQ8c,wBAA0BrF,EAElCnR,OAAO8B,eAAepI,EAAS,cAAgB0I,OAAO","sourcesContent":["/**\n * @license Angular v7.2.14\n * (c) 2010-2019 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')) :\n typeof define === 'function' && define.amd ? define('@angular/core/testing', ['exports', '@angular/core'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.core = global.ng.core || {}, global.ng.core.testing = {}), global.ng.core));\n}(this, function (exports, core) { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. 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 /**\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('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n *\n */\n function asyncFallback(fn) {\n // If we're running using the Jasmine test framework, adapt to call the 'done'\n // function when asynchronous activity is finished.\n if (_global.jasmine) {\n // Not using an arrow function to preserve context passed from call site\n return function (done) {\n if (!done) {\n // if we run beforeEach in @angular/core/testing/testing_internal then we get no done\n // fake it here and assume sync.\n done = function () { };\n done.fail = function (e) { throw e; };\n }\n runInTestZone(fn, this, done, function (err) {\n if (typeof err === 'string') {\n return done.fail(new Error(err));\n }\n else {\n done.fail(err);\n }\n });\n };\n }\n // Otherwise, return a promise which will resolve when asynchronous activity\n // is finished. This will be correctly consumed by the Mocha framework with\n // it('...', async(myFn)); or can be used in a custom framework.\n // Not using an arrow function to preserve context passed from call site\n return function () {\n var _this = this;\n return new Promise(function (finishCallback, failCallback) {\n runInTestZone(fn, _this, finishCallback, failCallback);\n });\n };\n }\n function runInTestZone(fn, context, finishCallback, failCallback) {\n var currentZone = Zone.current;\n var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];\n if (AsyncTestZoneSpec === undefined) {\n throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/async-test.js');\n }\n var ProxyZoneSpec = Zone['ProxyZoneSpec'];\n if (ProxyZoneSpec === undefined) {\n throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/proxy.js');\n }\n var proxyZoneSpec = ProxyZoneSpec.get();\n ProxyZoneSpec.assertPresent();\n // We need to create the AsyncTestZoneSpec outside the ProxyZone.\n // If we do it in ProxyZone then we will get to infinite recursion.\n var proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');\n var previousDelegate = proxyZoneSpec.getDelegate();\n proxyZone.parent.run(function () {\n var testZoneSpec = new AsyncTestZoneSpec(function () {\n // Need to restore the original zone.\n currentZone.run(function () {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n finishCallback();\n });\n }, function (error) {\n // Need to restore the original zone.\n currentZone.run(function () {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n failCallback(error);\n });\n }, 'test');\n proxyZoneSpec.setDelegate(testZoneSpec);\n });\n return Zone.current.runGuarded(fn, context);\n }\n\n /**\n * @license\n * Copyright Google Inc. 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('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n * @publicApi\n */\n function async(fn) {\n var _Zone = typeof Zone !== 'undefined' ? Zone : null;\n if (!_Zone) {\n return function () {\n return Promise.reject('Zone is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone.js');\n };\n }\n var asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n // not using new version of zone.js\n // TODO @JiaLiPassion, remove this after all library updated to\n // newest version of zone.js(0.8.25)\n return asyncFallback(fn);\n }\n\n /**\n * @license\n * Copyright Google Inc. 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 =\n ngZone.onUnstable.subscribe({ next: function () { _this._isStable = false; } });\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 =\n ngZone.onError.subscribe({ next: function (error) { throw error; } });\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 () { _this._tick(checkNoChanges); });\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 () { this.changeDetectorRef.checkNoChanges(); };\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 () { return this._isStable && !this.ngZone.hasPendingMacrotasks; };\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) { _this._resolve = res; });\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 Inc. 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 * fakeAsync has been moved to zone.js\n * this file is for fallback in case old version of zone.js is used\n */\n var _Zone = typeof Zone !== 'undefined' ? Zone : null;\n var FakeAsyncTestZoneSpec = _Zone && _Zone['FakeAsyncTestZoneSpec'];\n var ProxyZoneSpec = _Zone && _Zone['ProxyZoneSpec'];\n var _fakeAsyncTestZoneSpec = null;\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 resetFakeAsyncZoneFallback() {\n _fakeAsyncTestZoneSpec = null;\n // in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.\n ProxyZoneSpec && ProxyZoneSpec.assertPresent().resetDelegate();\n }\n var _inFakeAsyncCall = false;\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 fakeAsyncFallback(fn) {\n // Not using an arrow function to preserve context passed from call site\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var proxyZoneSpec = ProxyZoneSpec.assertPresent();\n if (_inFakeAsyncCall) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _inFakeAsyncCall = true;\n try {\n if (!_fakeAsyncTestZoneSpec) {\n if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();\n }\n var res = void 0;\n var lastProxyZoneSpec = proxyZoneSpec.getDelegate();\n proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);\n try {\n res = fn.apply(this, args);\n flushMicrotasksFallback();\n }\n finally {\n proxyZoneSpec.setDelegate(lastProxyZoneSpec);\n }\n if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {\n throw new Error(_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length + \" \" +\n \"periodic timer(s) still in the queue.\");\n }\n if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {\n throw new Error(_fakeAsyncTestZoneSpec.pendingTimers.length + \" timer(s) still in the queue.\");\n }\n return res;\n }\n finally {\n _inFakeAsyncCall = false;\n resetFakeAsyncZoneFallback();\n }\n };\n }\n function _getFakeAsyncZoneSpec() {\n if (_fakeAsyncTestZoneSpec == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n return _fakeAsyncTestZoneSpec;\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 * @publicApi\n */\n function tickFallback(millis) {\n if (millis === void 0) { millis = 0; }\n _getFakeAsyncZoneSpec().tick(millis);\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 flushFallback(maxTurns) {\n return _getFakeAsyncZoneSpec().flush(maxTurns);\n }\n /**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\n function discardPeriodicTasksFallback() {\n var zoneSpec = _getFakeAsyncZoneSpec();\n zoneSpec.pendingPeriodicTimers.length = 0;\n }\n /**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\n function flushMicrotasksFallback() {\n _getFakeAsyncZoneSpec().flushMicrotasks();\n }\n\n /**\n * @license\n * Copyright Google Inc. 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$1 = typeof Zone !== 'undefined' ? Zone : null;\n var fakeAsyncTestModule = _Zone$1 && _Zone$1[_Zone$1.__symbol__('fakeAsyncTest')];\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 else {\n return resetFakeAsyncZoneFallback();\n }\n }\n /**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception 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 else {\n return fakeAsyncFallback(fn);\n }\n }\n /**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @publicApi\n */\n function tick(millis) {\n if (millis === void 0) { millis = 0; }\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis);\n }\n else {\n return tickFallback(millis);\n }\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 else {\n return flushFallback(maxTurns);\n }\n }\n /**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\n function discardPeriodicTasks() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n }\n else {\n discardPeriodicTasksFallback();\n }\n }\n /**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\n function flushMicrotasks() {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n }\n else {\n return flushMicrotasksFallback();\n }\n }\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise */\r\n\r\n var extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n\r\n function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n }\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n\r\n function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n }\r\n\r\n function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n }\n\n /**\n * @license\n * Copyright Google Inc. 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) { this._resolve(value); };\n AsyncTestCompleter.prototype.fail = function (error, stackTrace) { this._reject(error); };\n Object.defineProperty(AsyncTestCompleter.prototype, \"promise\", {\n get: function () { return this._promise; },\n enumerable: true,\n configurable: true\n });\n return AsyncTestCompleter;\n }());\n\n /**\n * @license\n * Copyright Google Inc. 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 (removeValue instanceof Array) {\n removeValue.forEach(function (value) { removeObjects.add(_propHashKey(prop, value, references)); });\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 (propValue instanceof Array) {\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 && propValue instanceof Array) {\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 /**\n * @license\n * Copyright Google Inc. 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 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.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 var overrides = _this.overrides.get(type) || [];\n overrides.push(override);\n _this.overrides.set(type, overrides);\n });\n };\n OverrideResolver.prototype.getAnnotation = function (type) {\n var _this = this;\n return reflection.annotations(type).find(function (a) { return a instanceof _this.type; }) || 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 () { return core.Directive; },\n enumerable: true,\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 () { return core.Component; },\n enumerable: true,\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 () { return core.Pipe; },\n enumerable: true,\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 () { return core.NgModule; },\n enumerable: true,\n configurable: true\n });\n return NgModuleResolver;\n }(OverrideResolver));\n\n /**\n * @license\n * Copyright Google Inc. 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 Inc. 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 var EMPTY_ARRAY = [];\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 // metadata overrides\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._providerOverrides = [];\n this._rootProviderOverrides = [];\n this._providerOverridesByToken = new Map();\n this._templateOverrides = new Map();\n // test module configuration\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._activeFixtures = [];\n this._moduleRef = null;\n this._testModuleType = null;\n this._instantiated = 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/<platform_name>/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 () { _getTestBedRender3().resetTestEnvironment(); };\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 () { return _getTestBedRender3().compileComponents(); };\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.prototype.overrideTemplateUsingTestingModule = function (component, template) {\n if (this._instantiated) {\n throw new Error('Cannot override template when the test module has already been instantiated');\n }\n this._templateOverrides.set(component, template);\n };\n TestBedRender3.overrideProvider = function (token, provider) {\n _getTestBedRender3().overrideProvider(token, provider);\n return TestBedRender3;\n };\n TestBedRender3.deprecatedOverrideProvider = function (token, provider) {\n throw new Error('Render3TestBed.deprecatedOverrideProvider is not implemented');\n };\n TestBedRender3.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n return _getTestBedRender3().get(token, notFoundValue);\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/<platform_name>/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 };\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n TestBedRender3.prototype.resetTestEnvironment = function () {\n this.resetTestingModule();\n this.platform = null;\n this.ngModule = null;\n };\n TestBedRender3.prototype.resetTestingModule = function () {\n core.ɵresetCompiledComponents();\n // reset metadata overrides\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._providerOverrides = [];\n this._rootProviderOverrides = [];\n this._providerOverridesByToken.clear();\n this._templateOverrides.clear();\n // reset test module config\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._moduleRef = null;\n this._testModuleType = null;\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 TestBedRender3.prototype.configureCompiler = function (config) {\n var _a;\n if (config.useJit != null) {\n throw new Error('the Render3 compiler JiT mode is not configurable !');\n }\n if (config.providers) {\n (_a = this._providerOverrides).push.apply(_a, __spread(config.providers));\n }\n };\n TestBedRender3.prototype.configureTestingModule = function (moduleDef) {\n var _a, _b, _c, _d;\n this._assertNotInstantiated('R3TestBed.configureTestingModule', 'configure the test module');\n if (moduleDef.providers) {\n (_a = this._providers).push.apply(_a, __spread(moduleDef.providers));\n }\n if (moduleDef.declarations) {\n (_b = this._declarations).push.apply(_b, __spread(moduleDef.declarations));\n }\n if (moduleDef.imports) {\n (_c = this._imports).push.apply(_c, __spread(moduleDef.imports));\n }\n if (moduleDef.schemas) {\n (_d = this._schemas).push.apply(_d, __spread(moduleDef.schemas));\n }\n };\n TestBedRender3.prototype.compileComponents = function () {\n // assume for now that components don't use templateUrl / stylesUrl to unblock further testing\n // TODO(pk): plug into the ivy's resource fetching pipeline\n return Promise.resolve();\n };\n TestBedRender3.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n this._initIfNeeded();\n if (token === TestBedRender3) {\n return this;\n }\n return this._moduleRef.injector.get(token, notFoundValue);\n };\n TestBedRender3.prototype.execute = function (tokens, fn, context) {\n var _this = this;\n this._initIfNeeded();\n var params = tokens.map(function (t) { return _this.get(t); });\n return fn.apply(context, params);\n };\n TestBedRender3.prototype.overrideModule = function (ngModule, override) {\n this._assertNotInstantiated('overrideModule', 'override module metadata');\n this._moduleOverrides.push([ngModule, override]);\n };\n TestBedRender3.prototype.overrideComponent = function (component, override) {\n this._assertNotInstantiated('overrideComponent', 'override component metadata');\n this._componentOverrides.push([component, override]);\n };\n TestBedRender3.prototype.overrideDirective = function (directive, override) {\n this._assertNotInstantiated('overrideDirective', 'override directive metadata');\n this._directiveOverrides.push([directive, override]);\n };\n TestBedRender3.prototype.overridePipe = function (pipe, override) {\n this._assertNotInstantiated('overridePipe', 'override pipe metadata');\n this._pipeOverrides.push([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 var providerDef = provider.useFactory ?\n { provide: token, useFactory: provider.useFactory, deps: provider.deps || [] } :\n { provide: token, useValue: provider.useValue };\n var injectableDef;\n var isRoot = (typeof token !== 'string' && (injectableDef = core.ɵgetInjectableDef(token)) &&\n injectableDef.providedIn === 'root');\n var overridesBucket = isRoot ? this._rootProviderOverrides : this._providerOverrides;\n overridesBucket.push(providerDef);\n // keep all overrides grouped by token as well for fast lookups using token\n var overridesForToken = this._providerOverridesByToken.get(token) || [];\n overridesForToken.push(providerDef);\n this._providerOverridesByToken.set(token, overridesForToken);\n };\n TestBedRender3.prototype.deprecatedOverrideProvider = function (token, provider) {\n throw new Error('No implemented in IVY');\n };\n TestBedRender3.prototype.createComponent = function (type) {\n var _this = this;\n this._initIfNeeded();\n var testComponentRenderer = this.get(TestComponentRenderer);\n var rootElId = \"root\" + _nextRootElementId++;\n testComponentRenderer.insertRootElement(rootElId);\n var componentDef = type.ngComponentDef;\n if (!componentDef) {\n throw new Error(\"It looks like '\" + core.ɵstringify(type) + \"' has not been IVY compiled - it has no 'ngComponentDef' field\");\n }\n var noNgZone = this.get(ComponentFixtureNoNgZone, false);\n var autoDetect = this.get(ComponentFixtureAutoDetect, false);\n var ngZone = noNgZone ? null : this.get(core.NgZone, null);\n var componentFactory = new core.ɵRender3ComponentFactory(componentDef);\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 ? ngZone.run(initComponent) : initComponent();\n this._activeFixtures.push(fixture);\n return fixture;\n };\n // internal methods\n TestBedRender3.prototype._initIfNeeded = function () {\n if (this._instantiated) {\n return;\n }\n var resolvers = this._getResolvers();\n this._testModuleType = this._createTestModule();\n this._compileNgModule(this._testModuleType, resolvers);\n var parentInjector = this.platform.injector;\n this._moduleRef = new core.ɵRender3NgModuleRef(this._testModuleType, parentInjector);\n // ApplicationInitStatus.runInitializers() is marked @internal\n // to core. Cast it to any before accessing it.\n this._moduleRef.injector.get(core.ApplicationInitStatus).runInitializers();\n this._instantiated = true;\n };\n // get overrides for a specific provider (if any)\n TestBedRender3.prototype._getProviderOverrides = function (provider) {\n var token = typeof provider === 'object' && provider.hasOwnProperty('provide') ?\n provider.provide :\n provider;\n return this._providerOverridesByToken.get(token) || [];\n };\n // creates resolvers taking overrides into account\n TestBedRender3.prototype._getResolvers = function () {\n var module = new NgModuleResolver();\n module.setOverrides(this._moduleOverrides);\n var component = new ComponentResolver();\n component.setOverrides(this._componentOverrides);\n var directive = new DirectiveResolver();\n directive.setOverrides(this._directiveOverrides);\n var pipe = new PipeResolver();\n pipe.setOverrides(this._pipeOverrides);\n return { module: module, component: component, directive: directive, pipe: pipe };\n };\n TestBedRender3.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 TestBedRender3.prototype._createTestModule = function () {\n var rootProviderOverrides = this._rootProviderOverrides;\n var RootScopeModule = /** @class */ (function () {\n function RootScopeModule() {\n }\n RootScopeModule = __decorate([\n core.NgModule({\n providers: __spread(rootProviderOverrides),\n jit: true,\n })\n ], RootScopeModule);\n return RootScopeModule;\n }());\n var ngZone = new core.NgZone({ enableLongStackTrace: true });\n var providers = __spread([{ provide: core.NgZone, useValue: ngZone }], this._providers, this._providerOverrides);\n var declarations = this._declarations;\n var imports = [RootScopeModule, this.ngModule, this._imports];\n var schemas = this._schemas;\n var DynamicTestModule = /** @class */ (function () {\n function DynamicTestModule() {\n }\n DynamicTestModule = __decorate([\n core.NgModule({ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true })\n ], DynamicTestModule);\n return DynamicTestModule;\n }());\n return DynamicTestModule;\n };\n TestBedRender3.prototype._getMetaWithOverrides = function (meta, type) {\n var _this = this;\n var overrides = {};\n if (meta.providers && meta.providers.length) {\n var providerOverrides = flatten(meta.providers, function (provider) { return _this._getProviderOverrides(provider); });\n if (providerOverrides.length) {\n overrides.providers = __spread(meta.providers, providerOverrides);\n }\n }\n var hasTemplateOverride = !!type && this._templateOverrides.has(type);\n if (hasTemplateOverride) {\n overrides.template = this._templateOverrides.get(type);\n }\n return Object.keys(overrides).length ? __assign({}, meta, overrides) : meta;\n };\n TestBedRender3.prototype._compileNgModule = function (moduleType, resolvers) {\n var _this = this;\n var ngModule = resolvers.module.resolve(moduleType);\n if (ngModule === null) {\n throw new Error(core.ɵstringify(moduleType) + \" has not @NgModule annotation\");\n }\n var metadata = this._getMetaWithOverrides(ngModule);\n core.ɵcompileNgModuleDefs(moduleType, metadata);\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY, core.resolveForwardRef);\n var compiledComponents = [];\n // Compile the components, directives and pipes declared by this module\n declarations.forEach(function (declaration) {\n var component = resolvers.component.resolve(declaration);\n if (component) {\n var metadata_1 = _this._getMetaWithOverrides(component, declaration);\n core.ɵcompileComponent(declaration, metadata_1);\n compiledComponents.push(declaration);\n return;\n }\n var directive = resolvers.directive.resolve(declaration);\n if (directive) {\n var metadata_2 = _this._getMetaWithOverrides(directive);\n core.ɵcompileDirective(declaration, metadata_2);\n return;\n }\n var pipe = resolvers.pipe.resolve(declaration);\n if (pipe) {\n core.ɵcompilePipe(declaration, pipe);\n return;\n }\n });\n // Compile transitive modules, components, directives and pipes\n var transitiveScope = this._transitiveScopesFor(moduleType, resolvers);\n compiledComponents.forEach(function (cmp) {\n var scope = _this._templateOverrides.has(cmp) ?\n // if we have template override via `TestBed.overrideTemplateUsingTestingModule` -\n // define Component scope as TestingModule scope, instead of the scope of NgModule\n // where this Component was declared\n _this._transitiveScopesFor(_this._testModuleType, resolvers) :\n transitiveScope;\n core.ɵpatchComponentDefWithScope(cmp.ngComponentDef, scope);\n });\n };\n /**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given\n * module.\n *\n * This operation is memoized and the result is cached on the module's definition. It can be\n * called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n */\n TestBedRender3.prototype._transitiveScopesFor = function (moduleType, resolvers) {\n var _this = this;\n if (!isNgModule(moduleType)) {\n throw new Error(moduleType.name + \" does not have an ngModuleDef\");\n }\n var def = moduleType.ngModuleDef;\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n var scopes = {\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set(),\n },\n };\n def.declarations.forEach(function (declared) {\n var declaredWithDefs = declared;\n if (declaredWithDefs.ngPipeDef !== undefined) {\n scopes.compilation.pipes.add(declared);\n }\n else {\n scopes.compilation.directives.add(declared);\n }\n });\n def.imports.forEach(function (imported) {\n var ngModule = resolvers.module.resolve(imported);\n if (ngModule === null) {\n throw new Error(\"Importing \" + imported.name + \" which does not have an @ngModule\");\n }\n else {\n _this._compileNgModule(imported, resolvers);\n }\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n var importedScope = _this._transitiveScopesFor(imported, resolvers);\n importedScope.exported.directives.forEach(function (entry) { return scopes.compilation.directives.add(entry); });\n importedScope.exported.pipes.forEach(function (entry) { return scopes.compilation.pipes.add(entry); });\n });\n def.exports.forEach(function (exported) {\n var exportedTyped = exported;\n // Either the type is a module, a pipe, or a component/directive (which may not have an\n // ngComponentDef as it might be compiled asynchronously).\n if (isNgModule(exportedTyped)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n var exportedScope = _this._transitiveScopesFor(exportedTyped, resolvers);\n exportedScope.exported.directives.forEach(function (entry) {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(function (entry) {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n }\n else if (exportedTyped.ngPipeDef !== undefined) {\n scopes.exported.pipes.add(exportedTyped);\n }\n else {\n scopes.exported.directives.add(exportedTyped);\n }\n });\n def.transitiveCompileScopes = scopes;\n return scopes;\n };\n return TestBedRender3;\n }());\n var testBed;\n function _getTestBedRender3() {\n return testBed = testBed || new TestBedRender3();\n }\n function flatten(values, mapFn) {\n var out = [];\n values.forEach(function (value) {\n if (Array.isArray(value)) {\n out.push.apply(out, __spread(flatten(value, mapFn)));\n }\n else {\n out.push(mapFn ? mapFn(value) : value);\n }\n });\n return out;\n }\n function isNgModule(value) {\n return value.ngModuleDef !== undefined;\n }\n\n /**\n * @license\n * Copyright Google Inc. 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 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 () { throw unimplemented(); },\n enumerable: true,\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) { throw unimplemented(); };\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) { throw unimplemented(); };\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) { throw unimplemented(); };\n TestingCompiler = __decorate([\n core.Injectable()\n ], TestingCompiler);\n return TestingCompiler;\n }(core.Compiler));\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 /**\n * @license\n * Copyright Google Inc. 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 UNDEFINED = new Object();\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/<platform_name>/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 () { _getTestBedViewEngine().resetTestEnvironment(); };\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 () { return getTestBed().compileComponents(); };\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.deprecatedOverrideProvider = function (token, provider) {\n _getTestBedViewEngine().deprecatedOverrideProvider(token, provider);\n return TestBedViewEngine;\n };\n TestBedViewEngine.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\n return _getTestBedViewEngine().get(token, notFoundValue);\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/<platform_name>/testing'.\n */\n TestBedViewEngine.prototype.initTestEnvironment = function (ngModule, platform, aotSummaries) {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n this.platform = platform;\n this.ngModule = ngModule;\n if (aotSummaries) {\n this._testEnvAotSummaries = aotSummaries;\n }\n };\n /**\n * Reset the providers for the test injector.\n */\n TestBedViewEngine.prototype.resetTestEnvironment = function () {\n this.resetTestingModule();\n this.platform = null;\n this.ngModule = null;\n this._testEnvAotSummaries = function () { return []; };\n };\n TestBedViewEngine.prototype.resetTestingModule = function () {\n core.ɵclearOverrides();\n this._aotSummaries = [];\n this._templateOverrides = [];\n this._compiler = null;\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n this._isRoot = true;\n this._rootProviderOverrides = [];\n this._moduleRef = null;\n this._moduleFactory = null;\n this._compilerOptions = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._instantiated = false;\n this._activeFixtures.forEach(function (fixture) {\n try {\n fixture.destroy();\n }\n catch (e) {\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n };\n TestBedViewEngine.prototype.configureCompiler = function (config) {\n this._assertNotInstantiated('TestBed.configureCompiler', 'configure the compiler');\n this._compilerOptions.push(config);\n };\n TestBedViewEngine.prototype.configureTestingModule = function (moduleDef) {\n var _a, _b, _c, _d;\n this._assertNotInstantiated('TestBed.configureTestingModule', 'configure the test module');\n if (moduleDef.providers) {\n (_a = this._providers).push.apply(_a, __spread(moduleDef.providers));\n }\n if (moduleDef.declarations) {\n (_b = this._declarations).push.apply(_b, __spread(moduleDef.declarations));\n }\n if (moduleDef.imports) {\n (_c = this._imports).push.apply(_c, __spread(moduleDef.imports));\n }\n if (moduleDef.schemas) {\n (_d = this._schemas).push.apply(_d, __spread(moduleDef.schemas));\n }\n if (moduleDef.aotSummaries) {\n this._aotSummaries.push(moduleDef.aotSummaries);\n }\n };\n TestBedViewEngine.prototype.compileComponents = function () {\n var _this = this;\n if (this._moduleFactory || this._instantiated) {\n return Promise.resolve(null);\n }\n var moduleType = this._createCompilerAndModule();\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType)\n .then(function (moduleAndComponentFactories) {\n _this._moduleFactory = moduleAndComponentFactories.ngModuleFactory;\n });\n };\n TestBedViewEngine.prototype._initIfNeeded = function () {\n var e_1, _a;\n if (this._instantiated) {\n return;\n }\n if (!this._moduleFactory) {\n try {\n var moduleType = this._createCompilerAndModule();\n this._moduleFactory =\n this._compiler.compileModuleAndAllComponentsSync(moduleType).ngModuleFactory;\n }\n catch (e) {\n var errorCompType = this._compiler.getComponentFromError(e);\n if (errorCompType) {\n throw new Error(\"This test module uses the component \" + core.ɵstringify(errorCompType) + \" which is using a \\\"templateUrl\\\" or \\\"styleUrls\\\", but they were never compiled. \" +\n \"Please call \\\"TestBed.compileComponents\\\" before your test.\");\n }\n else {\n throw e;\n }\n }\n }\n try {\n for (var _b = __values(this._templateOverrides), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = _c.value, component = _d.component, templateOf = _d.templateOf;\n var compFactory = this._compiler.getComponentFactory(templateOf);\n core.ɵoverrideComponentView(component, compFactory);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var ngZone = new core.NgZone({ enableLongStackTrace: true });\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 _this = this;\n var e_2, _a;\n var providers = this._providers.concat([{ provide: TestBed, useValue: this }]);\n var declarations = __spread(this._declarations, this._templateOverrides.map(function (entry) { return entry.templateOf; }));\n var rootScopeImports = [];\n var rootProviderOverrides = this._rootProviderOverrides;\n if (this._isRoot) {\n var RootScopeModule = /** @class */ (function () {\n function RootScopeModule() {\n }\n RootScopeModule = __decorate([\n core.NgModule({\n providers: __spread(rootProviderOverrides),\n jit: true,\n })\n ], RootScopeModule);\n return RootScopeModule;\n }());\n rootScopeImports.push(RootScopeModule);\n }\n providers.push({ provide: core.ɵAPP_ROOT, useValue: this._isRoot });\n var imports = [rootScopeImports, this.ngModule, this._imports];\n var schemas = this._schemas;\n var DynamicTestModule = /** @class */ (function () {\n function DynamicTestModule() {\n }\n DynamicTestModule = __decorate([\n core.NgModule({ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true })\n ], DynamicTestModule);\n return DynamicTestModule;\n }());\n var compilerFactory = this.platform.injector.get(TestingCompilerFactory);\n this._compiler = compilerFactory.createTestingCompiler(this._compilerOptions);\n try {\n for (var _b = __values(__spread([this._testEnvAotSummaries], this._aotSummaries)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var summary = _c.value;\n this._compiler.loadAotSummaries(summary);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this._moduleOverrides.forEach(function (entry) { return _this._compiler.overrideModule(entry[0], entry[1]); });\n this._componentOverrides.forEach(function (entry) { return _this._compiler.overrideComponent(entry[0], entry[1]); });\n this._directiveOverrides.forEach(function (entry) { return _this._compiler.overrideDirective(entry[0], entry[1]); });\n this._pipeOverrides.forEach(function (entry) { return _this._compiler.overridePipe(entry[0], entry[1]); });\n return DynamicTestModule;\n };\n TestBedViewEngine.prototype._assertNotInstantiated = function (methodName, methodDescription) {\n if (this._instantiated) {\n throw new Error(\"Cannot \" + methodDescription + \" when the test module has already been instantiated. \" +\n (\"Make sure you are not using `inject` before `\" + methodName + \"`.\"));\n }\n };\n TestBedViewEngine.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = core.Injector.THROW_IF_NOT_FOUND; }\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 result = this._moduleRef.injector.get(token, UNDEFINED);\n return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result;\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.get(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.overrideProviderImpl(token, provider);\n };\n TestBedViewEngine.prototype.deprecatedOverrideProvider = function (token, provider) {\n this.overrideProviderImpl(token, provider, /* deprecated */ true);\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 OverrideComponent = __decorate([\n core.Component({ selector: 'empty', template: template, jit: true })\n ], OverrideComponent);\n return OverrideComponent;\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 var noNgZone = this.get(ComponentFixtureNoNgZone, false);\n var autoDetect = this.get(ComponentFixtureAutoDetect, false);\n var ngZone = noNgZone ? null : this.get(core.NgZone, null);\n var testComponentRenderer = this.get(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.get(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 () { return testBed.execute(tokens, fn, this); };\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 Inc. 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$1 = (typeof window === 'undefined' ? global : window);\n // Reset the test providers and the fake async zone before each test.\n if (_global$1.beforeEach) {\n _global$1.beforeEach(function () {\n TestBed.resetTestingModule();\n resetFakeAsyncZone();\n });\n }\n // TODO(juliemr): remove this, only used because we need to export something to have compilation\n // work.\n var __core_private_testing_placeholder__ = '';\n\n /**\n * @license\n * Copyright Google Inc. 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 Inc. 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 Inc. 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 Inc. 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.ɵangular_packages_core_testing_testing_b = TestBedRender3;\n exports.ɵangular_packages_core_testing_testing_c = _getTestBedRender3;\n exports.ɵangular_packages_core_testing_testing_a = TestBedViewEngine;\n exports.TestBed = TestBed;\n exports.getTestBed = getTestBed;\n exports.inject = inject;\n exports.InjectSetupWrapper = InjectSetupWrapper;\n exports.withModule = withModule;\n exports.ɵMetadataOverrider = MetadataOverrider;\n exports.async = async;\n exports.ComponentFixture = ComponentFixture;\n exports.resetFakeAsyncZone = resetFakeAsyncZone;\n exports.fakeAsync = fakeAsync;\n exports.tick = tick;\n exports.flush = flush;\n exports.discardPeriodicTasks = discardPeriodicTasks;\n exports.flushMicrotasks = flushMicrotasks;\n exports.TestComponentRenderer = TestComponentRenderer;\n exports.ComponentFixtureAutoDetect = ComponentFixtureAutoDetect;\n exports.ComponentFixtureNoNgZone = ComponentFixtureNoNgZone;\n exports.__core_private_testing_placeholder__ = __core_private_testing_placeholder__;\n exports.ɵTestingCompiler = TestingCompiler;\n exports.ɵTestingCompilerFactory = TestingCompilerFactory;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=core-testing.umd.js.map\n"]}