1 | {"version":3,"file":"core-testing.umd.js","sources":["../../../../../packages/core/testing/src/async.ts","../../../../../packages/core/testing/src/component_fixture.ts","../../../../../packages/core/testing/src/fake_async.ts","../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/core/src/metadata/resource_loading.ts","../../../../../packages/core/testing/src/metadata_overrider.ts","../../../../../packages/core/testing/src/resolvers.ts","../../../../../packages/core/testing/src/r3_test_bed_compiler.ts","../../../../../packages/core/testing/src/test_bed_common.ts","../../../../../packages/core/testing/src/r3_test_bed.ts","../../../../../packages/core/testing/src/test_compiler.ts","../../../../../packages/core/testing/src/test_bed.ts","../../../../../packages/core/testing/src/test_hooks.ts","../../../../../packages/core/testing/src/private_export_testing.ts","../../../../../packages/core/testing/src/testing.ts","../../../../../packages/core/testing/public_api.ts","../../../../../packages/core/testing/index.ts","../../../../../packages/core/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', waitForAsync(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n * @publicApi\n */\nexport function waitForAsync(fn: Function): (done: any) => any {\n const _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\n if (!_Zone) {\n return function() {\n return Promise.reject(\n 'Zone is needed for the waitForAsync() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js');\n };\n }\n const asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n return function() {\n return Promise.reject(\n 'zone-testing.js is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/testing');\n };\n}\n\n/**\n * @deprecated use `waitForAsync()`, (expected removal in v12)\n * @see {@link waitForAsync}\n * @publicApi\n * */\nexport function async(fn: Function): (done: any) => any {\n return waitForAsync(fn);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, getDebugNode, NgZone, RendererFactory2} from '@angular/core';\n\n\n/**\n * Fixture for debugging and testing a component.\n *\n * @publicApi\n */\nexport class ComponentFixture<T> {\n /**\n * The DebugElement associated with the root element of this component.\n */\n debugElement: DebugElement;\n\n /**\n * The instance of the root component class.\n */\n componentInstance: T;\n\n /**\n * The native element at the root of the component.\n */\n nativeElement: any;\n\n /**\n * The ElementRef for the element at the root of the component.\n */\n elementRef: ElementRef;\n\n /**\n * The ChangeDetectorRef for the component\n */\n changeDetectorRef: ChangeDetectorRef;\n\n private _renderer: RendererFactory2|null|undefined;\n private _isStable: boolean = true;\n private _isDestroyed: boolean = false;\n private _resolve: ((result: any) => void)|null = null;\n private _promise: Promise<any>|null = null;\n private _onUnstableSubscription: any /** TODO #9100 */ = null;\n private _onStableSubscription: any /** TODO #9100 */ = null;\n private _onMicrotaskEmptySubscription: any /** TODO #9100 */ = null;\n private _onErrorSubscription: any /** TODO #9100 */ = null;\n\n constructor(\n public componentRef: ComponentRef<T>, public ngZone: NgZone|null,\n private _autoDetect: boolean) {\n this.changeDetectorRef = componentRef.changeDetectorRef;\n this.elementRef = componentRef.location;\n this.debugElement = <DebugElement>getDebugNode(this.elementRef.nativeElement);\n this.componentInstance = componentRef.instance;\n this.nativeElement = this.elementRef.nativeElement;\n this.componentRef = componentRef;\n this.ngZone = ngZone;\n\n if (ngZone) {\n // Create subscriptions outside the NgZone so that the callbacks run oustide\n // of NgZone.\n ngZone.runOutsideAngular(() => {\n this._onUnstableSubscription = ngZone.onUnstable.subscribe({\n next: () => {\n this._isStable = false;\n }\n });\n this._onMicrotaskEmptySubscription = ngZone.onMicrotaskEmpty.subscribe({\n next: () => {\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: () => {\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(() => {\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\n this._onErrorSubscription = ngZone.onError.subscribe({\n next: (error: any) => {\n throw error;\n }\n });\n });\n }\n }\n\n private _tick(checkNoChanges: boolean) {\n this.changeDetectorRef.detectChanges();\n if (checkNoChanges) {\n this.checkNoChanges();\n }\n }\n\n /**\n * Trigger a change detection cycle for the component.\n */\n detectChanges(checkNoChanges: boolean = true): void {\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(() => {\n this._tick(checkNoChanges);\n });\n } else {\n // Running without zone. Just do the change detection.\n this._tick(checkNoChanges);\n }\n }\n\n /**\n * Do a change detection run to make sure there were no changes.\n */\n checkNoChanges(): void {\n this.changeDetectorRef.checkNoChanges();\n }\n\n /**\n * Set whether the fixture should autodetect changes.\n *\n * Also runs detectChanges once so that any existing change is detected.\n */\n autoDetectChanges(autoDetect: boolean = 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 /**\n * Return whether the fixture is currently stable or has async tasks that have not been completed\n * yet.\n */\n isStable(): boolean {\n return this._isStable && !this.ngZone!.hasPendingMacrotasks;\n }\n\n /**\n * Get a promise that resolves when the fixture is stable.\n *\n * This can be used to resume testing after events have triggered asynchronous activity or\n * asynchronous change detection.\n */\n whenStable(): Promise<any> {\n if (this.isStable()) {\n return Promise.resolve(false);\n } else if (this._promise !== null) {\n return this._promise;\n } else {\n this._promise = new Promise(res => {\n this._resolve = res;\n });\n return this._promise;\n }\n }\n\n\n private _getRenderer() {\n if (this._renderer === undefined) {\n this._renderer = this.componentRef.injector.get(RendererFactory2, null);\n }\n return this._renderer as RendererFactory2 | null;\n }\n\n /**\n * Get a promise that resolves when the ui state is stable following animations.\n */\n whenRenderingDone(): Promise<any> {\n const renderer = this._getRenderer();\n if (renderer && renderer.whenRenderingDone) {\n return renderer.whenRenderingDone();\n }\n return this.whenStable();\n }\n\n /**\n * Trigger component destruction.\n */\n destroy(): void {\n if (!this._isDestroyed) {\n this.componentRef.destroy();\n 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}\n\nfunction scheduleMicroTask(fn: Function) {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];\n\nconst fakeAsyncTestModuleNotLoadedErrorMessage =\n `zone-testing.js is needed for the fakeAsync() test helper but could not be found.\n Please make sure that your environment includes zone.js/testing`;\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @publicApi\n */\nexport function resetFakeAsyncZone(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.resetFakeAsyncZone();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Wraps a function to be executed in the `fakeAsync` zone:\n * - Microtasks are manually executed by calling `flushMicrotasks()`.\n * - Timers are synchronous; `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception is thrown.\n *\n * Can be used to wrap `inject()` calls.\n *\n * @param fn The function that you want to wrap in the `fakeAysnc` zone.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n *\n * @returns The function wrapped to be executed in the `fakeAsync` zone.\n * Any arguments passed when calling this returned function will be passed through to the `fn`\n * function in the parameters when it is called.\n *\n * @publicApi\n */\nexport function fakeAsync(fn: Function): (...args: any[]) => any {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.fakeAsync(fn);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the `fakeAsync` zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @param millis The number of milliseconds to advance the virtual timer.\n * @param tickOptions The options to pass to the `tick()` function.\n *\n * @usageNotes\n *\n * The `tick()` option is a flag called `processNewMacroTasksSynchronously`,\n * which determines whether or not to invoke new macroTasks.\n *\n * If you provide a `tickOptions` object, but do not specify a\n * `processNewMacroTasksSynchronously` property (`tick(100, {})`),\n * then `processNewMacroTasksSynchronously` defaults to true.\n *\n * If you omit the `tickOptions` parameter (`tick(100))`), then\n * `tickOptions` defaults to `{processNewMacroTasksSynchronously: true}`.\n *\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * The following example includes a nested timeout (new macroTask), and\n * the `tickOptions` parameter is allowed to default. In this case,\n * `processNewMacroTasksSynchronously` defaults to true, and the nested\n * function is executed on each tick.\n *\n * ```\n * it ('test with nested setTimeout', fakeAsync(() => {\n * let nestedTimeoutInvoked = false;\n * function funcWithNestedTimeout() {\n * setTimeout(() => {\n * nestedTimeoutInvoked = true;\n * });\n * };\n * setTimeout(funcWithNestedTimeout);\n * tick();\n * expect(nestedTimeoutInvoked).toBe(true);\n * }));\n * ```\n *\n * In the following case, `processNewMacroTasksSynchronously` is explicitly\n * set to false, so the nested timeout function is not invoked.\n *\n * ```\n * it ('test with nested setTimeout', fakeAsync(() => {\n * let nestedTimeoutInvoked = false;\n * function funcWithNestedTimeout() {\n * setTimeout(() => {\n * nestedTimeoutInvoked = true;\n * });\n * };\n * setTimeout(funcWithNestedTimeout);\n * tick(0, {processNewMacroTasksSynchronously: false});\n * expect(nestedTimeoutInvoked).toBe(false);\n * }));\n * ```\n *\n *\n * @publicApi\n */\nexport function tick(\n millis: number = 0, tickOptions: {processNewMacroTasksSynchronously: boolean} = {\n processNewMacroTasksSynchronously: true\n }): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis, tickOptions);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\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.\n *\n * @param maxTurns The maximum number of times the scheduler attempts to clear its queue before\n * throwing an error.\n * @returns The simulated time elapsed, in milliseconds.\n *\n * @publicApi\n */\nexport function flush(maxTurns?: number): number {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flush(maxTurns);\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @publicApi\n */\nexport function discardPeriodicTasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @publicApi\n */\nexport function flushMicrotasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n }\n throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage);\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\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\nexport 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\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport 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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") 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 throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport 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/** @deprecated */\r\nexport 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}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '../interface/type';\nimport {Component} from './directives';\n\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nexport function resolveComponentResources(\n resourceResolver: (url: string) => (Promise<string|{text(): Promise<string>}>)): Promise<void> {\n // Store all promises which are fetching the resources.\n const componentResolved: Promise<void>[] = [];\n\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map<string, Promise<string>>();\n function cachedResourceResolve(url: string): Promise<string> {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n\n componentResourceResolutionQueue.forEach((component: Component, type: Type<any>) => {\n const promises: Promise<void>[] = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n component.template = template;\n }));\n }\n const styleUrls = component.styleUrls;\n const styles = component.styles || (component.styles = []);\n const styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then((style) => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\n\nlet componentResourceResolutionQueue = new Map<Type<any>, Component>();\n\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set<Type<any>>();\n\nexport function maybeQueueResolutionOfComponentResources(type: Type<any>, metadata: Component) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\n\nexport function isComponentDefPendingResolution(type: Type<any>): boolean {\n return componentDefPendingResolution.has(type);\n}\n\nexport function componentNeedsResolution(component: Component): boolean {\n return !!(\n (component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nexport function clearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component> {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\n\nexport function restoreComponentResolutionQueue(queue: Map<Type<any>, Component>): void {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\n\nexport function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\n\nfunction unwrapResponse(response: string|{text(): Promise<string>}): string|Promise<string> {\n return typeof response == 'string' ? response : response.text();\n}\n\nfunction componentDefResolved(type: Type<any>): void {\n componentDefPendingResolution.delete(type);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵstringify as stringify} from '@angular/core';\nimport {MetadataOverride} from './metadata_override';\n\ntype StringMap = {\n [key: string]: any\n};\n\nlet _nextReferenceId = 0;\n\nexport class MetadataOverrider {\n private _references = new Map<any, string>();\n /**\n * Creates a new instance for the given metadata class\n * based on an old instance and overrides.\n */\n overrideMetadata<C extends T, T>(\n metadataClass: {new(options: T): C;}, oldMetadata: C, override: MetadataOverride<T>): C {\n const props: StringMap = {};\n if (oldMetadata) {\n _valueProps(oldMetadata).forEach((prop) => props[prop] = (<any>oldMetadata)[prop]);\n }\n\n if (override.set) {\n if (override.remove || override.add) {\n throw new Error(`Cannot set and add/remove ${stringify(metadataClass)} at the same time!`);\n }\n setMetadata(props, override.set);\n }\n if (override.remove) {\n removeMetadata(props, override.remove, this._references);\n }\n if (override.add) {\n addMetadata(props, override.add);\n }\n return new metadataClass(<any>props);\n }\n}\n\nfunction removeMetadata(metadata: StringMap, remove: any, references: Map<any, string>) {\n const removeObjects = new Set<string>();\n for (const prop in remove) {\n const removeValue = remove[prop];\n if (Array.isArray(removeValue)) {\n removeValue.forEach((value: any) => {\n removeObjects.add(_propHashKey(prop, value, references));\n });\n } else {\n removeObjects.add(_propHashKey(prop, removeValue, references));\n }\n }\n\n for (const prop in metadata) {\n const propValue = metadata[prop];\n if (Array.isArray(propValue)) {\n metadata[prop] = propValue.filter(\n (value: any) => !removeObjects.has(_propHashKey(prop, value, references)));\n } else {\n if (removeObjects.has(_propHashKey(prop, propValue, references))) {\n metadata[prop] = undefined;\n }\n }\n }\n}\n\nfunction addMetadata(metadata: StringMap, add: any) {\n for (const prop in add) {\n const addValue = add[prop];\n const propValue = metadata[prop];\n if (propValue != null && Array.isArray(propValue)) {\n metadata[prop] = propValue.concat(addValue);\n } else {\n metadata[prop] = addValue;\n }\n }\n}\n\nfunction setMetadata(metadata: StringMap, set: any) {\n for (const prop in set) {\n metadata[prop] = set[prop];\n }\n}\n\nfunction _propHashKey(propName: any, propValue: any, references: Map<any, string>): string {\n const replacer = (key: any, value: any) => {\n if (typeof value === 'function') {\n value = _serializeReference(value, references);\n }\n return value;\n };\n\n return `${propName}:${JSON.stringify(propValue, replacer)}`;\n}\n\nfunction _serializeReference(ref: any, references: Map<any, string>): string {\n let id = references.get(ref);\n if (!id) {\n id = `${stringify(ref)}${_nextReferenceId++}`;\n references.set(ref, id);\n }\n return id;\n}\n\n\nfunction _valueProps(obj: any): string[] {\n const props: string[] = [];\n // regular public props\n Object.keys(obj).forEach((prop) => {\n if (!prop.startsWith('_')) {\n props.push(prop);\n }\n });\n\n // getters\n let proto = obj;\n while (proto = Object.getPrototypeOf(proto)) {\n Object.keys(proto).forEach((protoProp) => {\n const desc = Object.getOwnPropertyDescriptor(proto, protoProp);\n if (!protoProp.startsWith('_') && desc && 'get' in desc) {\n props.push(protoProp);\n }\n });\n }\n return props;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component, Directive, NgModule, Pipe, Type, ɵReflectionCapabilities as ReflectionCapabilities} from '@angular/core';\n\nimport {MetadataOverride} from './metadata_override';\nimport {MetadataOverrider} from './metadata_overrider';\n\nconst reflection = new ReflectionCapabilities();\n\n/**\n * Base interface to resolve `@Component`, `@Directive`, `@Pipe` and `@NgModule`.\n */\nexport interface Resolver<T> {\n addOverride(type: Type<any>, override: MetadataOverride<T>): void;\n setOverrides(overrides: Array<[Type<any>, MetadataOverride<T>]>): void;\n resolve(type: Type<any>): T|null;\n}\n\n/**\n * Allows to override ivy metadata for tests (via the `TestBed`).\n */\nabstract class OverrideResolver<T> implements Resolver<T> {\n private overrides = new Map<Type<any>, MetadataOverride<T>[]>();\n private resolved = new Map<Type<any>, T|null>();\n\n abstract get type(): any;\n\n addOverride(type: Type<any>, override: MetadataOverride<T>) {\n const overrides = this.overrides.get(type) || [];\n overrides.push(override);\n this.overrides.set(type, overrides);\n this.resolved.delete(type);\n }\n\n setOverrides(overrides: Array<[Type<any>, MetadataOverride<T>]>) {\n this.overrides.clear();\n overrides.forEach(([type, override]) => {\n this.addOverride(type, override);\n });\n }\n\n getAnnotation(type: Type<any>): T|null {\n const annotations = reflection.annotations(type);\n // Try to find the nearest known Type annotation and make sure that this annotation is an\n // instance of the type we are looking for, so we can use it for resolution. Note: there might\n // be multiple known annotations found due to the fact that Components can extend Directives (so\n // both Directive and Component annotations would be present), so we always check if the known\n // annotation has the right type.\n for (let i = annotations.length - 1; i >= 0; i--) {\n const annotation = annotations[i];\n const isKnownType = annotation instanceof Directive || annotation instanceof Component ||\n annotation instanceof Pipe || annotation instanceof NgModule;\n if (isKnownType) {\n return annotation instanceof this.type ? annotation : null;\n }\n }\n return null;\n }\n\n resolve(type: Type<any>): T|null {\n let resolved = this.resolved.get(type) || null;\n\n if (!resolved) {\n resolved = this.getAnnotation(type);\n if (resolved) {\n const overrides = this.overrides.get(type);\n if (overrides) {\n const overrider = new MetadataOverrider();\n overrides.forEach(override => {\n resolved = overrider.overrideMetadata(this.type, resolved!, override);\n });\n }\n }\n this.resolved.set(type, resolved);\n }\n\n return resolved;\n }\n}\n\n\nexport class DirectiveResolver extends OverrideResolver<Directive> {\n override get type() {\n return Directive;\n }\n}\n\nexport class ComponentResolver extends OverrideResolver<Component> {\n override get type() {\n return Component;\n }\n}\n\nexport class PipeResolver extends OverrideResolver<Pipe> {\n override get type() {\n return Pipe;\n }\n}\n\nexport class NgModuleResolver extends OverrideResolver<NgModule> {\n override get type() {\n return NgModule;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ResourceLoader} from '@angular/compiler';\nimport {ApplicationInitStatus, Compiler, COMPILER_OPTIONS, Component, Directive, Injector, InjectorType, LOCALE_ID, ModuleWithComponentFactories, ModuleWithProviders, NgModule, NgModuleFactory, NgZone, Pipe, PlatformRef, Provider, resolveForwardRef, Type, ɵcompileComponent as compileComponent, ɵcompileDirective as compileDirective, ɵcompileNgModuleDefs as compileNgModuleDefs, ɵcompilePipe as compilePipe, ɵDEFAULT_LOCALE_ID as DEFAULT_LOCALE_ID, ɵDirectiveDef as DirectiveDef, ɵgetInjectableDef as getInjectableDef, ɵNG_COMP_DEF as NG_COMP_DEF, ɵNG_DIR_DEF as NG_DIR_DEF, ɵNG_INJ_DEF as NG_INJ_DEF, ɵNG_MOD_DEF as NG_MOD_DEF, ɵNG_PIPE_DEF as NG_PIPE_DEF, ɵNgModuleFactory as R3NgModuleFactory, ɵNgModuleTransitiveScopes as NgModuleTransitiveScopes, ɵNgModuleType as NgModuleType, ɵpatchComponentDefWithScope as patchComponentDefWithScope, ɵRender3ComponentFactory as ComponentFactory, ɵRender3NgModuleRef as NgModuleRef, ɵsetLocaleId as setLocaleId, ɵtransitiveScopesFor as transitiveScopesFor, ɵɵInjectableDeclaration as InjectableDeclaration} from '@angular/core';\n\nimport {clearResolutionOfComponentResourcesQueue, isComponentDefPendingResolution, resolveComponentResources, restoreComponentResolutionQueue} from '../../src/metadata/resource_loading';\n\nimport {MetadataOverride} from './metadata_override';\nimport {ComponentResolver, DirectiveResolver, NgModuleResolver, PipeResolver, Resolver} from './resolvers';\nimport {TestModuleMetadata} from './test_bed_common';\n\nenum TestingModuleOverride {\n DECLARATION,\n OVERRIDE_TEMPLATE,\n}\n\nfunction isTestingModuleOverride(value: unknown): value is TestingModuleOverride {\n return value === TestingModuleOverride.DECLARATION ||\n value === TestingModuleOverride.OVERRIDE_TEMPLATE;\n}\n\n// Resolvers for Angular decorators\ntype Resolvers = {\n module: Resolver<NgModule>,\n component: Resolver<Directive>,\n directive: Resolver<Component>,\n pipe: Resolver<Pipe>,\n};\n\ninterface CleanupOperation {\n fieldName: string;\n object: any;\n originalValue: unknown;\n}\n\nexport class R3TestBedCompiler {\n private originalComponentResolutionQueue: Map<Type<any>, Component>|null = null;\n\n // Testing module configuration\n private declarations: Type<any>[] = [];\n private imports: Type<any>[] = [];\n private providers: Provider[] = [];\n private schemas: any[] = [];\n\n // Queues of components/directives/pipes that should be recompiled.\n private pendingComponents = new Set<Type<any>>();\n private pendingDirectives = new Set<Type<any>>();\n private pendingPipes = new Set<Type<any>>();\n\n // Keep track of all components and directives, so we can patch Providers onto defs later.\n private seenComponents = new Set<Type<any>>();\n private seenDirectives = new Set<Type<any>>();\n\n // Keep track of overridden modules, so that we can collect all affected ones in the module tree.\n private overriddenModules = new Set<NgModuleType<any>>();\n\n // Store resolved styles for Components that have template overrides present and `styleUrls`\n // defined at the same time.\n private existingComponentStyles = new Map<Type<any>, string[]>();\n\n private resolvers: Resolvers = initResolvers();\n\n private componentToModuleScope = new Map<Type<any>, Type<any>|TestingModuleOverride>();\n\n // Map that keeps initial version of component/directive/pipe defs in case\n // we compile a Type again, thus overriding respective static fields. This is\n // required to make sure we restore defs to their initial states between test runs\n // TODO: we should support the case with multiple defs on a type\n private initialNgDefs = new Map<Type<any>, [string, PropertyDescriptor|undefined]>();\n\n // Array that keeps cleanup operations for initial versions of component/directive/pipe/module\n // defs in case TestBed makes changes to the originals.\n private defCleanupOps: CleanupOperation[] = [];\n\n private _injector: Injector|null = null;\n private compilerProviders: Provider[]|null = null;\n\n private providerOverrides: Provider[] = [];\n private rootProviderOverrides: Provider[] = [];\n // Overrides for injectables with `{providedIn: SomeModule}` need to be tracked and added to that\n // module's provider list.\n private providerOverridesByModule = new Map<InjectorType<any>, Provider[]>();\n private providerOverridesByToken = new Map<any, Provider>();\n private moduleProvidersOverridden = new Set<Type<any>>();\n\n private testModuleType: NgModuleType<any>;\n private testModuleRef: NgModuleRef<any>|null = null;\n\n constructor(private platform: PlatformRef, private additionalModuleTypes: Type<any>|Type<any>[]) {\n class DynamicTestModule {}\n this.testModuleType = DynamicTestModule as any;\n }\n\n setCompilerProviders(providers: Provider[]|null): void {\n this.compilerProviders = providers;\n this._injector = null;\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata): void {\n // Enqueue any compilation tasks for the directly declared component.\n if (moduleDef.declarations !== undefined) {\n this.queueTypeArray(moduleDef.declarations, TestingModuleOverride.DECLARATION);\n this.declarations.push(...moduleDef.declarations);\n }\n\n // Enqueue any compilation tasks for imported modules.\n if (moduleDef.imports !== undefined) {\n this.queueTypesFromModulesArray(moduleDef.imports);\n this.imports.push(...moduleDef.imports);\n }\n\n if (moduleDef.providers !== undefined) {\n this.providers.push(...moduleDef.providers);\n }\n\n if (moduleDef.schemas !== undefined) {\n this.schemas.push(...moduleDef.schemas);\n }\n }\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void {\n this.overriddenModules.add(ngModule as NgModuleType<any>);\n\n // Compile the module right away.\n this.resolvers.module.addOverride(ngModule, override);\n const metadata = this.resolvers.module.resolve(ngModule);\n if (metadata === null) {\n throw invalidTypeError(ngModule.name, 'NgModule');\n }\n\n this.recompileNgModule(ngModule, metadata);\n\n // At this point, the module has a valid module def (ɵmod), but the override may have introduced\n // new declarations or imported modules. Ingest any possible new types and add them to the\n // current queue.\n this.queueTypesFromModulesArray([ngModule]);\n }\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void {\n this.resolvers.component.addOverride(component, override);\n this.pendingComponents.add(component);\n }\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void {\n this.resolvers.directive.addOverride(directive, override);\n this.pendingDirectives.add(directive);\n }\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void {\n this.resolvers.pipe.addOverride(pipe, override);\n this.pendingPipes.add(pipe);\n }\n\n overrideProvider(\n token: any,\n provider: {useFactory?: Function, useValue?: any, deps?: any[], multi?: boolean}): void {\n let providerDef: Provider;\n if (provider.useFactory !== undefined) {\n providerDef = {\n provide: token,\n useFactory: provider.useFactory,\n deps: provider.deps || [],\n multi: provider.multi\n };\n } else if (provider.useValue !== undefined) {\n providerDef = {provide: token, useValue: provider.useValue, multi: provider.multi};\n } else {\n providerDef = {provide: token};\n }\n\n const injectableDef: InjectableDeclaration<any>|null =\n typeof token !== 'string' ? getInjectableDef(token) : null;\n const providedIn = injectableDef === null ? null : resolveForwardRef(injectableDef.providedIn);\n const overridesBucket =\n providedIn === 'root' ? this.rootProviderOverrides : this.providerOverrides;\n overridesBucket.push(providerDef);\n\n // Keep overrides grouped by token as well for fast lookups using token\n this.providerOverridesByToken.set(token, providerDef);\n if (injectableDef !== null && providedIn !== null && typeof providedIn !== 'string') {\n const existingOverrides = this.providerOverridesByModule.get(providedIn);\n if (existingOverrides !== undefined) {\n existingOverrides.push(providerDef);\n } else {\n this.providerOverridesByModule.set(providedIn, [providerDef]);\n }\n }\n }\n\n overrideTemplateUsingTestingModule(type: Type<any>, template: string): void {\n const def = (type as any)[NG_COMP_DEF];\n const hasStyleUrls = (): boolean => {\n const metadata = this.resolvers.component.resolve(type)! as Component;\n return !!metadata.styleUrls && metadata.styleUrls.length > 0;\n };\n const overrideStyleUrls = !!def && !isComponentDefPendingResolution(type) && hasStyleUrls();\n\n // In Ivy, compiling a component does not require knowing the module providing the\n // component's scope, so overrideTemplateUsingTestingModule can be implemented purely via\n // overrideComponent. Important: overriding template requires full Component re-compilation,\n // which may fail in case styleUrls are also present (thus Component is considered as required\n // resolution). In order to avoid this, we preemptively set styleUrls to an empty array,\n // preserve current styles available on Component def and restore styles back once compilation\n // is complete.\n const override = overrideStyleUrls ? {template, styles: [], styleUrls: []} : {template};\n this.overrideComponent(type, {set: override});\n\n if (overrideStyleUrls && def.styles && def.styles.length > 0) {\n this.existingComponentStyles.set(type, def.styles);\n }\n\n // Set the component's scope to be the testing module.\n this.componentToModuleScope.set(type, TestingModuleOverride.OVERRIDE_TEMPLATE);\n }\n\n async compileComponents(): Promise<void> {\n this.clearComponentResolutionQueue();\n // Run compilers for all queued types.\n let needsAsyncResources = this.compileTypesSync();\n\n // compileComponents() should not be async unless it needs to be.\n if (needsAsyncResources) {\n let resourceLoader: ResourceLoader;\n let resolver = (url: string): Promise<string> => {\n if (!resourceLoader) {\n resourceLoader = this.injector.get(ResourceLoader);\n }\n return Promise.resolve(resourceLoader.get(url));\n };\n await resolveComponentResources(resolver);\n }\n }\n\n finalize(): NgModuleRef<any> {\n // One last compile\n this.compileTypesSync();\n\n // Create the testing module itself.\n this.compileTestModule();\n\n this.applyTransitiveScopes();\n\n this.applyProviderOverrides();\n\n // Patch previously stored `styles` Component values (taken from ɵcmp), in case these\n // Components have `styleUrls` fields defined and template override was requested.\n this.patchComponentsWithExistingStyles();\n\n // Clear the componentToModuleScope map, so that future compilations don't reset the scope of\n // every component.\n this.componentToModuleScope.clear();\n\n const parentInjector = this.platform.injector;\n this.testModuleRef = new NgModuleRef(this.testModuleType, parentInjector);\n\n // ApplicationInitStatus.runInitializers() is marked @internal to core.\n // Cast it to any before accessing it.\n (this.testModuleRef.injector.get(ApplicationInitStatus) as any).runInitializers();\n\n // Set locale ID after running app initializers, since locale information might be updated while\n // running initializers. This is also consistent with the execution order while bootstrapping an\n // app (see `packages/core/src/application_ref.ts` file).\n const localeId = this.testModuleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId);\n\n return this.testModuleRef;\n }\n\n /**\n * @internal\n */\n _compileNgModuleSync(moduleType: Type<any>): void {\n this.queueTypesFromModulesArray([moduleType]);\n this.compileTypesSync();\n this.applyProviderOverrides();\n this.applyProviderOverridesToModule(moduleType);\n this.applyTransitiveScopes();\n }\n\n /**\n * @internal\n */\n async _compileNgModuleAsync(moduleType: Type<any>): Promise<void> {\n this.queueTypesFromModulesArray([moduleType]);\n await this.compileComponents();\n this.applyProviderOverrides();\n this.applyProviderOverridesToModule(moduleType);\n this.applyTransitiveScopes();\n }\n\n /**\n * @internal\n */\n _getModuleResolver(): Resolver<NgModule> {\n return this.resolvers.module;\n }\n\n /**\n * @internal\n */\n _getComponentFactories(moduleType: NgModuleType): ComponentFactory<any>[] {\n return maybeUnwrapFn(moduleType.ɵmod.declarations).reduce((factories, declaration) => {\n const componentDef = (declaration as any).ɵcmp;\n componentDef && factories.push(new ComponentFactory(componentDef, this.testModuleRef!));\n return factories;\n }, [] as ComponentFactory<any>[]);\n }\n\n private compileTypesSync(): boolean {\n // Compile all queued components, directives, pipes.\n let needsAsyncResources = false;\n this.pendingComponents.forEach(declaration => {\n needsAsyncResources = needsAsyncResources || isComponentDefPendingResolution(declaration);\n const metadata = this.resolvers.component.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Component');\n }\n this.maybeStoreNgDef(NG_COMP_DEF, declaration);\n compileComponent(declaration, metadata);\n });\n this.pendingComponents.clear();\n\n this.pendingDirectives.forEach(declaration => {\n const metadata = this.resolvers.directive.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Directive');\n }\n this.maybeStoreNgDef(NG_DIR_DEF, declaration);\n compileDirective(declaration, metadata);\n });\n this.pendingDirectives.clear();\n\n this.pendingPipes.forEach(declaration => {\n const metadata = this.resolvers.pipe.resolve(declaration);\n if (metadata === null) {\n throw invalidTypeError(declaration.name, 'Pipe');\n }\n this.maybeStoreNgDef(NG_PIPE_DEF, declaration);\n compilePipe(declaration, metadata);\n });\n this.pendingPipes.clear();\n\n return needsAsyncResources;\n }\n\n private applyTransitiveScopes(): void {\n if (this.overriddenModules.size > 0) {\n // Module overrides (via `TestBed.overrideModule`) might affect scopes that were previously\n // calculated and stored in `transitiveCompileScopes`. If module overrides are present,\n // collect all affected modules and reset scopes to force their re-calculation.\n const testingModuleDef = (this.testModuleType as any)[NG_MOD_DEF];\n const affectedModules = this.collectModulesAffectedByOverrides(testingModuleDef.imports);\n if (affectedModules.size > 0) {\n affectedModules.forEach(moduleType => {\n this.storeFieldOfDefOnType(moduleType as any, NG_MOD_DEF, 'transitiveCompileScopes');\n (moduleType as any)[NG_MOD_DEF].transitiveCompileScopes = null;\n });\n }\n }\n\n const moduleToScope = new Map<Type<any>|TestingModuleOverride, NgModuleTransitiveScopes>();\n const getScopeOfModule =\n (moduleType: Type<any>|TestingModuleOverride): NgModuleTransitiveScopes => {\n if (!moduleToScope.has(moduleType)) {\n const isTestingModule = isTestingModuleOverride(moduleType);\n const realType = isTestingModule ? this.testModuleType : moduleType as Type<any>;\n moduleToScope.set(moduleType, transitiveScopesFor(realType));\n }\n return moduleToScope.get(moduleType)!;\n };\n\n this.componentToModuleScope.forEach((moduleType, componentType) => {\n const moduleScope = getScopeOfModule(moduleType);\n this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'directiveDefs');\n this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'pipeDefs');\n // `tView` that is stored on component def contains information about directives and pipes\n // that are in the scope of this component. Patching component scope will cause `tView` to be\n // changed. Store original `tView` before patching scope, so the `tView` (including scope\n // information) is restored back to its previous/original state before running next test.\n this.storeFieldOfDefOnType(componentType, NG_COMP_DEF, 'tView');\n patchComponentDefWithScope((componentType as any).ɵcmp, moduleScope);\n });\n\n this.componentToModuleScope.clear();\n }\n\n private applyProviderOverrides(): void {\n const maybeApplyOverrides = (field: string) => (type: Type<any>) => {\n const resolver = field === NG_COMP_DEF ? this.resolvers.component : this.resolvers.directive;\n const metadata = resolver.resolve(type)!;\n if (this.hasProviderOverrides(metadata.providers)) {\n this.patchDefWithProviderOverrides(type, field);\n }\n };\n this.seenComponents.forEach(maybeApplyOverrides(NG_COMP_DEF));\n this.seenDirectives.forEach(maybeApplyOverrides(NG_DIR_DEF));\n\n this.seenComponents.clear();\n this.seenDirectives.clear();\n }\n\n private applyProviderOverridesToModule(moduleType: Type<any>): void {\n if (this.moduleProvidersOverridden.has(moduleType)) {\n return;\n }\n this.moduleProvidersOverridden.add(moduleType);\n\n const injectorDef: any = (moduleType as any)[NG_INJ_DEF];\n if (this.providerOverridesByToken.size > 0) {\n const providers = [\n ...injectorDef.providers,\n ...(this.providerOverridesByModule.get(moduleType as InjectorType<any>) || [])\n ];\n if (this.hasProviderOverrides(providers)) {\n this.maybeStoreNgDef(NG_INJ_DEF, moduleType);\n\n this.storeFieldOfDefOnType(moduleType, NG_INJ_DEF, 'providers');\n injectorDef.providers = this.getOverriddenProviders(providers);\n }\n\n // Apply provider overrides to imported modules recursively\n const moduleDef = (moduleType as any)[NG_MOD_DEF];\n const imports = maybeUnwrapFn(moduleDef.imports);\n for (const importedModule of imports) {\n this.applyProviderOverridesToModule(importedModule);\n }\n // Also override the providers on any ModuleWithProviders imports since those don't appear in\n // the moduleDef.\n for (const importedModule of flatten(injectorDef.imports)) {\n if (isModuleWithProviders(importedModule)) {\n this.defCleanupOps.push({\n object: importedModule,\n fieldName: 'providers',\n originalValue: importedModule.providers\n });\n importedModule.providers = this.getOverriddenProviders(importedModule.providers);\n }\n }\n }\n }\n\n private patchComponentsWithExistingStyles(): void {\n this.existingComponentStyles.forEach(\n (styles, type) => (type as any)[NG_COMP_DEF].styles = styles);\n this.existingComponentStyles.clear();\n }\n\n private queueTypeArray(arr: any[], moduleType: Type<any>|TestingModuleOverride): void {\n for (const value of arr) {\n if (Array.isArray(value)) {\n this.queueTypeArray(value, moduleType);\n } else {\n this.queueType(value, moduleType);\n }\n }\n }\n\n private recompileNgModule(ngModule: Type<any>, metadata: NgModule): void {\n // Cache the initial ngModuleDef as it will be overwritten.\n this.maybeStoreNgDef(NG_MOD_DEF, ngModule);\n this.maybeStoreNgDef(NG_INJ_DEF, ngModule);\n\n compileNgModuleDefs(ngModule as NgModuleType<any>, metadata);\n }\n\n private queueType(type: Type<any>, moduleType: Type<any>|TestingModuleOverride): void {\n const component = this.resolvers.component.resolve(type);\n if (component) {\n // Check whether a give Type has respective NG def (ɵcmp) and compile if def is\n // missing. That might happen in case a class without any Angular decorators extends another\n // class where Component/Directive/Pipe decorator is defined.\n if (isComponentDefPendingResolution(type) || !type.hasOwnProperty(NG_COMP_DEF)) {\n this.pendingComponents.add(type);\n }\n this.seenComponents.add(type);\n\n // Keep track of the module which declares this component, so later the component's scope\n // can be set correctly. If the component has already been recorded here, then one of several\n // cases is true:\n // * the module containing the component was imported multiple times (common).\n // * the component is declared in multiple modules (which is an error).\n // * the component was in 'declarations' of the testing module, and also in an imported module\n // in which case the module scope will be TestingModuleOverride.DECLARATION.\n // * overrideTemplateUsingTestingModule was called for the component in which case the module\n // scope will be TestingModuleOverride.OVERRIDE_TEMPLATE.\n //\n // If the component was previously in the testing module's 'declarations' (meaning the\n // current value is TestingModuleOverride.DECLARATION), then `moduleType` is the component's\n // real module, which was imported. This pattern is understood to mean that the component\n // should use its original scope, but that the testing module should also contain the\n // component in its scope.\n if (!this.componentToModuleScope.has(type) ||\n this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION) {\n this.componentToModuleScope.set(type, moduleType);\n }\n return;\n }\n\n const directive = this.resolvers.directive.resolve(type);\n if (directive) {\n if (!type.hasOwnProperty(NG_DIR_DEF)) {\n this.pendingDirectives.add(type);\n }\n this.seenDirectives.add(type);\n return;\n }\n\n const pipe = this.resolvers.pipe.resolve(type);\n if (pipe && !type.hasOwnProperty(NG_PIPE_DEF)) {\n this.pendingPipes.add(type);\n return;\n }\n }\n\n private queueTypesFromModulesArray(arr: any[]): void {\n // Because we may encounter the same NgModule while processing the imports and exports of an\n // NgModule tree, we cache them in this set so we can skip ones that have already been seen\n // encountered. In some test setups, this caching resulted in 10X runtime improvement.\n const processedNgModuleDefs = new Set();\n const queueTypesFromModulesArrayRecur = (arr: any[]): void => {\n for (const value of arr) {\n if (Array.isArray(value)) {\n queueTypesFromModulesArrayRecur(value);\n } else if (hasNgModuleDef(value)) {\n const def = value.ɵmod;\n if (processedNgModuleDefs.has(def)) {\n continue;\n }\n processedNgModuleDefs.add(def);\n // Look through declarations, imports, and exports, and queue\n // everything found there.\n this.queueTypeArray(maybeUnwrapFn(def.declarations), value);\n queueTypesFromModulesArrayRecur(maybeUnwrapFn(def.imports));\n queueTypesFromModulesArrayRecur(maybeUnwrapFn(def.exports));\n } else if (isModuleWithProviders(value)) {\n queueTypesFromModulesArrayRecur([value.ngModule]);\n }\n }\n };\n queueTypesFromModulesArrayRecur(arr);\n }\n\n // When module overrides (via `TestBed.overrideModule`) are present, it might affect all modules\n // that import (even transitively) an overridden one. For all affected modules we need to\n // recalculate their scopes for a given test run and restore original scopes at the end. The goal\n // of this function is to collect all affected modules in a set for further processing. Example:\n // if we have the following module hierarchy: A -> B -> C (where `->` means `imports`) and module\n // `C` is overridden, we consider `A` and `B` as affected, since their scopes might become\n // invalidated with the override.\n private collectModulesAffectedByOverrides(arr: any[]): Set<NgModuleType<any>> {\n const seenModules = new Set<NgModuleType<any>>();\n const affectedModules = new Set<NgModuleType<any>>();\n const calcAffectedModulesRecur = (arr: any[], path: NgModuleType<any>[]): void => {\n for (const value of arr) {\n if (Array.isArray(value)) {\n // If the value is an array, just flatten it (by invoking this function recursively),\n // keeping \"path\" the same.\n calcAffectedModulesRecur(value, path);\n } else if (hasNgModuleDef(value)) {\n if (seenModules.has(value)) {\n // If we've seen this module before and it's included into \"affected modules\" list, mark\n // the whole path that leads to that module as affected, but do not descend into its\n // imports, since we already examined them before.\n if (affectedModules.has(value)) {\n path.forEach(item => affectedModules.add(item));\n }\n continue;\n }\n seenModules.add(value);\n if (this.overriddenModules.has(value)) {\n path.forEach(item => affectedModules.add(item));\n }\n // Examine module imports recursively to look for overridden modules.\n const moduleDef = (value as any)[NG_MOD_DEF];\n calcAffectedModulesRecur(maybeUnwrapFn(moduleDef.imports), path.concat(value));\n }\n }\n };\n calcAffectedModulesRecur(arr, []);\n return affectedModules;\n }\n\n private maybeStoreNgDef(prop: string, type: Type<any>) {\n if (!this.initialNgDefs.has(type)) {\n const currentDef = Object.getOwnPropertyDescriptor(type, prop);\n this.initialNgDefs.set(type, [prop, currentDef]);\n }\n }\n\n private storeFieldOfDefOnType(type: Type<any>, defField: string, fieldName: string): void {\n const def: any = (type as any)[defField];\n const originalValue: any = def[fieldName];\n this.defCleanupOps.push({object: def, fieldName, originalValue});\n }\n\n /**\n * Clears current components resolution queue, but stores the state of the queue, so we can\n * restore it later. Clearing the queue is required before we try to compile components (via\n * `TestBed.compileComponents`), so that component defs are in sync with the resolution queue.\n */\n private clearComponentResolutionQueue() {\n if (this.originalComponentResolutionQueue === null) {\n this.originalComponentResolutionQueue = new Map();\n }\n clearResolutionOfComponentResourcesQueue().forEach(\n (value, key) => this.originalComponentResolutionQueue!.set(key, value));\n }\n\n /*\n * Restores component resolution queue to the previously saved state. This operation is performed\n * as a part of restoring the state after completion of the current set of tests (that might\n * potentially mutate the state).\n */\n private restoreComponentResolutionQueue() {\n if (this.originalComponentResolutionQueue !== null) {\n restoreComponentResolutionQueue(this.originalComponentResolutionQueue);\n this.originalComponentResolutionQueue = null;\n }\n }\n\n restoreOriginalState(): void {\n // Process cleanup ops in reverse order so the field's original value is restored correctly (in\n // case there were multiple overrides for the same field).\n forEachRight(this.defCleanupOps, (op: CleanupOperation) => {\n op.object[op.fieldName] = op.originalValue;\n });\n // Restore initial component/directive/pipe defs\n this.initialNgDefs.forEach((value: [string, PropertyDescriptor|undefined], type: Type<any>) => {\n const [prop, descriptor] = value;\n if (!descriptor) {\n // Delete operations are generally undesirable since they have performance implications\n // on objects they were applied to. In this particular case, situations where this code\n // is invoked should be quite rare to cause any noticeable impact, since it's applied\n // only to some test cases (for example when class with no annotations extends some\n // @Component) when we need to clear 'ɵcmp' field on a given class to restore\n // its original state (before applying overrides and running tests).\n delete (type as any)[prop];\n } else {\n Object.defineProperty(type, prop, descriptor);\n }\n });\n this.initialNgDefs.clear();\n this.moduleProvidersOverridden.clear();\n this.restoreComponentResolutionQueue();\n // Restore the locale ID to the default value, this shouldn't be necessary but we never know\n setLocaleId(DEFAULT_LOCALE_ID);\n }\n\n private compileTestModule(): void {\n class RootScopeModule {}\n compileNgModuleDefs(RootScopeModule as NgModuleType<any>, {\n providers: [...this.rootProviderOverrides],\n });\n\n const ngZone = new NgZone({enableLongStackTrace: true});\n const providers: Provider[] = [\n {provide: NgZone, useValue: ngZone},\n {provide: Compiler, useFactory: () => new R3TestCompiler(this)},\n ...this.providers,\n ...this.providerOverrides,\n ];\n const imports = [RootScopeModule, this.additionalModuleTypes, this.imports || []];\n\n // clang-format off\n compileNgModuleDefs(this.testModuleType, {\n declarations: this.declarations,\n imports,\n schemas: this.schemas,\n providers,\n }, /* allowDuplicateDeclarationsInRoot */ true);\n // clang-format on\n\n this.applyProviderOverridesToModule(this.testModuleType);\n }\n\n get injector(): Injector {\n if (this._injector !== null) {\n return this._injector;\n }\n\n const providers: Provider[] = [];\n const compilerOptions = this.platform.injector.get(COMPILER_OPTIONS);\n compilerOptions.forEach(opts => {\n if (opts.providers) {\n providers.push(opts.providers);\n }\n });\n if (this.compilerProviders !== null) {\n providers.push(...this.compilerProviders);\n }\n\n // TODO(ocombe): make this work with an Injector directly instead of creating a module for it\n class CompilerModule {}\n compileNgModuleDefs(CompilerModule as NgModuleType<any>, {providers});\n\n const CompilerModuleFactory = new R3NgModuleFactory(CompilerModule);\n this._injector = CompilerModuleFactory.create(this.platform.injector).injector;\n return this._injector;\n }\n\n // get overrides for a specific provider (if any)\n private getSingleProviderOverrides(provider: Provider): Provider|null {\n const token = getProviderToken(provider);\n return this.providerOverridesByToken.get(token) || null;\n }\n\n private getProviderOverrides(providers?: Provider[]): Provider[] {\n if (!providers || !providers.length || this.providerOverridesByToken.size === 0) return [];\n // There are two flattening operations here. The inner flatten() operates on the metadata's\n // providers and applies a mapping function which retrieves overrides for each incoming\n // provider. The outer flatten() then flattens the produced overrides array. If this is not\n // done, the array can contain other empty arrays (e.g. `[[], []]`) which leak into the\n // providers array and contaminate any error messages that might be generated.\n return flatten(flatten(\n providers, (provider: Provider) => this.getSingleProviderOverrides(provider) || []));\n }\n\n private getOverriddenProviders(providers?: Provider[]): Provider[] {\n if (!providers || !providers.length || this.providerOverridesByToken.size === 0) return [];\n\n const flattenedProviders = flatten<Provider[]>(providers);\n const overrides = this.getProviderOverrides(flattenedProviders);\n const overriddenProviders = [...flattenedProviders, ...overrides];\n const final: Provider[] = [];\n const seenOverriddenProviders = new Set<Provider>();\n\n // We iterate through the list of providers in reverse order to make sure provider overrides\n // take precedence over the values defined in provider list. We also filter out all providers\n // that have overrides, keeping overridden values only. This is needed, since presence of a\n // provider with `ngOnDestroy` hook will cause this hook to be registered and invoked later.\n forEachRight(overriddenProviders, (provider: any) => {\n const token: any = getProviderToken(provider);\n if (this.providerOverridesByToken.has(token)) {\n if (!seenOverriddenProviders.has(token)) {\n seenOverriddenProviders.add(token);\n // Treat all overridden providers as `{multi: false}` (even if it's a multi-provider) to\n // make sure that provided override takes highest precedence and is not combined with\n // other instances of the same multi provider.\n final.unshift({...provider, multi: false});\n }\n } else {\n final.unshift(provider);\n }\n });\n return final;\n }\n\n private hasProviderOverrides(providers?: Provider[]): boolean {\n return this.getProviderOverrides(providers).length > 0;\n }\n\n private patchDefWithProviderOverrides(declaration: Type<any>, field: string): void {\n const def = (declaration as any)[field];\n if (def && def.providersResolver) {\n this.maybeStoreNgDef(field, declaration);\n\n const resolver = def.providersResolver;\n const processProvidersFn = (providers: Provider[]) => this.getOverriddenProviders(providers);\n this.storeFieldOfDefOnType(declaration, field, 'providersResolver');\n def.providersResolver = (ngDef: DirectiveDef<any>) => resolver(ngDef, processProvidersFn);\n }\n }\n}\n\nfunction initResolvers(): Resolvers {\n return {\n module: new NgModuleResolver(),\n component: new ComponentResolver(),\n directive: new DirectiveResolver(),\n pipe: new PipeResolver()\n };\n}\n\nfunction hasNgModuleDef<T>(value: Type<T>): value is NgModuleType<T> {\n return value.hasOwnProperty('ɵmod');\n}\n\nfunction maybeUnwrapFn<T>(maybeFn: (() => T)|T): T {\n return maybeFn instanceof Function ? maybeFn() : maybeFn;\n}\n\nfunction flatten<T>(values: any[], mapFn?: (value: T) => any): T[] {\n const out: T[] = [];\n values.forEach(value => {\n if (Array.isArray(value)) {\n out.push(...flatten<T>(value, mapFn));\n } else {\n out.push(mapFn ? mapFn(value) : value);\n }\n });\n return out;\n}\n\nfunction getProviderField(provider: Provider, field: string) {\n return provider && typeof provider === 'object' && (provider as any)[field];\n}\n\nfunction getProviderToken(provider: Provider) {\n return getProviderField(provider, 'provide') || provider;\n}\n\nfunction isModuleWithProviders(value: any): value is ModuleWithProviders<any> {\n return value.hasOwnProperty('ngModule');\n}\n\nfunction forEachRight<T>(values: T[], fn: (value: T, idx: number) => void): void {\n for (let idx = values.length - 1; idx >= 0; idx--) {\n fn(values[idx], idx);\n }\n}\n\nfunction invalidTypeError(name: string, expectedType: string): Error {\n return new Error(`${name} class doesn't have @${expectedType} decorator or is missing metadata.`);\n}\n\nclass R3TestCompiler implements Compiler {\n constructor(private testBed: R3TestBedCompiler) {}\n\n compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T> {\n this.testBed._compileNgModuleSync(moduleType);\n return new R3NgModuleFactory(moduleType);\n }\n\n async compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>> {\n await this.testBed._compileNgModuleAsync(moduleType);\n return new R3NgModuleFactory(moduleType);\n }\n\n compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T> {\n const ngModuleFactory = this.compileModuleSync(moduleType);\n const componentFactories = this.testBed._getComponentFactories(moduleType as NgModuleType<T>);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n\n async compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>):\n Promise<ModuleWithComponentFactories<T>> {\n const ngModuleFactory = await this.compileModuleAsync(moduleType);\n const componentFactories = this.testBed._getComponentFactories(moduleType as NgModuleType<T>);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n\n clearCache(): void {}\n\n clearCacheFor(type: Type<any>): void {}\n\n getModuleId(moduleType: Type<any>): string|undefined {\n const meta = this.testBed._getModuleResolver().resolve(moduleType);\n return meta && meta.id || undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component, Directive, InjectFlags, InjectionToken, NgModule, Pipe, PlatformRef, ProviderToken, SchemaMetadata, Type} from '@angular/core';\n\nimport {ComponentFixture} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {TestBed} from './test_bed';\n\n/**\n * Whether test modules should be torn down by default.\n * Currently disabled for backwards-compatibility reasons.\n */\nexport const TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT = false;\n\n/**\n * An abstract class for inserting the root test component element in a platform independent way.\n *\n * @publicApi\n */\nexport class TestComponentRenderer {\n insertRootElement(rootElementId: string) {}\n removeAllRootElements?() {}\n}\n\n/**\n * @publicApi\n */\nexport const ComponentFixtureAutoDetect =\n new InjectionToken<boolean[]>('ComponentFixtureAutoDetect');\n\n/**\n * @publicApi\n */\nexport const ComponentFixtureNoNgZone = new InjectionToken<boolean[]>('ComponentFixtureNoNgZone');\n\n/**\n * @publicApi\n */\nexport type TestModuleMetadata = {\n providers?: any[],\n declarations?: any[],\n imports?: any[],\n schemas?: Array<SchemaMetadata|any[]>,\n aotSummaries?: () => any[],\n teardown?: ModuleTeardownOptions;\n};\n\n/**\n * @publicApi\n */\nexport interface TestEnvironmentOptions {\n aotSummaries?: () => any[];\n teardown?: ModuleTeardownOptions;\n}\n\n/**\n * Object used to configure the test module teardown behavior in `TestBed`.\n * @publicApi\n */\nexport interface ModuleTeardownOptions {\n /** Whether the test module should be destroyed after every test. */\n destroyAfterEach: boolean;\n\n /** Whether errors during test module destruction should be re-thrown. Defaults to `true`. */\n rethrowErrors?: boolean;\n}\n\n/**\n * Static methods implemented by the `TestBedViewEngine` and `TestBedRender3`\n *\n * @publicApi\n */\nexport interface TestBedStatic {\n new(...args: any[]): TestBed;\n\n initTestEnvironment(ngModule: Type<any>|Type<any>[], platform: PlatformRef, options?: {\n teardown?: ModuleTeardownOptions\n }): TestBed;\n initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;\n\n /**\n * Reset the providers for the test injector.\n */\n resetTestEnvironment(): void;\n\n resetTestingModule(): TestBedStatic;\n\n /**\n * Allows overriding default compiler providers and settings\n * which are defined in test_injector.js\n */\n configureCompiler(config: {providers?: any[]; useJit?: boolean;}): TestBedStatic;\n\n /**\n * Allows overriding default providers, directives, pipes, modules of the test injector,\n * which are defined in test_injector.js\n */\n configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;\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 compileComponents(): Promise<any>;\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic;\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBedStatic;\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBedStatic;\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic;\n\n overrideTemplate(component: Type<any>, template: string): TestBedStatic;\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 overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n *\n * Note: This works for JIT and AOTed components as well.\n */\n overrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): TestBedStatic;\n overrideProvider(token: any, provider: {useValue: any;}): TestBedStatic;\n overrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): TestBedStatic;\n\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue?: any): any;\n\n createComponent<T>(component: Type<T>): ComponentFixture<T>;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// The formatter and CI disagree on how this import statement should be formatted. Both try to keep\n// it on one line, too, which has gotten very hard to read & manage. So disable the formatter for\n// this statement only.\n\n/* clang-format off */\nimport {\n Component,\n Directive,\n InjectFlags,\n InjectionToken,\n Injector,\n NgModule,\n NgZone,\n Pipe,\n PlatformRef,\n ProviderToken,\n Type,\n ɵflushModuleScopingQueueAsMuchAsPossible as flushModuleScopingQueueAsMuchAsPossible,\n ɵRender3ComponentFactory as ComponentFactory,\n ɵRender3NgModuleRef as NgModuleRef,\n ɵresetCompiledComponents as resetCompiledComponents,\n ɵstringify as stringify,\n} from '@angular/core';\n\n/* clang-format on */\n\nimport {ComponentFixture} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {R3TestBedCompiler} from './r3_test_bed_compiler';\nimport {TestBed} from './test_bed';\nimport {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, ModuleTeardownOptions, TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT, TestBedStatic, TestComponentRenderer, TestEnvironmentOptions, TestModuleMetadata} from './test_bed_common';\n\nlet _nextRootElementId = 0;\n\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * TestBed is the primary api for writing unit tests for Angular applications and libraries.\n *\n * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`\n * according to the compiler used.\n */\nexport class TestBedRender3 implements TestBed {\n /**\n * Teardown options that have been configured at the environment level.\n * Used as a fallback if no instance-level options have been provided.\n */\n private static _environmentTeardownOptions: ModuleTeardownOptions|undefined;\n\n /**\n * Teardown options that have been configured at the `TestBed` instance level.\n * These options take precedence over the environemnt-level ones.\n */\n private _instanceTeardownOptions: ModuleTeardownOptions|undefined;\n\n /**\n * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n * angular module. These are common to every test in the suite.\n *\n * This may only be called once, to set up the common providers for the current test\n * suite on the current platform. If you absolutely need to change the providers,\n * first use `resetTestEnvironment`.\n *\n * Test modules and platforms for individual platforms are available from\n * '@angular/<platform_name>/testing'.\n *\n * @publicApi\n */\n static initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n summariesOrOptions?: TestEnvironmentOptions|(() => any[])): TestBed {\n const testBed = _getTestBedRender3();\n testBed.initTestEnvironment(ngModule, platform, summariesOrOptions);\n return testBed;\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n static resetTestEnvironment(): void {\n _getTestBedRender3().resetTestEnvironment();\n }\n\n static configureCompiler(config: {providers?: any[]; useJit?: boolean;}): TestBedStatic {\n _getTestBedRender3().configureCompiler(config);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n /**\n * Allows overriding default providers, directives, pipes, modules of the test injector,\n * which are defined in test_injector.js\n */\n static configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic {\n _getTestBedRender3().configureTestingModule(moduleDef);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n /**\n * Compile components with a `templateUrl` for the test's NgModule.\n * It is necessary to call this function\n * as fetching urls is asynchronous.\n */\n static compileComponents(): Promise<any> {\n return _getTestBedRender3().compileComponents();\n }\n\n static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic {\n _getTestBedRender3().overrideModule(ngModule, override);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static overrideComponent(component: Type<any>, override: MetadataOverride<Component>):\n TestBedStatic {\n _getTestBedRender3().overrideComponent(component, override);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>):\n TestBedStatic {\n _getTestBedRender3().overrideDirective(directive, override);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic {\n _getTestBedRender3().overridePipe(pipe, override);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static overrideTemplate(component: Type<any>, template: string): TestBedStatic {\n _getTestBedRender3().overrideComponent(component, {set: {template, templateUrl: null!}});\n return TestBedRender3 as any as TestBedStatic;\n }\n\n /**\n * Overrides the template of the given component, compiling the template\n * in the context of the TestingModule.\n *\n * Note: This works for JIT and AOTed components as well.\n */\n static overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic {\n _getTestBedRender3().overrideTemplateUsingTestingModule(component, template);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static overrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): TestBedStatic;\n static overrideProvider(token: any, provider: {useValue: any;}): TestBedStatic;\n static overrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): TestBedStatic {\n _getTestBedRender3().overrideProvider(token, provider);\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n static inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n static inject<T>(token: ProviderToken<T>, notFoundValue?: T|null, flags?: InjectFlags): T|null {\n return _getTestBedRender3().inject(token, notFoundValue, flags);\n }\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get(token: any, notFoundValue?: any): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get(\n token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n flags: InjectFlags = InjectFlags.Default): any {\n return _getTestBedRender3().inject(token, notFoundValue, flags);\n }\n\n static createComponent<T>(component: Type<T>): ComponentFixture<T> {\n return _getTestBedRender3().createComponent(component);\n }\n\n static resetTestingModule(): TestBedStatic {\n _getTestBedRender3().resetTestingModule();\n return TestBedRender3 as any as TestBedStatic;\n }\n\n static shouldTearDownTestingModule(): boolean {\n return _getTestBedRender3().shouldTearDownTestingModule();\n }\n\n static tearDownTestingModule(): void {\n _getTestBedRender3().tearDownTestingModule();\n }\n\n // Properties\n\n platform: PlatformRef = null!;\n ngModule: Type<any>|Type<any>[] = null!;\n\n private _compiler: R3TestBedCompiler|null = null;\n private _testModuleRef: NgModuleRef<any>|null = null;\n\n private _activeFixtures: ComponentFixture<any>[] = [];\n private _globalCompilationChecked = false;\n\n /**\n * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n * angular module. These are common to every test in the suite.\n *\n * This may only be called once, to set up the common providers for the current test\n * suite on the current platform. If you absolutely need to change the providers,\n * first use `resetTestEnvironment`.\n *\n * Test modules and platforms for individual platforms are available from\n * '@angular/<platform_name>/testing'.\n *\n * @publicApi\n */\n initTestEnvironment(ngModule: Type<any>|Type<any>[], platform: PlatformRef, summariesOrOptions?: {\n teardown?: ModuleTeardownOptions\n }|(() => any[])): void {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n\n // If `summariesOrOptions` is a function, it means that it's\n // an AOT summaries factory which Ivy doesn't support.\n TestBedRender3._environmentTeardownOptions =\n typeof summariesOrOptions === 'function' ? undefined : summariesOrOptions?.teardown;\n\n this.platform = platform;\n this.ngModule = ngModule;\n this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @publicApi\n */\n resetTestEnvironment(): void {\n this.resetTestingModule();\n this._compiler = null;\n this.platform = null!;\n this.ngModule = null!;\n TestBedRender3._environmentTeardownOptions = undefined;\n }\n\n resetTestingModule(): void {\n this.checkGlobalCompilationFinished();\n resetCompiledComponents();\n if (this._compiler !== null) {\n this.compiler.restoreOriginalState();\n }\n this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);\n\n // We have to chain a couple of try/finally blocks, because each step can\n // throw errors and we don't want it to interrupt the next step and we also\n // want an error to be thrown at the end.\n try {\n this.destroyActiveFixtures();\n } finally {\n try {\n if (this.shouldTearDownTestingModule()) {\n this.tearDownTestingModule();\n }\n } finally {\n this._testModuleRef = null;\n this._instanceTeardownOptions = undefined;\n }\n }\n }\n\n configureCompiler(config: {providers?: any[]; useJit?: boolean;}): void {\n if (config.useJit != null) {\n throw new Error('the Render3 compiler JiT mode is not configurable !');\n }\n\n if (config.providers !== undefined) {\n this.compiler.setCompilerProviders(config.providers);\n }\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata): void {\n this.assertNotInstantiated('R3TestBed.configureTestingModule', 'configure the test module');\n // Always re-assign the teardown options, even if they're undefined.\n // This ensures that we don't carry the options between tests.\n this._instanceTeardownOptions = moduleDef.teardown;\n this.compiler.configureTestingModule(moduleDef);\n }\n\n compileComponents(): Promise<any> {\n return this.compiler.compileComponents();\n }\n\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n inject<T>(token: ProviderToken<T>, notFoundValue?: T|null, flags?: InjectFlags): T|null {\n if (token as unknown === TestBedRender3) {\n return this as any;\n }\n const UNDEFINED = {};\n const result = this.testModuleRef.injector.get(token, UNDEFINED, flags);\n return result === UNDEFINED ? this.compiler.injector.get(token, notFoundValue, flags) as any :\n result;\n }\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue?: any): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n flags: InjectFlags = InjectFlags.Default): any {\n return this.inject(token, notFoundValue, flags);\n }\n\n execute(tokens: any[], fn: Function, context?: any): any {\n const params = tokens.map(t => this.inject(t));\n return fn.apply(context, params);\n }\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void {\n this.assertNotInstantiated('overrideModule', 'override module metadata');\n this.compiler.overrideModule(ngModule, override);\n }\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void {\n this.assertNotInstantiated('overrideComponent', 'override component metadata');\n this.compiler.overrideComponent(component, override);\n }\n\n overrideTemplateUsingTestingModule(component: Type<any>, template: string): void {\n this.assertNotInstantiated(\n 'R3TestBed.overrideTemplateUsingTestingModule',\n 'Cannot override template when the test module has already been instantiated');\n this.compiler.overrideTemplateUsingTestingModule(component, template);\n }\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void {\n this.assertNotInstantiated('overrideDirective', 'override directive metadata');\n this.compiler.overrideDirective(directive, override);\n }\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void {\n this.assertNotInstantiated('overridePipe', 'override pipe metadata');\n this.compiler.overridePipe(pipe, override);\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n */\n overrideProvider(token: any, provider: {useFactory?: Function, useValue?: any, deps?: any[]}):\n void {\n this.assertNotInstantiated('overrideProvider', 'override provider');\n this.compiler.overrideProvider(token, provider);\n }\n\n createComponent<T>(type: Type<T>): ComponentFixture<T> {\n const testComponentRenderer = this.inject(TestComponentRenderer);\n const rootElId = `root${_nextRootElementId++}`;\n testComponentRenderer.insertRootElement(rootElId);\n\n const componentDef = (type as any).ɵcmp;\n\n if (!componentDef) {\n throw new Error(\n `It looks like '${stringify(type)}' has not been IVY compiled - it has no 'ɵcmp' field`);\n }\n\n // TODO: Don't cast as `InjectionToken<boolean>`, proper type is boolean[]\n const noNgZone = this.inject(ComponentFixtureNoNgZone as InjectionToken<boolean>, false);\n // TODO: Don't cast as `InjectionToken<boolean>`, proper type is boolean[]\n const autoDetect: boolean =\n this.inject(ComponentFixtureAutoDetect as InjectionToken<boolean>, false);\n const ngZone: NgZone|null = noNgZone ? null : this.inject(NgZone, null);\n const componentFactory = new ComponentFactory(componentDef);\n const initComponent = () => {\n const componentRef =\n componentFactory.create(Injector.NULL, [], `#${rootElId}`, this.testModuleRef);\n return new ComponentFixture<any>(componentRef, ngZone, autoDetect);\n };\n const fixture = ngZone ? ngZone.run(initComponent) : initComponent();\n this._activeFixtures.push(fixture);\n return fixture;\n }\n\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n private get compiler(): R3TestBedCompiler {\n if (this._compiler === null) {\n throw new Error(`Need to call TestBed.initTestEnvironment() first`);\n }\n return this._compiler;\n }\n\n /**\n * @internal strip this from published d.ts files due to\n * https://github.com/microsoft/TypeScript/issues/36216\n */\n private get testModuleRef(): NgModuleRef<any> {\n if (this._testModuleRef === null) {\n this._testModuleRef = this.compiler.finalize();\n }\n return this._testModuleRef;\n }\n\n private assertNotInstantiated(methodName: string, methodDescription: string) {\n if (this._testModuleRef !== null) {\n throw new Error(\n `Cannot ${methodDescription} when the test module has already been instantiated. ` +\n `Make sure you are not using \\`inject\\` before \\`${methodName}\\`.`);\n }\n }\n\n /**\n * Check whether the module scoping queue should be flushed, and flush it if needed.\n *\n * When the TestBed is reset, it clears the JIT module compilation queue, cancelling any\n * in-progress module compilation. This creates a potential hazard - the very first time the\n * TestBed is initialized (or if it's reset without being initialized), there may be pending\n * compilations of modules declared in global scope. These compilations should be finished.\n *\n * To ensure that globally declared modules have their components scoped properly, this function\n * is called whenever TestBed is initialized or reset. The _first_ time that this happens, prior\n * to any other operations, the scoping queue is flushed.\n */\n private checkGlobalCompilationFinished(): void {\n // Checking _testNgModuleRef is null should not be necessary, but is left in as an additional\n // guard that compilations queued in tests (after instantiation) are never flushed accidentally.\n if (!this._globalCompilationChecked && this._testModuleRef === null) {\n flushModuleScopingQueueAsMuchAsPossible();\n }\n this._globalCompilationChecked = true;\n }\n\n private destroyActiveFixtures(): void {\n let errorCount = 0;\n this._activeFixtures.forEach((fixture) => {\n try {\n fixture.destroy();\n } catch (e) {\n errorCount++;\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n\n if (errorCount > 0 && this.shouldRethrowTeardownErrors()) {\n throw Error(\n `${errorCount} ${(errorCount === 1 ? 'component' : 'components')} ` +\n `threw errors during cleanup`);\n }\n }\n\n private shouldRethrowTeardownErrors() {\n const instanceOptions = this._instanceTeardownOptions;\n const environmentOptions = TestBedRender3._environmentTeardownOptions;\n\n // If the new teardown behavior hasn't been configured, preserve the old behavior.\n if (!instanceOptions && !environmentOptions) {\n return false;\n }\n\n // Otherwise use the configured behavior or default to rethrowing.\n return instanceOptions?.rethrowErrors ?? environmentOptions?.rethrowErrors ?? true;\n }\n\n shouldTearDownTestingModule(): boolean {\n return this._instanceTeardownOptions?.destroyAfterEach ??\n TestBedRender3._environmentTeardownOptions?.destroyAfterEach ??\n TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;\n }\n\n tearDownTestingModule() {\n // If the module ref has already been destroyed, we won't be able to get a test renderer.\n if (this._testModuleRef === null) {\n return;\n }\n // Resolve the renderer ahead of time, because we want to remove the root elements as the very\n // last step, but the injector will be destroyed as a part of the module ref destruction.\n const testRenderer = this.inject(TestComponentRenderer);\n try {\n this._testModuleRef.destroy();\n } catch (e) {\n if (this.shouldRethrowTeardownErrors()) {\n throw e;\n } else {\n console.error('Error during cleanup of a testing module', {\n component: this._testModuleRef.instance,\n stacktrace: e,\n });\n }\n } finally {\n testRenderer.removeAllRootElements?.();\n }\n }\n}\n\nlet testBed: TestBedRender3;\n\nexport function _getTestBedRender3(): TestBedRender3 {\n return testBed = testBed || new TestBedRender3();\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, CompilerOptions, Component, ComponentFactory, Directive, Injectable, Injector, NgModule, Pipe, Type} from '@angular/core';\n\nimport {MetadataOverride} from './metadata_override';\n\nfunction unimplemented(): any {\n throw Error('unimplemented');\n}\n\n/**\n * Special interface to the compiler only used by testing\n *\n * @publicApi\n */\n@Injectable()\nexport class TestingCompiler extends Compiler {\n get injector(): Injector {\n throw unimplemented();\n }\n overrideModule(module: Type<any>, overrides: MetadataOverride<NgModule>): void {\n throw unimplemented();\n }\n overrideDirective(directive: Type<any>, overrides: MetadataOverride<Directive>): void {\n throw unimplemented();\n }\n overrideComponent(component: Type<any>, overrides: MetadataOverride<Component>): void {\n throw unimplemented();\n }\n overridePipe(directive: Type<any>, overrides: MetadataOverride<Pipe>): void {\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 loadAotSummaries(summaries: () => any[]) {\n throw unimplemented();\n }\n\n /**\n * Gets the component factory for the given component.\n * This assumes that the component has been compiled before calling this call using\n * `compileModuleAndAllComponents*`.\n */\n getComponentFactory<T>(component: Type<T>): ComponentFactory<T> {\n throw unimplemented();\n }\n\n /**\n * Returns the component type that is stored in the given error.\n * This can be used for errors created by compileModule...\n */\n getComponentFromError(error: Error): Type<any>|null {\n throw unimplemented();\n }\n}\n\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nexport abstract class TestingCompilerFactory {\n abstract createTestingCompiler(options?: CompilerOptions[]): TestingCompiler;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationInitStatus, CompilerOptions, Component, Directive, InjectFlags, InjectionToken, Injector, NgModule, NgModuleFactory, NgModuleRef, NgZone, Optional, Pipe, PlatformRef, Provider, ProviderToken, SchemaMetadata, SkipSelf, StaticProvider, Type, ɵclearOverrides as clearOverrides, ɵDepFlags as DepFlags, ɵgetInjectableDef as getInjectableDef, ɵINJECTOR_SCOPE as INJECTOR_SCOPE, ɵivyEnabled as ivyEnabled, ɵNodeFlags as NodeFlags, ɵoverrideComponentView as overrideComponentView, ɵoverrideProvider as overrideProvider, ɵstringify as stringify, ɵɵInjectableDeclaration} from '@angular/core';\n\nimport {ComponentFixture} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {_getTestBedRender3, TestBedRender3} from './r3_test_bed';\nimport {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, ModuleTeardownOptions, TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT, TestBedStatic, TestComponentRenderer, TestEnvironmentOptions, TestModuleMetadata} from './test_bed_common';\nimport {TestingCompiler, TestingCompilerFactory} from './test_compiler';\n\n\nlet _nextRootElementId = 0;\n\n/**\n * @publicApi\n */\nexport interface TestBed {\n platform: PlatformRef;\n\n ngModule: Type<any>|Type<any>[];\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 initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n options?: TestEnvironmentOptions): void;\n initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;\n\n /**\n * Reset the providers for the test injector.\n */\n resetTestEnvironment(): void;\n\n resetTestingModule(): void;\n\n configureCompiler(config: {providers?: any[], useJit?: boolean}): void;\n\n configureTestingModule(moduleDef: TestModuleMetadata): void;\n\n compileComponents(): Promise<any>;\n\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue?: any): any;\n\n execute(tokens: any[], fn: Function, context?: any): any;\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void;\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void;\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n */\n overrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): void;\n overrideProvider(token: any, provider: {useValue: any;}): void;\n overrideProvider(token: any, provider: {useFactory?: Function, useValue?: any, deps?: any[]}):\n void;\n\n overrideTemplateUsingTestingModule(component: Type<any>, template: string): void;\n\n createComponent<T>(component: Type<T>): ComponentFixture<T>;\n}\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * `TestBed` is the primary api for writing unit tests for Angular applications and libraries.\n *\n * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`\n * according to the compiler used.\n */\nexport class TestBedViewEngine implements TestBed {\n /**\n * Teardown options that have been configured at the environment level.\n * Used as a fallback if no instance-level options have been provided.\n */\n private static _environmentTeardownOptions: ModuleTeardownOptions|undefined;\n\n /**\n * Teardown options that have been configured at the `TestBed` instance level.\n * These options take precedence over the environemnt-level ones.\n */\n private _instanceTeardownOptions: ModuleTeardownOptions|undefined;\n\n /**\n * Initialize the environment for testing with a compiler factory, a PlatformRef, and an\n * angular module. These are common to every test in the suite.\n *\n * This may only be called once, to set up the common providers for the current test\n * suite on the current platform. If you absolutely need to change the providers,\n * first use `resetTestEnvironment`.\n *\n * Test modules and platforms for individual platforms are available from\n * '@angular/<platform_name>/testing'.\n */\n static initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n summariesOrOptions?: TestEnvironmentOptions|(() => any[])): TestBedViewEngine {\n const testBed = _getTestBedViewEngine();\n testBed.initTestEnvironment(ngModule, platform, summariesOrOptions);\n return testBed;\n }\n\n /**\n * Reset the providers for the test injector.\n */\n static resetTestEnvironment(): void {\n _getTestBedViewEngine().resetTestEnvironment();\n }\n\n static resetTestingModule(): TestBedStatic {\n _getTestBedViewEngine().resetTestingModule();\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n /**\n * Allows overriding default compiler providers and settings\n * which are defined in test_injector.js\n */\n static configureCompiler(config: {providers?: any[]; useJit?: boolean;}): TestBedStatic {\n _getTestBedViewEngine().configureCompiler(config);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n /**\n * Allows overriding default providers, directives, pipes, modules of the test injector,\n * which are defined in test_injector.js\n */\n static configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic {\n _getTestBedViewEngine().configureTestingModule(moduleDef);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n /**\n * Compile components with a `templateUrl` for the test's NgModule.\n * It is necessary to call this function\n * as fetching urls is asynchronous.\n */\n static compileComponents(): Promise<any> {\n return getTestBed().compileComponents();\n }\n\n static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic {\n _getTestBedViewEngine().overrideModule(ngModule, override);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n static overrideComponent(component: Type<any>, override: MetadataOverride<Component>):\n TestBedStatic {\n _getTestBedViewEngine().overrideComponent(component, override);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>):\n TestBedStatic {\n _getTestBedViewEngine().overrideDirective(directive, override);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic {\n _getTestBedViewEngine().overridePipe(pipe, override);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n static overrideTemplate(component: Type<any>, template: string): TestBedStatic {\n _getTestBedViewEngine().overrideComponent(component, {set: {template, templateUrl: null!}});\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n /**\n * Overrides the template of the given component, compiling the template\n * in the context of the TestingModule.\n *\n * Note: This works for JIT and AOTed components as well.\n */\n static overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic {\n _getTestBedViewEngine().overrideTemplateUsingTestingModule(component, template);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n *\n * Note: This works for JIT and AOTed components as well.\n */\n static overrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): TestBedStatic;\n static overrideProvider(token: any, provider: {useValue: any;}): TestBedStatic;\n static overrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): TestBedStatic {\n _getTestBedViewEngine().overrideProvider(token, provider as any);\n return TestBedViewEngine as any as TestBedStatic;\n }\n\n static inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n static inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n static inject<T>(token: ProviderToken<T>, notFoundValue?: T|null, flags?: InjectFlags): T|null {\n return _getTestBedViewEngine().inject(token, notFoundValue, flags);\n }\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /**\n * @deprecated from v9.0.0 use TestBed.inject\n * @suppress {duplicate}\n */\n static get(token: any, notFoundValue?: any): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n static get(\n token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n flags: InjectFlags = InjectFlags.Default): any {\n return _getTestBedViewEngine().inject(token, notFoundValue, flags);\n }\n\n static createComponent<T>(component: Type<T>): ComponentFixture<T> {\n return _getTestBedViewEngine().createComponent(component);\n }\n\n static shouldTearDownTestingModule(): boolean {\n return _getTestBedViewEngine().shouldTearDownTestingModule();\n }\n\n static tearDownTestingModule(): void {\n _getTestBedViewEngine().tearDownTestingModule();\n }\n\n private _instantiated: boolean = false;\n\n private _compiler: TestingCompiler = null!;\n private _moduleRef: NgModuleRef<any>|null = null;\n private _moduleFactory: NgModuleFactory<any>|null = null;\n private _pendingModuleFactory: Type<unknown>|null = null;\n\n private _compilerOptions: CompilerOptions[] = [];\n\n private _moduleOverrides: [Type<any>, MetadataOverride<NgModule>][] = [];\n private _componentOverrides: [Type<any>, MetadataOverride<Component>][] = [];\n private _directiveOverrides: [Type<any>, MetadataOverride<Directive>][] = [];\n private _pipeOverrides: [Type<any>, MetadataOverride<Pipe>][] = [];\n\n private _providers: Provider[] = [];\n private _declarations: Array<Type<any>|any[]|any> = [];\n private _imports: Array<Type<any>|any[]|any> = [];\n private _schemas: Array<SchemaMetadata|any[]> = [];\n private _activeFixtures: ComponentFixture<any>[] = [];\n\n private _testEnvAotSummaries: () => any[] = () => [];\n private _aotSummaries: Array<() => any[]> = [];\n private _templateOverrides: Array<{component: Type<any>, templateOf: Type<any>}> = [];\n\n private _isRoot: boolean = true;\n private _rootProviderOverrides: Provider[] = [];\n\n platform: PlatformRef = null!;\n\n ngModule: Type<any>|Type<any>[] = 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 initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef,\n summariesOrOptions?: TestEnvironmentOptions|(() => any[])): void {\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 (typeof summariesOrOptions === 'function') {\n this._testEnvAotSummaries = summariesOrOptions;\n TestBedViewEngine._environmentTeardownOptions = undefined;\n } else {\n this._testEnvAotSummaries = (summariesOrOptions?.aotSummaries) || (() => []);\n TestBedViewEngine._environmentTeardownOptions = summariesOrOptions?.teardown;\n }\n }\n\n /**\n * Reset the providers for the test injector.\n */\n resetTestEnvironment(): void {\n this.resetTestingModule();\n this.platform = null!;\n this.ngModule = null!;\n this._testEnvAotSummaries = () => [];\n TestBedViewEngine._environmentTeardownOptions = undefined;\n }\n\n resetTestingModule(): void {\n clearOverrides();\n this._aotSummaries = [];\n this._templateOverrides = [];\n this._compiler = null!;\n this._moduleOverrides = [];\n this._componentOverrides = [];\n this._directiveOverrides = [];\n this._pipeOverrides = [];\n\n this._isRoot = true;\n this._rootProviderOverrides = [];\n\n this._moduleFactory = null;\n this._pendingModuleFactory = null;\n this._compilerOptions = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n\n // We have to chain a couple of try/finally blocks, because each step can\n // throw errors and we don't want it to interrupt the next step and we also\n // want an error to be thrown at the end.\n try {\n this.destroyActiveFixtures();\n } finally {\n try {\n if (this.shouldTearDownTestingModule()) {\n this.tearDownTestingModule();\n }\n } finally {\n this._moduleRef = null;\n this._instanceTeardownOptions = undefined;\n this._instantiated = false;\n }\n }\n }\n\n configureCompiler(config: {providers?: any[], useJit?: boolean}): void {\n this._assertNotInstantiated('TestBed.configureCompiler', 'configure the compiler');\n this._compilerOptions.push(config);\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata): void {\n this._assertNotInstantiated('TestBed.configureTestingModule', 'configure the test module');\n if (moduleDef.providers) {\n this._providers.push(...moduleDef.providers);\n }\n if (moduleDef.declarations) {\n this._declarations.push(...moduleDef.declarations);\n }\n if (moduleDef.imports) {\n this._imports.push(...moduleDef.imports);\n }\n if (moduleDef.schemas) {\n this._schemas.push(...moduleDef.schemas);\n }\n if (moduleDef.aotSummaries) {\n this._aotSummaries.push(moduleDef.aotSummaries);\n }\n // Always re-assign the teardown options, even if they're undefined.\n // This ensures that we don't carry the options between tests.\n this._instanceTeardownOptions = moduleDef.teardown;\n }\n\n compileComponents(): Promise<any> {\n if (this._moduleFactory || this._instantiated) {\n return Promise.resolve(null);\n }\n\n const moduleType = this._createCompilerAndModule();\n this._pendingModuleFactory = moduleType;\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType).then(result => {\n // If the module mismatches by the time the promise resolves, it means that the module has\n // already been destroyed and a new compilation has started. If that's the case, avoid\n // overwriting the module factory, because it can cause downstream errors.\n if (this._pendingModuleFactory === moduleType) {\n this._moduleFactory = result.ngModuleFactory;\n this._pendingModuleFactory = null;\n }\n });\n }\n\n private _initIfNeeded(): void {\n if (this._instantiated) {\n return;\n }\n if (!this._moduleFactory) {\n try {\n const moduleType = this._createCompilerAndModule();\n this._moduleFactory =\n this._compiler.compileModuleAndAllComponentsSync(moduleType).ngModuleFactory;\n } catch (e) {\n const errorCompType = this._compiler.getComponentFromError(e);\n if (errorCompType) {\n throw new Error(\n `This test module uses the component ${\n stringify(\n errorCompType)} which is using a \"templateUrl\" or \"styleUrls\", but they were never compiled. ` +\n `Please call \"TestBed.compileComponents\" before your test.`);\n } else {\n throw e;\n }\n }\n }\n for (const {component, templateOf} of this._templateOverrides) {\n const compFactory = this._compiler.getComponentFactory(templateOf);\n overrideComponentView(component, compFactory);\n }\n\n const ngZone =\n new NgZone({enableLongStackTrace: true, shouldCoalesceEventChangeDetection: false});\n const providers: StaticProvider[] = [{provide: NgZone, useValue: ngZone}];\n const ngZoneInjector = 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(ApplicationInitStatus) as any).runInitializers();\n this._instantiated = true;\n }\n\n private _createCompilerAndModule(): Type<any> {\n const providers = this._providers.concat([{provide: TestBed, useValue: this}]);\n const declarations =\n [...this._declarations, ...this._templateOverrides.map(entry => entry.templateOf)];\n\n const rootScopeImports = [];\n const rootProviderOverrides = this._rootProviderOverrides;\n if (this._isRoot) {\n @NgModule({\n providers: [\n ...rootProviderOverrides,\n ],\n jit: true,\n })\n class RootScopeModule {\n }\n rootScopeImports.push(RootScopeModule);\n }\n providers.push({provide: INJECTOR_SCOPE, useValue: this._isRoot ? 'root' : null});\n\n const imports = [rootScopeImports, this.ngModule, this._imports];\n const schemas = this._schemas;\n\n @NgModule({providers, declarations, imports, schemas, jit: true})\n class DynamicTestModule {\n }\n\n const compilerFactory = this.platform.injector.get(TestingCompilerFactory);\n this._compiler = compilerFactory.createTestingCompiler(this._compilerOptions);\n for (const summary of [this._testEnvAotSummaries, ...this._aotSummaries]) {\n this._compiler.loadAotSummaries(summary);\n }\n this._moduleOverrides.forEach((entry) => this._compiler.overrideModule(entry[0], entry[1]));\n this._componentOverrides.forEach(\n (entry) => this._compiler.overrideComponent(entry[0], entry[1]));\n this._directiveOverrides.forEach(\n (entry) => this._compiler.overrideDirective(entry[0], entry[1]));\n this._pipeOverrides.forEach((entry) => this._compiler.overridePipe(entry[0], entry[1]));\n return DynamicTestModule;\n }\n\n private _assertNotInstantiated(methodName: string, methodDescription: string) {\n if (this._instantiated) {\n throw new Error(\n `Cannot ${methodDescription} when the test module has already been instantiated. ` +\n `Make sure you are not using \\`inject\\` before \\`${methodName}\\`.`);\n }\n }\n\n inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T|null;\n inject<T>(token: ProviderToken<T>, notFoundValue?: T|null, flags?: InjectFlags): T|null {\n this._initIfNeeded();\n if (token as unknown === TestBed) {\n return this as any;\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 const UNDEFINED = {};\n const result = this._moduleRef!.injector.get(token, UNDEFINED, flags);\n return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue, flags) as any :\n result;\n }\n\n /** @deprecated from v9.0.0 use TestBed.inject */\n get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue?: any): any;\n /** @deprecated from v9.0.0 use TestBed.inject */\n get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND,\n flags: InjectFlags = InjectFlags.Default): any {\n return this.inject(token, notFoundValue, flags);\n }\n\n execute(tokens: any[], fn: Function, context?: any): any {\n this._initIfNeeded();\n const params = tokens.map(t => this.inject(t));\n return fn.apply(context, params);\n }\n\n overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void {\n this._assertNotInstantiated('overrideModule', 'override module metadata');\n this._moduleOverrides.push([ngModule, override]);\n }\n\n overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void {\n this._assertNotInstantiated('overrideComponent', 'override component metadata');\n this._componentOverrides.push([component, override]);\n }\n\n overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void {\n this._assertNotInstantiated('overrideDirective', 'override directive metadata');\n this._directiveOverrides.push([directive, override]);\n }\n\n overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void {\n this._assertNotInstantiated('overridePipe', 'override pipe metadata');\n this._pipeOverrides.push([pipe, override]);\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n */\n overrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): void;\n overrideProvider(token: any, provider: {useValue: any;}): void;\n overrideProvider(token: any, provider: {useFactory?: Function, useValue?: any, deps?: any[]}):\n void {\n this._assertNotInstantiated('overrideProvider', 'override provider');\n this.overrideProviderImpl(token, provider);\n }\n\n private overrideProviderImpl(\n token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n },\n deprecated = false): void {\n let def: ɵɵInjectableDeclaration<any>|null = null;\n if (typeof token !== 'string' && (def = getInjectableDef(token)) && def.providedIn === 'root') {\n if (provider.useFactory) {\n this._rootProviderOverrides.push(\n {provide: token, useFactory: provider.useFactory, deps: provider.deps || []});\n } else {\n this._rootProviderOverrides.push({provide: token, useValue: provider.useValue});\n }\n }\n let flags: NodeFlags = 0;\n let value: any;\n if (provider.useFactory) {\n flags |= NodeFlags.TypeFactoryProvider;\n value = provider.useFactory;\n } else {\n flags |= NodeFlags.TypeValueProvider;\n value = provider.useValue;\n }\n const deps = (provider.deps || []).map((dep) => {\n let depFlags: DepFlags = DepFlags.None;\n let depToken: any;\n if (Array.isArray(dep)) {\n dep.forEach((entry: any) => {\n if (entry instanceof Optional) {\n depFlags |= DepFlags.Optional;\n } else if (entry instanceof SkipSelf) {\n depFlags |= DepFlags.SkipSelf;\n } else {\n depToken = entry;\n }\n });\n } else {\n depToken = dep;\n }\n return [depFlags, depToken];\n });\n overrideProvider({token, flags, deps, value, deprecatedBehavior: deprecated});\n }\n\n overrideTemplateUsingTestingModule(component: Type<any>, template: string) {\n this._assertNotInstantiated('overrideTemplateUsingTestingModule', 'override template');\n\n @Component({selector: 'empty', template, jit: true})\n class OverrideComponent {\n }\n\n this._templateOverrides.push({component, templateOf: OverrideComponent});\n }\n\n createComponent<T>(component: Type<T>): ComponentFixture<T> {\n this._initIfNeeded();\n const componentFactory = this._compiler.getComponentFactory(component);\n\n if (!componentFactory) {\n throw new Error(`Cannot create the component ${\n stringify(component)} as it was not imported into the testing module!`);\n }\n\n // TODO: Don't cast as `InjectionToken<boolean>`, declared type is boolean[]\n const noNgZone = this.inject(ComponentFixtureNoNgZone as InjectionToken<boolean>, false);\n // TODO: Don't cast as `InjectionToken<boolean>`, declared type is boolean[]\n const autoDetect: boolean =\n this.inject(ComponentFixtureAutoDetect as InjectionToken<boolean>, false);\n const ngZone: NgZone|null = noNgZone ? null : this.inject(NgZone, null);\n const testComponentRenderer: TestComponentRenderer = this.inject(TestComponentRenderer);\n const rootElId = `root${_nextRootElementId++}`;\n testComponentRenderer.insertRootElement(rootElId);\n\n const initComponent = () => {\n const componentRef =\n componentFactory.create(Injector.NULL, [], `#${rootElId}`, this._moduleRef!);\n return new ComponentFixture<T>(componentRef, ngZone, autoDetect);\n };\n\n const fixture = !ngZone ? initComponent() : ngZone.run(initComponent);\n this._activeFixtures.push(fixture);\n return fixture;\n }\n\n private destroyActiveFixtures(): void {\n let errorCount = 0;\n this._activeFixtures.forEach((fixture) => {\n try {\n fixture.destroy();\n } catch (e) {\n errorCount++;\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n\n if (errorCount > 0 && this.shouldRethrowTeardownErrors()) {\n throw Error(\n `${errorCount} ${(errorCount === 1 ? 'component' : 'components')} ` +\n `threw errors during cleanup`);\n }\n }\n\n private shouldRethrowTeardownErrors() {\n const instanceOptions = this._instanceTeardownOptions;\n const environmentOptions = TestBedViewEngine._environmentTeardownOptions;\n\n // If the new teardown behavior hasn't been configured, preserve the old behavior.\n if (!instanceOptions && !environmentOptions) {\n return false;\n }\n\n // Otherwise use the configured behavior or default to rethrowing.\n return instanceOptions?.rethrowErrors ?? environmentOptions?.rethrowErrors ?? true;\n }\n\n shouldTearDownTestingModule(): boolean {\n return this._instanceTeardownOptions?.destroyAfterEach ??\n TestBedViewEngine._environmentTeardownOptions?.destroyAfterEach ??\n TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;\n }\n\n tearDownTestingModule() {\n // If the module ref has already been destroyed, we won't be able to get a test renderer.\n if (this._moduleRef === null) {\n return;\n }\n\n // Resolve the renderer ahead of time, because we want to remove the root elements as the very\n // last step, but the injector will be destroyed as a part of the module ref destruction.\n const testRenderer = this.inject(TestComponentRenderer);\n try {\n this._moduleRef.destroy();\n } catch (e) {\n if (this._instanceTeardownOptions?.rethrowErrors ??\n TestBedViewEngine._environmentTeardownOptions?.rethrowErrors ?? true) {\n throw e;\n } else {\n console.error('Error during cleanup of a testing module', {\n component: this._moduleRef.instance,\n stacktrace: e,\n });\n }\n } finally {\n testRenderer?.removeAllRootElements?.();\n }\n }\n}\n\n/**\n * @description\n * Configures and initializes environment for unit testing and provides methods for\n * creating components and services in unit tests.\n *\n * `TestBed` is the primary api for writing unit tests for Angular applications and libraries.\n *\n * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`\n * according to the compiler used.\n *\n * @publicApi\n */\nexport const TestBed: TestBedStatic =\n ivyEnabled ? TestBedRender3 as any as TestBedStatic : TestBedViewEngine as any as TestBedStatic;\n\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 */\nexport const getTestBed: () => TestBed = ivyEnabled ? _getTestBedRender3 : _getTestBedViewEngine;\n\nlet testBed: TestBedViewEngine;\n\nfunction _getTestBedViewEngine(): TestBedViewEngine {\n return testBed = testBed || new TestBedViewEngine();\n}\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 * @publicApi\n */\nexport function inject(tokens: any[], fn: Function): () => any {\n const testBed = getTestBed();\n // Not using an arrow function to preserve context passed from call site\n return function(this: unknown) {\n return testBed.execute(tokens, fn, this);\n };\n}\n\n/**\n * @publicApi\n */\nexport class InjectSetupWrapper {\n constructor(private _moduleDef: () => TestModuleMetadata) {}\n\n private _addModule() {\n const moduleDef = this._moduleDef();\n if (moduleDef) {\n getTestBed().configureTestingModule(moduleDef);\n }\n }\n\n inject(tokens: any[], fn: Function): () => any {\n const self = this;\n // Not using an arrow function to preserve context passed from call site\n return function(this: unknown) {\n self._addModule();\n return inject(tokens, fn).call(this);\n };\n }\n}\n\n/**\n * @publicApi\n */\nexport function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;\nexport function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;\nexport function withModule(moduleDef: TestModuleMetadata, fn?: Function|null): (() => any)|\n InjectSetupWrapper {\n if (fn) {\n // Not using an arrow function to preserve context passed from call site\n return function(this: unknown) {\n const testBed = getTestBed();\n if (moduleDef) {\n testBed.configureTestingModule(moduleDef);\n }\n return fn.apply(this);\n };\n }\n return new InjectSetupWrapper(() => moduleDef);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Public Test Library for unit testing Angular applications. Assumes that you are running\n * with Jasmine, Mocha, or a similar framework which exports a beforeEach function and\n * allows tests to be asynchronous by either returning a promise or using a 'done' parameter.\n */\n\nimport {resetFakeAsyncZone} from './fake_async';\nimport {TestBed, TestBedViewEngine as TestBedInternal} from './test_bed';\n\ndeclare var global: any;\n\nconst _global = <any>(typeof window === 'undefined' ? global : window);\n\n// Reset the test providers and the fake async zone before each test.\nif (_global.beforeEach) {\n _global.beforeEach(getCleanupHook(false));\n}\n\n// We provide both a `beforeEach` and `afterEach`, because the updated behavior for\n// tearing down the module is supposed to run after the test so that we can associate\n// teardown errors with the correct test.\nif (_global.afterEach) {\n _global.afterEach(getCleanupHook(true));\n}\n\nfunction getCleanupHook(expectedTeardownValue: boolean) {\n return () => {\n if ((TestBed as unknown as TestBedInternal).shouldTearDownTestingModule() ===\n expectedTeardownValue) {\n TestBed.resetTestingModule();\n resetFakeAsyncZone();\n }\n };\n}\n\n/**\n * This API should be removed. But doing so seems to break `google3` and so it requires a bit of\n * investigation.\n *\n * A work around is to mark it as `@codeGenApi` for now and investigate later.\n *\n * @codeGenApi\n */\n// TODO(iminar): Remove this code in a safe way.\nexport const __core_private_testing_placeholder__ = '';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {TestingCompiler as ɵTestingCompiler, TestingCompilerFactory as ɵTestingCompilerFactory} from './test_compiler';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the core/testing package.\n */\n\nexport * from './async';\nexport * from './component_fixture';\nexport * from './fake_async';\nexport {TestBed, getTestBed, inject, InjectSetupWrapper, withModule} from './test_bed';\nexport {TestComponentRenderer, ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, TestModuleMetadata, TestEnvironmentOptions, ModuleTeardownOptions, TestBedStatic} from './test_bed_common';\nexport * from './test_hooks';\nexport * from './metadata_override';\nexport {MetadataOverrider as ɵMetadataOverrider} from './metadata_overrider';\nexport * from './private_export_testing';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <reference types=\"jasmine\" />\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {TestBedRender3 as ɵangular_packages_core_testing_testing_b,_getTestBedRender3 as ɵangular_packages_core_testing_testing_c} from './src/r3_test_bed';\nexport {TestBedViewEngine as ɵangular_packages_core_testing_testing_a} from './src/test_bed';"],"names":["getDebugNode","RendererFactory2","stringify","ReflectionCapabilities","Directive","Component","Pipe","NgModule","getInjectableDef","resolveForwardRef","NG_COMP_DEF","ResourceLoader","NgModuleRef","ApplicationInitStatus","LOCALE_ID","DEFAULT_LOCALE_ID","setLocaleId","ComponentFactory","compileComponent","NG_DIR_DEF","compileDirective","NG_PIPE_DEF","compilePipe","NG_MOD_DEF","transitiveScopesFor","patchComponentDefWithScope","NG_INJ_DEF","compileNgModuleDefs","NgZone","Compiler","COMPILER_OPTIONS","R3NgModuleFactory","ModuleWithComponentFactories","InjectionToken","Injector","InjectFlags","resetCompiledComponents","flushModuleScopingQueueAsMuchAsPossible","Injectable","_nextRootElementId","clearOverrides","overrideComponentView","INJECTOR_SCOPE","Optional","SkipSelf","overrideProvider","ivyEnabled","testBed"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;IAOA;;;;;;;;;;;;;;;;;aAiBgB,YAAY,CAAC,EAAY;QACvC,IAAM,KAAK,GAAQ,OAAO,IAAI,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;QAC7D,IAAI,CAAC,KAAK,EAAE;YACV,OAAO;gBACL,OAAO,OAAO,CAAC,MAAM,CACjB,4EAA4E;oBAC5E,yDAAyD,CAAC,CAAC;aAChE,CAAC;SACH;QACD,IAAM,SAAS,GAAG,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;QAChE,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;YACnC,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC;SACtB;QACD,OAAO;YACL,OAAO,OAAO,CAAC,MAAM,CACjB,gFAAgF;gBAChF,iEAAiE,CAAC,CAAC;SACxE,CAAC;IACJ,CAAC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