@angular/core 6.1.6 → 6.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/bundles/core-testing.umd.js +23 -16
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +6 -6
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +166 -139
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +81 -81
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/index.js +2 -2
  11. package/esm2015/public_api.js +2 -2
  12. package/esm2015/src/application_module.js +11 -4
  13. package/esm2015/src/change_detection/change_detector_ref.js +2 -2
  14. package/esm2015/src/core.js +2 -2
  15. package/esm2015/src/di/injection_token.js +3 -3
  16. package/esm2015/src/di/reflective_injector.js +1 -10
  17. package/esm2015/src/linker/component_factory.js +19 -16
  18. package/esm2015/src/linker/template_ref.js +20 -14
  19. package/esm2015/src/linker/view_container_ref.js +61 -68
  20. package/esm2015/src/linker/view_ref.js +29 -21
  21. package/esm2015/src/metadata/view.js +1 -4
  22. package/esm2015/src/render3/instructions.js +2 -2
  23. package/esm2015/src/render3/ng_dev_mode.js +52 -31
  24. package/esm2015/src/version.js +1 -1
  25. package/esm2015/src/zone.js +2 -2
  26. package/esm5/src/application_init.js +7 -8
  27. package/esm5/src/application_module.js +16 -10
  28. package/esm5/src/application_ref.js +15 -21
  29. package/esm5/src/change_detection/change_detector_ref.js +2 -2
  30. package/esm5/src/console.js +5 -4
  31. package/esm5/src/di/injection_token.js +3 -3
  32. package/esm5/src/di/reflective_injector.js +1 -1
  33. package/esm5/src/linker/compiler.js +5 -4
  34. package/esm5/src/linker/component_factory.js +4 -6
  35. package/esm5/src/linker/system_js_ng_module_factory_loader.js +6 -9
  36. package/esm5/src/linker/template_ref.js +13 -8
  37. package/esm5/src/linker/view_container_ref.js +9 -13
  38. package/esm5/src/linker/view_ref.js +22 -18
  39. package/esm5/src/metadata/view.js +4 -4
  40. package/esm5/src/render3/instructions.js +2 -2
  41. package/esm5/src/render3/ng_dev_mode.js +48 -27
  42. package/esm5/src/testability/testability.js +10 -13
  43. package/esm5/src/version.js +1 -1
  44. package/esm5/src/zone.js +2 -2
  45. package/esm5/testing/src/logger.js +6 -6
  46. package/esm5/testing/src/ng_zone_mock.js +5 -6
  47. package/esm5/testing/src/test_bed.js +13 -13
  48. package/esm5/testing/src/test_compiler.js +4 -4
  49. package/fesm2015/core.js +110 -84
  50. package/fesm2015/core.js.map +1 -1
  51. package/fesm2015/testing.js +1 -1
  52. package/fesm5/core.js +155 -141
  53. package/fesm5/core.js.map +1 -1
  54. package/fesm5/testing.js +17 -17
  55. package/fesm5/testing.js.map +1 -1
  56. package/package.json +1 -1
  57. package/src/application_module.d.ts +10 -2
  58. package/src/change_detection/change_detector_ref.d.ts +1 -1
  59. package/src/di/injection_token.d.ts +2 -2
  60. package/src/di/reflective_injector.d.ts +0 -9
  61. package/src/linker/component_factory.d.ts +22 -14
  62. package/src/linker/template_ref.d.ts +21 -11
  63. package/src/linker/view_container_ref.d.ts +61 -44
  64. package/src/linker/view_ref.d.ts +38 -18
  65. package/src/metadata/view.d.ts +3 -3
  66. package/src/render3/ng_dev_mode.d.ts +1 -1
  67. package/src/zone.d.ts +1 -1
package/fesm5/testing.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v6.1.6
2
+ * @license Angular v6.1.10
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import { RendererFactory2, getDebugNode, Compiler, Injectable, ApplicationInitStatus, Component, InjectionToken, Injector, NgModule, NgZone, Optional, SkipSelf, ɵAPP_ROOT, ɵclearOverrides, ɵoverrideComponentView, ɵoverrideProvider, ɵstringify } from '@angular/core';
8
- import { __spread, __values, __extends } from 'tslib';
8
+ import { __extends, __decorate, __spread, __values } from 'tslib';
9
9
 
10
10
  /**
11
11
  * @license
@@ -675,9 +675,9 @@ var TestingCompiler = /** @class */ (function (_super) {
675
675
  * This can be used for errors created by compileModule...
676
676
  */
677
677
  TestingCompiler.prototype.getComponentFromError = function (error) { throw unimplemented(); };
678
- TestingCompiler.decorators = [
679
- { type: Injectable }
680
- ];
678
+ TestingCompiler = __decorate([
679
+ Injectable()
680
+ ], TestingCompiler);
681
681
  return TestingCompiler;
682
682
  }(Compiler));
683
683
  /**
@@ -1007,12 +1007,12 @@ var TestBed = /** @class */ (function () {
1007
1007
  var RootScopeModule = /** @class */ (function () {
1008
1008
  function RootScopeModule() {
1009
1009
  }
1010
- RootScopeModule.decorators = [
1011
- { type: NgModule, args: [{
1012
- providers: __spread(rootProviderOverrides),
1013
- jit: true,
1014
- },] },
1015
- ];
1010
+ RootScopeModule = __decorate([
1011
+ NgModule({
1012
+ providers: __spread(rootProviderOverrides),
1013
+ jit: true,
1014
+ })
1015
+ ], RootScopeModule);
1016
1016
  return RootScopeModule;
1017
1017
  }());
1018
1018
  rootScopeImports.push(RootScopeModule);
@@ -1023,9 +1023,9 @@ var TestBed = /** @class */ (function () {
1023
1023
  var DynamicTestModule = /** @class */ (function () {
1024
1024
  function DynamicTestModule() {
1025
1025
  }
1026
- DynamicTestModule.decorators = [
1027
- { type: NgModule, args: [{ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true },] },
1028
- ];
1026
+ DynamicTestModule = __decorate([
1027
+ NgModule({ providers: providers, declarations: declarations, imports: imports, schemas: schemas, jit: true })
1028
+ ], DynamicTestModule);
1029
1029
  return DynamicTestModule;
1030
1030
  }());
1031
1031
  var compilerFactory = this.platform.injector.get(TestingCompilerFactory);
@@ -1143,9 +1143,9 @@ var TestBed = /** @class */ (function () {
1143
1143
  var OverrideComponent = /** @class */ (function () {
1144
1144
  function OverrideComponent() {
1145
1145
  }
1146
- OverrideComponent.decorators = [
1147
- { type: Component, args: [{ selector: 'empty', template: template, jit: true },] },
1148
- ];
1146
+ OverrideComponent = __decorate([
1147
+ Component({ selector: 'empty', template: template, jit: true })
1148
+ ], OverrideComponent);
1149
1149
  return OverrideComponent;
1150
1150
  }());
1151
1151
  this._templateOverrides.push({ component: component, templateOf: OverrideComponent });
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sources":["../../../../../../packages/core/testing/src/async_fallback.ts","../../../../../../packages/core/testing/src/async.ts","../../../../../../packages/core/testing/src/component_fixture.ts","../../../../../../packages/core/testing/src/fake_async_fallback.ts","../../../../../../packages/core/testing/src/fake_async.ts","../../../../../../packages/core/testing/src/async_test_completer.ts","../../../../../../packages/core/testing/src/test_compiler.ts","../../../../../../packages/core/testing/src/test_bed.ts","../../../../../../packages/core/testing/src/before_each.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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * async has been moved to zone.js\n * this file is for fallback in case old version of zone.js is used\n */\ndeclare var global: any;\n\nconst _global = <any>(typeof window === 'undefined' ? global : window);\n\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n *\n */\nexport function asyncFallback(fn: Function): (done: any) => any {\n // If we're running using the Jasmine test framework, adapt to call the 'done'\n // function when asynchronous activity is finished.\n if (_global.jasmine) {\n // Not using an arrow function to preserve context passed from call site\n return function(done: any) {\n if (!done) {\n // if we run beforeEach in @angular/core/testing/testing_internal then we get no done\n // fake it here and assume sync.\n done = function() {};\n done.fail = function(e: any) { throw e; };\n }\n runInTestZone(fn, this, done, (err: any) => {\n if (typeof err === 'string') {\n return done.fail(new Error(<string>err));\n } else {\n done.fail(err);\n }\n });\n };\n }\n // Otherwise, return a promise which will resolve when asynchronous activity\n // is finished. This will be correctly consumed by the Mocha framework with\n // it('...', async(myFn)); or can be used in a custom framework.\n // Not using an arrow function to preserve context passed from call site\n return function() {\n return new Promise<void>((finishCallback, failCallback) => {\n runInTestZone(fn, this, finishCallback, failCallback);\n });\n };\n}\n\nfunction runInTestZone(\n fn: Function, context: any, finishCallback: Function, failCallback: Function) {\n const currentZone = Zone.current;\n const AsyncTestZoneSpec = (Zone as any)['AsyncTestZoneSpec'];\n if (AsyncTestZoneSpec === undefined) {\n throw new Error(\n 'AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/async-test.js');\n }\n const ProxyZoneSpec = (Zone as any)['ProxyZoneSpec'] as {\n get(): {setDelegate(spec: ZoneSpec): void; getDelegate(): ZoneSpec;};\n assertPresent: () => void;\n };\n if (ProxyZoneSpec === undefined) {\n throw new Error(\n 'ProxyZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/proxy.js');\n }\n const proxyZoneSpec = ProxyZoneSpec.get();\n ProxyZoneSpec.assertPresent();\n // We need to create the AsyncTestZoneSpec outside the ProxyZone.\n // If we do it in ProxyZone then we will get to infinite recursion.\n const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');\n const previousDelegate = proxyZoneSpec.getDelegate();\n proxyZone.parent.run(() => {\n const testZoneSpec: ZoneSpec = new AsyncTestZoneSpec(\n () => {\n // Need to restore the original zone.\n currentZone.run(() => {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n finishCallback();\n });\n },\n (error: any) => {\n // Need to restore the original zone.\n currentZone.run(() => {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n failCallback(error);\n });\n },\n 'test');\n proxyZoneSpec.setDelegate(testZoneSpec);\n });\n return Zone.current.runGuarded(fn, context);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {asyncFallback} from './async_fallback';\n\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n *\n */\nexport function async(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 async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone.js');\n };\n }\n const asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n // not using new version of zone.js\n // TODO @JiaLiPassion, remove this after all library updated to\n // newest version of zone.js(0.8.25)\n return asyncFallback(fn);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone, RendererFactory2, getDebugNode} from '@angular/core';\n\n\n/**\n * Fixture for debugging and testing a component.\n *\n *\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 =\n ngZone.onUnstable.subscribe({next: () => { this._isStable = false; }});\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 =\n ngZone.onError.subscribe({next: (error: any) => { throw error; }});\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(() => { this._tick(checkNoChanges); });\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 { this.changeDetectorRef.checkNoChanges(); }\n\n /**\n * Set whether the fixture should autodetect changes.\n *\n * Also runs detectChanges once so that any existing change is detected.\n */\n 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 { return this._isStable && !this.ngZone !.hasPendingMacrotasks; }\n\n /**\n * Get a promise that resolves when the fixture is stable.\n *\n * This can be used to resume testing after events have triggered asynchronous activity or\n * asynchronous change detection.\n */\n 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 => { this._resolve = res; });\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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * fakeAsync has been moved to zone.js\n * this file is for fallback in case old version of zone.js is used\n */\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst FakeAsyncTestZoneSpec = _Zone && _Zone['FakeAsyncTestZoneSpec'];\ntype ProxyZoneSpec = {\n setDelegate(delegateSpec: ZoneSpec): void; getDelegate(): ZoneSpec; resetDelegate(): void;\n};\nconst ProxyZoneSpec: {get(): ProxyZoneSpec; assertPresent: () => ProxyZoneSpec} =\n _Zone && _Zone['ProxyZoneSpec'];\n\nlet _fakeAsyncTestZoneSpec: any = null;\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @experimental\n */\nexport function resetFakeAsyncZoneFallback() {\n _fakeAsyncTestZoneSpec = null;\n // in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.\n ProxyZoneSpec && ProxyZoneSpec.assertPresent().resetDelegate();\n}\n\nlet _inFakeAsyncCall = false;\n\n/**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception will be thrown.\n *\n * Can be used to wrap inject() calls.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns The function wrapped to be executed in the fakeAsync zone\n *\n * @experimental\n */\nexport function fakeAsyncFallback(fn: Function): (...args: any[]) => any {\n // Not using an arrow function to preserve context passed from call site\n return function(...args: any[]) {\n const proxyZoneSpec = ProxyZoneSpec.assertPresent();\n if (_inFakeAsyncCall) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _inFakeAsyncCall = true;\n try {\n if (!_fakeAsyncTestZoneSpec) {\n if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n\n _fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();\n }\n\n let res: any;\n const lastProxyZoneSpec = proxyZoneSpec.getDelegate();\n proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);\n try {\n res = fn.apply(this, args);\n flushMicrotasksFallback();\n } finally {\n proxyZoneSpec.setDelegate(lastProxyZoneSpec);\n }\n\n if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {\n throw new Error(\n `${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +\n `periodic timer(s) still in the queue.`);\n }\n\n if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {\n throw new Error(\n `${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);\n }\n return res;\n } finally {\n _inFakeAsyncCall = false;\n resetFakeAsyncZoneFallback();\n }\n };\n}\n\nfunction _getFakeAsyncZoneSpec(): any {\n if (_fakeAsyncTestZoneSpec == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n return _fakeAsyncTestZoneSpec;\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @experimental\n */\nexport function tickFallback(millis: number = 0): void {\n _getFakeAsyncZoneSpec().tick(millis);\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by\n * draining the macrotask queue until it is empty. The returned value is the milliseconds\n * of time that would have been elapsed.\n *\n * @param maxTurns\n * @returns The simulated time elapsed, in millis.\n *\n * @experimental\n */\nexport function flushFallback(maxTurns?: number): number {\n return _getFakeAsyncZoneSpec().flush(maxTurns);\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @experimental\n */\nexport function discardPeriodicTasksFallback(): void {\n const zoneSpec = _getFakeAsyncZoneSpec();\n zoneSpec.pendingPeriodicTimers.length = 0;\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @experimental\n */\nexport function flushMicrotasksFallback(): void {\n _getFakeAsyncZoneSpec().flushMicrotasks();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {discardPeriodicTasksFallback, fakeAsyncFallback, flushFallback, flushMicrotasksFallback, resetFakeAsyncZoneFallback, tickFallback} from './fake_async_fallback';\n\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @experimental\n */\nexport function resetFakeAsyncZone(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.resetFakeAsyncZone();\n } else {\n return resetFakeAsyncZoneFallback();\n }\n}\n\n/**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception will be thrown.\n *\n * Can be used to wrap inject() calls.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns The function wrapped to be executed in the fakeAsync zone\n *\n * @experimental\n */\nexport function fakeAsync(fn: Function): (...args: any[]) => any {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.fakeAsync(fn);\n } else {\n return fakeAsyncFallback(fn);\n }\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @experimental\n */\nexport function tick(millis: number = 0): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis);\n } else {\n return tickFallback(millis);\n }\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by\n * draining the macrotask queue until it is empty. The returned value is the milliseconds\n * of time that would have been elapsed.\n *\n * @param maxTurns\n * @returns The simulated time elapsed, in millis.\n *\n * @experimental\n */\nexport function flush(maxTurns?: number): number {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flush(maxTurns);\n } else {\n return flushFallback(maxTurns);\n }\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @experimental\n */\nexport function discardPeriodicTasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n } else {\n discardPeriodicTasksFallback();\n }\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @experimental\n */\nexport function flushMicrotasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n } else {\n return flushMicrotasksFallback();\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Injectable completer that allows signaling completion of an asynchronous test. Used internally.\n */\nexport class AsyncTestCompleter {\n // TODO(issue/24571): remove '!'.\n private _resolve !: (result: any) => void;\n // TODO(issue/24571): remove '!'.\n private _reject !: (err: any) => void;\n private _promise: Promise<any> = new Promise((res, rej) => {\n this._resolve = res;\n this._reject = rej;\n });\n done(value?: any) { this._resolve(value); }\n\n fail(error?: any, stackTrace?: string) { this._reject(error); }\n\n get promise(): Promise<any> { return this._promise; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 * @experimental\n */\n@Injectable()\nexport class TestingCompiler extends Compiler {\n get injector(): Injector { throw unimplemented(); }\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[]) { throw unimplemented(); }\n\n /**\n * Gets the component factory for the given component.\n * This assumes that the component has been compiled before calling this call using\n * `compileModuleAndAllComponents*`.\n */\n getComponentFactory<T>(component: Type<T>): ComponentFactory<T> { throw unimplemented(); }\n\n /**\n * Returns the component type that is stored in the given error.\n * This can be used for errors created by compileModule...\n */\n getComponentFromError(error: Error): Type<any>|null { throw unimplemented(); }\n}\n\n/**\n * A factory for creating a Compiler\n *\n * @experimental\n */\nexport abstract class TestingCompilerFactory {\n abstract createTestingCompiler(options?: CompilerOptions[]): TestingCompiler;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationInitStatus, CompilerOptions, Component, Directive, InjectionToken, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgModuleRef, NgZone, Optional, Pipe, PlatformRef, Provider, SchemaMetadata, SkipSelf, StaticProvider, Type, ɵAPP_ROOT as APP_ROOT, ɵDepFlags as DepFlags, ɵNodeFlags as NodeFlags, ɵclearOverrides as clearOverrides, ɵgetComponentViewDefinitionFactory as getComponentViewDefinitionFactory, ɵoverrideComponentView as overrideComponentView, ɵoverrideProvider as overrideProvider, ɵstringify as stringify} from '@angular/core';\n\nimport {AsyncTestCompleter} from './async_test_completer';\nimport {ComponentFixture} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {TestingCompiler, TestingCompilerFactory} from './test_compiler';\n\nconst UNDEFINED = new Object();\n\n/**\n * An abstract class for inserting the root test component element in a platform independent way.\n *\n * @experimental\n */\nexport class TestComponentRenderer {\n insertRootElement(rootElementId: string) {}\n}\n\nlet _nextRootElementId = 0;\n\n/**\n * @experimental\n */\nexport const ComponentFixtureAutoDetect =\n new InjectionToken<boolean[]>('ComponentFixtureAutoDetect');\n\n/**\n * @experimental\n */\nexport const ComponentFixtureNoNgZone = new InjectionToken<boolean[]>('ComponentFixtureNoNgZone');\n\n/**\n * @experimental\n */\nexport type TestModuleMetadata = {\n providers?: any[],\n declarations?: any[],\n imports?: any[],\n schemas?: Array<SchemaMetadata|any[]>,\n aotSummaries?: () => any[],\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 *\n */\nexport class TestBed implements Injector {\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 * @experimental\n */\n static initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed {\n const testBed = getTestBed();\n testBed.initTestEnvironment(ngModule, platform, aotSummaries);\n return testBed;\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @experimental\n */\n static resetTestEnvironment() { getTestBed().resetTestEnvironment(); }\n\n static resetTestingModule(): typeof TestBed {\n getTestBed().resetTestingModule();\n return TestBed;\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;}): typeof TestBed {\n getTestBed().configureCompiler(config);\n return TestBed;\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): typeof TestBed {\n getTestBed().configureTestingModule(moduleDef);\n return TestBed;\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> { return getTestBed().compileComponents(); }\n\n static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): typeof TestBed {\n getTestBed().overrideModule(ngModule, override);\n return TestBed;\n }\n\n static overrideComponent(component: Type<any>, override: MetadataOverride<Component>):\n typeof TestBed {\n getTestBed().overrideComponent(component, override);\n return TestBed;\n }\n\n static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>):\n typeof TestBed {\n getTestBed().overrideDirective(directive, override);\n return TestBed;\n }\n\n static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): typeof TestBed {\n getTestBed().overridePipe(pipe, override);\n return TestBed;\n }\n\n static overrideTemplate(component: Type<any>, template: string): typeof TestBed {\n getTestBed().overrideComponent(component, {set: {template, templateUrl: null !}});\n return TestBed;\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):\n typeof TestBed {\n getTestBed().overrideTemplateUsingTestingModule(component, template);\n return TestBed;\n }\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 }): typeof TestBed;\n static overrideProvider(token: any, provider: {useValue: any;}): typeof TestBed;\n static overrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): typeof TestBed {\n getTestBed().overrideProvider(token, provider as any);\n return TestBed;\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n *\n * @deprecated as it makes all NgModules lazy. Introduced only for migrating off of it.\n */\n static deprecatedOverrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): void;\n static deprecatedOverrideProvider(token: any, provider: {useValue: any;}): void;\n static deprecatedOverrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): typeof TestBed {\n getTestBed().deprecatedOverrideProvider(token, provider as any);\n return TestBed;\n }\n\n static get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND) {\n return getTestBed().get(token, notFoundValue);\n }\n\n static createComponent<T>(component: Type<T>): ComponentFixture<T> {\n return getTestBed().createComponent(component);\n }\n\n private _instantiated: boolean = false;\n\n private _compiler: TestingCompiler = null !;\n private _moduleRef: NgModuleRef<any> = null !;\n private _moduleFactory: NgModuleFactory<any> = 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 * @experimental\n */\n initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]) {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n this.platform = platform;\n this.ngModule = ngModule;\n if (aotSummaries) {\n this._testEnvAotSummaries = aotSummaries;\n }\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @experimental\n */\n resetTestEnvironment() {\n this.resetTestingModule();\n this.platform = null !;\n this.ngModule = null !;\n this._testEnvAotSummaries = () => [];\n }\n\n resetTestingModule() {\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._moduleRef = null !;\n this._moduleFactory = null !;\n this._compilerOptions = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._instantiated = false;\n this._activeFixtures.forEach((fixture) => {\n try {\n fixture.destroy();\n } catch (e) {\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n }\n\n configureCompiler(config: {providers?: any[], useJit?: boolean}) {\n this._assertNotInstantiated('TestBed.configureCompiler', 'configure the compiler');\n this._compilerOptions.push(config);\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata) {\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 }\n\n compileComponents(): Promise<any> {\n if (this._moduleFactory || this._instantiated) {\n return Promise.resolve(null);\n }\n\n const moduleType = this._createCompilerAndModule();\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType)\n .then((moduleAndComponentFactories) => {\n this._moduleFactory = moduleAndComponentFactories.ngModuleFactory;\n });\n }\n\n private _initIfNeeded() {\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 ${stringify(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 = new NgZone({enableLongStackTrace: true});\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: APP_ROOT, useValue: this._isRoot});\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: TestingCompilerFactory =\n 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 get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND) {\n this._initIfNeeded();\n if (token === TestBed) {\n return this;\n }\n // Tests can inject things from the ng module and from the compiler,\n // but the ng module can't inject things from the compiler and vice versa.\n const result = this._moduleRef.injector.get(token, UNDEFINED);\n return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result;\n }\n\n execute(tokens: any[], fn: Function, context?: any): any {\n this._initIfNeeded();\n const params = tokens.map(t => this.get(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.overrideProviderImpl(token, provider);\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n *\n * @deprecated as it makes all NgModules lazy. Introduced only for migrating off of it.\n */\n deprecatedOverrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): void;\n deprecatedOverrideProvider(token: any, provider: {useValue: any;}): void;\n deprecatedOverrideProvider(\n token: any, provider: {useFactory?: Function, useValue?: any, deps?: any[]}): void {\n this.overrideProviderImpl(token, provider, /* deprecated */ true);\n }\n\n private overrideProviderImpl(\n token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n },\n deprecated = false): void {\n if (typeof token !== 'string' && token.ngInjectableDef &&\n token.ngInjectableDef.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(\n `Cannot create the component ${stringify(component)} as it was not imported into the testing module!`);\n }\n\n const noNgZone = this.get(ComponentFixtureNoNgZone, false);\n const autoDetect: boolean = this.get(ComponentFixtureAutoDetect, false);\n const ngZone: NgZone = noNgZone ? null : this.get(NgZone, null);\n const testComponentRenderer: TestComponentRenderer = this.get(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\nlet _testBed: TestBed = null !;\n\n/**\n * @experimental\n */\nexport function getTestBed() {\n return _testBed = _testBed || new TestBed();\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 * Notes:\n * - inject is currently a function because of some Traceur limitation the syntax should\n * eventually\n * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`\n *\n *\n */\nexport function inject(tokens: any[], fn: Function): () => any {\n const testBed = getTestBed();\n if (tokens.indexOf(AsyncTestCompleter) >= 0) {\n // Not using an arrow function to preserve context passed from call site\n return function() {\n // Return an async test method that returns a Promise if AsyncTestCompleter is one of\n // the injected tokens.\n return testBed.compileComponents().then(() => {\n const completer: AsyncTestCompleter = testBed.get(AsyncTestCompleter);\n testBed.execute(tokens, fn, this);\n return completer.promise;\n });\n };\n } else {\n // Not using an arrow function to preserve context passed from call site\n return function() { return testBed.execute(tokens, fn, this); };\n }\n}\n\n/**\n * @experimental\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() {\n self._addModule();\n return inject(tokens, fn).call(this);\n };\n }\n}\n\n/**\n * @experimental\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() {\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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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} 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(() => {\n TestBed.resetTestingModule();\n resetFakeAsyncZone();\n });\n}\n\n// TODO(juliemr): remove this, only used because we need to export something to have compilation\n// work.\nexport const __core_private_testing_placeholder__ = '';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {TestingCompiler as ɵTestingCompiler, TestingCompilerFactory as ɵTestingCompilerFactory} from './test_compiler';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @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 * from './test_bed';\nexport * from './before_each';\nexport * from './metadata_override';\nexport * from './private_export_testing';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_Zone","tslib_1.__extends","clearOverrides","stringify","tslib_1.__values","overrideComponentView","APP_ROOT","overrideProvider","_global"],"mappings":";;;;;;;;;AAAA;;;;;;;AAcA,IAAM,OAAO,IAAS,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;;;;;;;;;;;;;;;;;;AAmBvE,uBAA8B,EAAY;;;IAGxC,IAAI,OAAO,CAAC,OAAO,EAAE;;QAEnB,OAAO,UAAS,IAAS;YACvB,IAAI,CAAC,IAAI,EAAE;;;gBAGT,IAAI,GAAG,eAAa,CAAC;gBACrB,IAAI,CAAC,IAAI,GAAG,UAAS,CAAM,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC;aAC3C;YACD,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAC,GAAQ;gBACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;oBAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,CAAS,GAAG,CAAC,CAAC,CAAC;iBAC1C;qBAAM;oBACL,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBAChB;aACF,CAAC,CAAC;SACJ,CAAC;KACH;;;;;IAKD,OAAO;QAAA,iBAIN;QAHC,OAAO,IAAI,OAAO,CAAO,UAAC,cAAc,EAAE,YAAY;YACpD,aAAa,CAAC,EAAE,EAAE,KAAI,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;SACvD,CAAC,CAAC;KACJ,CAAC;CACH;AAED,uBACI,EAAY,EAAE,OAAY,EAAE,cAAwB,EAAE,YAAsB;IAC9E,IAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;IACjC,IAAM,iBAAiB,GAAI,IAAY,CAAC,mBAAmB,CAA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G;;;;"}
1
+ {"version":3,"file":"testing.js","sources":["../../../../../../packages/core/testing/src/async_fallback.ts","../../../../../../packages/core/testing/src/async.ts","../../../../../../packages/core/testing/src/component_fixture.ts","../../../../../../packages/core/testing/src/fake_async_fallback.ts","../../../../../../packages/core/testing/src/fake_async.ts","../../../../../../packages/core/testing/src/async_test_completer.ts","../../../../../../packages/core/testing/src/test_compiler.ts","../../../../../../packages/core/testing/src/test_bed.ts","../../../../../../packages/core/testing/src/before_each.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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * async has been moved to zone.js\n * this file is for fallback in case old version of zone.js is used\n */\ndeclare var global: any;\n\nconst _global = <any>(typeof window === 'undefined' ? global : window);\n\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n *\n */\nexport function asyncFallback(fn: Function): (done: any) => any {\n // If we're running using the Jasmine test framework, adapt to call the 'done'\n // function when asynchronous activity is finished.\n if (_global.jasmine) {\n // Not using an arrow function to preserve context passed from call site\n return function(done: any) {\n if (!done) {\n // if we run beforeEach in @angular/core/testing/testing_internal then we get no done\n // fake it here and assume sync.\n done = function() {};\n done.fail = function(e: any) { throw e; };\n }\n runInTestZone(fn, this, done, (err: any) => {\n if (typeof err === 'string') {\n return done.fail(new Error(<string>err));\n } else {\n done.fail(err);\n }\n });\n };\n }\n // Otherwise, return a promise which will resolve when asynchronous activity\n // is finished. This will be correctly consumed by the Mocha framework with\n // it('...', async(myFn)); or can be used in a custom framework.\n // Not using an arrow function to preserve context passed from call site\n return function() {\n return new Promise<void>((finishCallback, failCallback) => {\n runInTestZone(fn, this, finishCallback, failCallback);\n });\n };\n}\n\nfunction runInTestZone(\n fn: Function, context: any, finishCallback: Function, failCallback: Function) {\n const currentZone = Zone.current;\n const AsyncTestZoneSpec = (Zone as any)['AsyncTestZoneSpec'];\n if (AsyncTestZoneSpec === undefined) {\n throw new Error(\n 'AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/async-test.js');\n }\n const ProxyZoneSpec = (Zone as any)['ProxyZoneSpec'] as {\n get(): {setDelegate(spec: ZoneSpec): void; getDelegate(): ZoneSpec;};\n assertPresent: () => void;\n };\n if (ProxyZoneSpec === undefined) {\n throw new Error(\n 'ProxyZoneSpec is needed for the async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/proxy.js');\n }\n const proxyZoneSpec = ProxyZoneSpec.get();\n ProxyZoneSpec.assertPresent();\n // We need to create the AsyncTestZoneSpec outside the ProxyZone.\n // If we do it in ProxyZone then we will get to infinite recursion.\n const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');\n const previousDelegate = proxyZoneSpec.getDelegate();\n proxyZone.parent.run(() => {\n const testZoneSpec: ZoneSpec = new AsyncTestZoneSpec(\n () => {\n // Need to restore the original zone.\n currentZone.run(() => {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n finishCallback();\n });\n },\n (error: any) => {\n // Need to restore the original zone.\n currentZone.run(() => {\n if (proxyZoneSpec.getDelegate() == testZoneSpec) {\n // Only reset the zone spec if it's sill this one. Otherwise, assume it's OK.\n proxyZoneSpec.setDelegate(previousDelegate);\n }\n failCallback(error);\n });\n },\n 'test');\n proxyZoneSpec.setDelegate(testZoneSpec);\n });\n return Zone.current.runGuarded(fn, context);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {asyncFallback} from './async_fallback';\n\n/**\n * Wraps a test function in an asynchronous test zone. The test will automatically\n * complete when all asynchronous calls within this zone are done. Can be used\n * to wrap an {@link inject} call.\n *\n * Example:\n *\n * ```\n * it('...', async(inject([AClass], (object) => {\n * object.doSomething.then(() => {\n * expect(...);\n * })\n * });\n * ```\n *\n *\n */\nexport function async(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 async() test helper but could not be found. ' +\n 'Please make sure that your environment includes zone.js/dist/zone.js');\n };\n }\n const asyncTest = _Zone && _Zone[_Zone.__symbol__('asyncTest')];\n if (typeof asyncTest === 'function') {\n return asyncTest(fn);\n }\n // not using new version of zone.js\n // TODO @JiaLiPassion, remove this after all library updated to\n // newest version of zone.js(0.8.25)\n return asyncFallback(fn);\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, ComponentRef, DebugElement, ElementRef, NgZone, RendererFactory2, getDebugNode} from '@angular/core';\n\n\n/**\n * Fixture for debugging and testing a component.\n *\n *\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 =\n ngZone.onUnstable.subscribe({next: () => { this._isStable = false; }});\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 =\n ngZone.onError.subscribe({next: (error: any) => { throw error; }});\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(() => { this._tick(checkNoChanges); });\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 { this.changeDetectorRef.checkNoChanges(); }\n\n /**\n * Set whether the fixture should autodetect changes.\n *\n * Also runs detectChanges once so that any existing change is detected.\n */\n 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 { return this._isStable && !this.ngZone !.hasPendingMacrotasks; }\n\n /**\n * Get a promise that resolves when the fixture is stable.\n *\n * This can be used to resume testing after events have triggered asynchronous activity or\n * asynchronous change detection.\n */\n 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 => { this._resolve = res; });\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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * fakeAsync has been moved to zone.js\n * this file is for fallback in case old version of zone.js is used\n */\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst FakeAsyncTestZoneSpec = _Zone && _Zone['FakeAsyncTestZoneSpec'];\ntype ProxyZoneSpec = {\n setDelegate(delegateSpec: ZoneSpec): void; getDelegate(): ZoneSpec; resetDelegate(): void;\n};\nconst ProxyZoneSpec: {get(): ProxyZoneSpec; assertPresent: () => ProxyZoneSpec} =\n _Zone && _Zone['ProxyZoneSpec'];\n\nlet _fakeAsyncTestZoneSpec: any = null;\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @experimental\n */\nexport function resetFakeAsyncZoneFallback() {\n _fakeAsyncTestZoneSpec = null;\n // in node.js testing we may not have ProxyZoneSpec in which case there is nothing to reset.\n ProxyZoneSpec && ProxyZoneSpec.assertPresent().resetDelegate();\n}\n\nlet _inFakeAsyncCall = false;\n\n/**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception will be thrown.\n *\n * Can be used to wrap inject() calls.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns The function wrapped to be executed in the fakeAsync zone\n *\n * @experimental\n */\nexport function fakeAsyncFallback(fn: Function): (...args: any[]) => any {\n // Not using an arrow function to preserve context passed from call site\n return function(...args: any[]) {\n const proxyZoneSpec = ProxyZoneSpec.assertPresent();\n if (_inFakeAsyncCall) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n _inFakeAsyncCall = true;\n try {\n if (!_fakeAsyncTestZoneSpec) {\n if (proxyZoneSpec.getDelegate() instanceof FakeAsyncTestZoneSpec) {\n throw new Error('fakeAsync() calls can not be nested');\n }\n\n _fakeAsyncTestZoneSpec = new FakeAsyncTestZoneSpec();\n }\n\n let res: any;\n const lastProxyZoneSpec = proxyZoneSpec.getDelegate();\n proxyZoneSpec.setDelegate(_fakeAsyncTestZoneSpec);\n try {\n res = fn.apply(this, args);\n flushMicrotasksFallback();\n } finally {\n proxyZoneSpec.setDelegate(lastProxyZoneSpec);\n }\n\n if (_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {\n throw new Error(\n `${_fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +\n `periodic timer(s) still in the queue.`);\n }\n\n if (_fakeAsyncTestZoneSpec.pendingTimers.length > 0) {\n throw new Error(\n `${_fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);\n }\n return res;\n } finally {\n _inFakeAsyncCall = false;\n resetFakeAsyncZoneFallback();\n }\n };\n}\n\nfunction _getFakeAsyncZoneSpec(): any {\n if (_fakeAsyncTestZoneSpec == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n return _fakeAsyncTestZoneSpec;\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @experimental\n */\nexport function tickFallback(millis: number = 0): void {\n _getFakeAsyncZoneSpec().tick(millis);\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by\n * draining the macrotask queue until it is empty. The returned value is the milliseconds\n * of time that would have been elapsed.\n *\n * @param maxTurns\n * @returns The simulated time elapsed, in millis.\n *\n * @experimental\n */\nexport function flushFallback(maxTurns?: number): number {\n return _getFakeAsyncZoneSpec().flush(maxTurns);\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @experimental\n */\nexport function discardPeriodicTasksFallback(): void {\n const zoneSpec = _getFakeAsyncZoneSpec();\n zoneSpec.pendingPeriodicTimers.length = 0;\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @experimental\n */\nexport function flushMicrotasksFallback(): void {\n _getFakeAsyncZoneSpec().flushMicrotasks();\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {discardPeriodicTasksFallback, fakeAsyncFallback, flushFallback, flushMicrotasksFallback, resetFakeAsyncZoneFallback, tickFallback} from './fake_async_fallback';\n\nconst _Zone: any = typeof Zone !== 'undefined' ? Zone : null;\nconst fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];\n\n/**\n * Clears out the shared fake async zone for a test.\n * To be called in a global `beforeEach`.\n *\n * @experimental\n */\nexport function resetFakeAsyncZone(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.resetFakeAsyncZone();\n } else {\n return resetFakeAsyncZoneFallback();\n }\n}\n\n/**\n * Wraps a function to be executed in the fakeAsync zone:\n * - microtasks are manually executed by calling `flushMicrotasks()`,\n * - timers are synchronous, `tick()` simulates the asynchronous passage of time.\n *\n * If there are any pending timers at the end of the function, an exception will be thrown.\n *\n * Can be used to wrap inject() calls.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns The function wrapped to be executed in the fakeAsync zone\n *\n * @experimental\n */\nexport function fakeAsync(fn: Function): (...args: any[]) => any {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.fakeAsync(fn);\n } else {\n return fakeAsyncFallback(fn);\n }\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone.\n *\n * The microtasks queue is drained at the very start of this function and after any timer callback\n * has been executed.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/testing/ts/fake_async.ts region='basic'}\n *\n * @experimental\n */\nexport function tick(millis: number = 0): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.tick(millis);\n } else {\n return tickFallback(millis);\n }\n}\n\n/**\n * Simulates the asynchronous passage of time for the timers in the fakeAsync zone by\n * draining the macrotask queue until it is empty. The returned value is the milliseconds\n * of time that would have been elapsed.\n *\n * @param maxTurns\n * @returns The simulated time elapsed, in millis.\n *\n * @experimental\n */\nexport function flush(maxTurns?: number): number {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flush(maxTurns);\n } else {\n return flushFallback(maxTurns);\n }\n}\n\n/**\n * Discard all remaining periodic tasks.\n *\n * @experimental\n */\nexport function discardPeriodicTasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.discardPeriodicTasks();\n } else {\n discardPeriodicTasksFallback();\n }\n}\n\n/**\n * Flush any pending microtasks.\n *\n * @experimental\n */\nexport function flushMicrotasks(): void {\n if (fakeAsyncTestModule) {\n return fakeAsyncTestModule.flushMicrotasks();\n } else {\n return flushMicrotasksFallback();\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Injectable completer that allows signaling completion of an asynchronous test. Used internally.\n */\nexport class AsyncTestCompleter {\n // TODO(issue/24571): remove '!'.\n private _resolve !: (result: any) => void;\n // TODO(issue/24571): remove '!'.\n private _reject !: (err: any) => void;\n private _promise: Promise<any> = new Promise((res, rej) => {\n this._resolve = res;\n this._reject = rej;\n });\n done(value?: any) { this._resolve(value); }\n\n fail(error?: any, stackTrace?: string) { this._reject(error); }\n\n get promise(): Promise<any> { return this._promise; }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\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 * @experimental\n */\n@Injectable()\nexport class TestingCompiler extends Compiler {\n get injector(): Injector { throw unimplemented(); }\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[]) { throw unimplemented(); }\n\n /**\n * Gets the component factory for the given component.\n * This assumes that the component has been compiled before calling this call using\n * `compileModuleAndAllComponents*`.\n */\n getComponentFactory<T>(component: Type<T>): ComponentFactory<T> { throw unimplemented(); }\n\n /**\n * Returns the component type that is stored in the given error.\n * This can be used for errors created by compileModule...\n */\n getComponentFromError(error: Error): Type<any>|null { throw unimplemented(); }\n}\n\n/**\n * A factory for creating a Compiler\n *\n * @experimental\n */\nexport abstract class TestingCompilerFactory {\n abstract createTestingCompiler(options?: CompilerOptions[]): TestingCompiler;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ApplicationInitStatus, CompilerOptions, Component, Directive, InjectionToken, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgModuleRef, NgZone, Optional, Pipe, PlatformRef, Provider, SchemaMetadata, SkipSelf, StaticProvider, Type, ɵAPP_ROOT as APP_ROOT, ɵDepFlags as DepFlags, ɵNodeFlags as NodeFlags, ɵclearOverrides as clearOverrides, ɵgetComponentViewDefinitionFactory as getComponentViewDefinitionFactory, ɵoverrideComponentView as overrideComponentView, ɵoverrideProvider as overrideProvider, ɵstringify as stringify} from '@angular/core';\n\nimport {AsyncTestCompleter} from './async_test_completer';\nimport {ComponentFixture} from './component_fixture';\nimport {MetadataOverride} from './metadata_override';\nimport {TestingCompiler, TestingCompilerFactory} from './test_compiler';\n\nconst UNDEFINED = new Object();\n\n/**\n * An abstract class for inserting the root test component element in a platform independent way.\n *\n * @experimental\n */\nexport class TestComponentRenderer {\n insertRootElement(rootElementId: string) {}\n}\n\nlet _nextRootElementId = 0;\n\n/**\n * @experimental\n */\nexport const ComponentFixtureAutoDetect =\n new InjectionToken<boolean[]>('ComponentFixtureAutoDetect');\n\n/**\n * @experimental\n */\nexport const ComponentFixtureNoNgZone = new InjectionToken<boolean[]>('ComponentFixtureNoNgZone');\n\n/**\n * @experimental\n */\nexport type TestModuleMetadata = {\n providers?: any[],\n declarations?: any[],\n imports?: any[],\n schemas?: Array<SchemaMetadata|any[]>,\n aotSummaries?: () => any[],\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 *\n */\nexport class TestBed implements Injector {\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 * @experimental\n */\n static initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed {\n const testBed = getTestBed();\n testBed.initTestEnvironment(ngModule, platform, aotSummaries);\n return testBed;\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @experimental\n */\n static resetTestEnvironment() { getTestBed().resetTestEnvironment(); }\n\n static resetTestingModule(): typeof TestBed {\n getTestBed().resetTestingModule();\n return TestBed;\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;}): typeof TestBed {\n getTestBed().configureCompiler(config);\n return TestBed;\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): typeof TestBed {\n getTestBed().configureTestingModule(moduleDef);\n return TestBed;\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> { return getTestBed().compileComponents(); }\n\n static overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): typeof TestBed {\n getTestBed().overrideModule(ngModule, override);\n return TestBed;\n }\n\n static overrideComponent(component: Type<any>, override: MetadataOverride<Component>):\n typeof TestBed {\n getTestBed().overrideComponent(component, override);\n return TestBed;\n }\n\n static overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>):\n typeof TestBed {\n getTestBed().overrideDirective(directive, override);\n return TestBed;\n }\n\n static overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): typeof TestBed {\n getTestBed().overridePipe(pipe, override);\n return TestBed;\n }\n\n static overrideTemplate(component: Type<any>, template: string): typeof TestBed {\n getTestBed().overrideComponent(component, {set: {template, templateUrl: null !}});\n return TestBed;\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):\n typeof TestBed {\n getTestBed().overrideTemplateUsingTestingModule(component, template);\n return TestBed;\n }\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 }): typeof TestBed;\n static overrideProvider(token: any, provider: {useValue: any;}): typeof TestBed;\n static overrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): typeof TestBed {\n getTestBed().overrideProvider(token, provider as any);\n return TestBed;\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n *\n * @deprecated as it makes all NgModules lazy. Introduced only for migrating off of it.\n */\n static deprecatedOverrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): void;\n static deprecatedOverrideProvider(token: any, provider: {useValue: any;}): void;\n static deprecatedOverrideProvider(token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n }): typeof TestBed {\n getTestBed().deprecatedOverrideProvider(token, provider as any);\n return TestBed;\n }\n\n static get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND) {\n return getTestBed().get(token, notFoundValue);\n }\n\n static createComponent<T>(component: Type<T>): ComponentFixture<T> {\n return getTestBed().createComponent(component);\n }\n\n private _instantiated: boolean = false;\n\n private _compiler: TestingCompiler = null !;\n private _moduleRef: NgModuleRef<any> = null !;\n private _moduleFactory: NgModuleFactory<any> = 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 * @experimental\n */\n initTestEnvironment(\n ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]) {\n if (this.platform || this.ngModule) {\n throw new Error('Cannot set base providers because it has already been called');\n }\n this.platform = platform;\n this.ngModule = ngModule;\n if (aotSummaries) {\n this._testEnvAotSummaries = aotSummaries;\n }\n }\n\n /**\n * Reset the providers for the test injector.\n *\n * @experimental\n */\n resetTestEnvironment() {\n this.resetTestingModule();\n this.platform = null !;\n this.ngModule = null !;\n this._testEnvAotSummaries = () => [];\n }\n\n resetTestingModule() {\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._moduleRef = null !;\n this._moduleFactory = null !;\n this._compilerOptions = [];\n this._providers = [];\n this._declarations = [];\n this._imports = [];\n this._schemas = [];\n this._instantiated = false;\n this._activeFixtures.forEach((fixture) => {\n try {\n fixture.destroy();\n } catch (e) {\n console.error('Error during cleanup of component', {\n component: fixture.componentInstance,\n stacktrace: e,\n });\n }\n });\n this._activeFixtures = [];\n }\n\n configureCompiler(config: {providers?: any[], useJit?: boolean}) {\n this._assertNotInstantiated('TestBed.configureCompiler', 'configure the compiler');\n this._compilerOptions.push(config);\n }\n\n configureTestingModule(moduleDef: TestModuleMetadata) {\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 }\n\n compileComponents(): Promise<any> {\n if (this._moduleFactory || this._instantiated) {\n return Promise.resolve(null);\n }\n\n const moduleType = this._createCompilerAndModule();\n return this._compiler.compileModuleAndAllComponentsAsync(moduleType)\n .then((moduleAndComponentFactories) => {\n this._moduleFactory = moduleAndComponentFactories.ngModuleFactory;\n });\n }\n\n private _initIfNeeded() {\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 ${stringify(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 = new NgZone({enableLongStackTrace: true});\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: APP_ROOT, useValue: this._isRoot});\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: TestingCompilerFactory =\n 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 get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND) {\n this._initIfNeeded();\n if (token === TestBed) {\n return this;\n }\n // Tests can inject things from the ng module and from the compiler,\n // but the ng module can't inject things from the compiler and vice versa.\n const result = this._moduleRef.injector.get(token, UNDEFINED);\n return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result;\n }\n\n execute(tokens: any[], fn: Function, context?: any): any {\n this._initIfNeeded();\n const params = tokens.map(t => this.get(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.overrideProviderImpl(token, provider);\n }\n\n /**\n * Overwrites all providers for the given token with the given provider definition.\n *\n * @deprecated as it makes all NgModules lazy. Introduced only for migrating off of it.\n */\n deprecatedOverrideProvider(token: any, provider: {\n useFactory: Function,\n deps: any[],\n }): void;\n deprecatedOverrideProvider(token: any, provider: {useValue: any;}): void;\n deprecatedOverrideProvider(\n token: any, provider: {useFactory?: Function, useValue?: any, deps?: any[]}): void {\n this.overrideProviderImpl(token, provider, /* deprecated */ true);\n }\n\n private overrideProviderImpl(\n token: any, provider: {\n useFactory?: Function,\n useValue?: any,\n deps?: any[],\n },\n deprecated = false): void {\n if (typeof token !== 'string' && token.ngInjectableDef &&\n token.ngInjectableDef.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(\n `Cannot create the component ${stringify(component)} as it was not imported into the testing module!`);\n }\n\n const noNgZone = this.get(ComponentFixtureNoNgZone, false);\n const autoDetect: boolean = this.get(ComponentFixtureAutoDetect, false);\n const ngZone: NgZone = noNgZone ? null : this.get(NgZone, null);\n const testComponentRenderer: TestComponentRenderer = this.get(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\nlet _testBed: TestBed = null !;\n\n/**\n * @experimental\n */\nexport function getTestBed() {\n return _testBed = _testBed || new TestBed();\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 * Notes:\n * - inject is currently a function because of some Traceur limitation the syntax should\n * eventually\n * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`\n *\n *\n */\nexport function inject(tokens: any[], fn: Function): () => any {\n const testBed = getTestBed();\n if (tokens.indexOf(AsyncTestCompleter) >= 0) {\n // Not using an arrow function to preserve context passed from call site\n return function() {\n // Return an async test method that returns a Promise if AsyncTestCompleter is one of\n // the injected tokens.\n return testBed.compileComponents().then(() => {\n const completer: AsyncTestCompleter = testBed.get(AsyncTestCompleter);\n testBed.execute(tokens, fn, this);\n return completer.promise;\n });\n };\n } else {\n // Not using an arrow function to preserve context passed from call site\n return function() { return testBed.execute(tokens, fn, this); };\n }\n}\n\n/**\n * @experimental\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() {\n self._addModule();\n return inject(tokens, fn).call(this);\n };\n }\n}\n\n/**\n * @experimental\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() {\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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * 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} 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(() => {\n TestBed.resetTestingModule();\n resetFakeAsyncZone();\n });\n}\n\n// TODO(juliemr): remove this, only used because we need to export something to have compilation\n// work.\nexport const __core_private_testing_placeholder__ = '';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {TestingCompiler as ɵTestingCompiler, TestingCompilerFactory as ɵTestingCompilerFactory} from './test_compiler';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @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 * from './test_bed';\nexport * from './before_each';\nexport * from './metadata_override';\nexport * from './private_export_testing';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/// <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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_Zone","tslib_1.__extends","clearOverrides","stringify","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 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "6.1.6",
3
+ "version": "6.1.10",
4
4
  "description": "Angular - the core framework",
5
5
  "main": "./bundles/core.umd.js",
6
6
  "module": "./fesm5/core.js",
@@ -11,10 +11,18 @@ import { StaticProvider } from './di';
11
11
  export declare function _iterableDiffersFactory(): IterableDiffers;
12
12
  export declare function _keyValueDiffersFactory(): KeyValueDiffers;
13
13
  export declare function _localeFactory(locale?: string): string;
14
+ /**
15
+ * A built-in [dependency injection token](guide/glossary#di-token)
16
+ * that is used to configure the root injector for bootstrapping.
17
+ */
14
18
  export declare const APPLICATION_MODULE_PROVIDERS: StaticProvider[];
15
19
  /**
16
- * This module includes the providers of @angular/core that are needed
17
- * to bootstrap components via `ApplicationRef`.
20
+ * Configures the root injector for an app with
21
+ * providers of `@angular/core` dependencies that `ApplicationRef` needs
22
+ * to bootstrap components.
23
+ *
24
+ * Re-exported by `BrowserModule`, which is included automatically in the root
25
+ * `AppModule` when you create a new app with the CLI `new` command.
18
26
  *
19
27
  * @experimental
20
28
  */
@@ -43,7 +43,7 @@
43
43
  * when the `live` property is set to false, and reattaches it when the property
44
44
  * becomes true.
45
45
  *
46
- * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
46
+ * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
47
47
  *
48
48
  */
49
49
  export declare abstract class ChangeDetectorRef {
@@ -35,11 +35,11 @@ import { Type } from '../type';
35
35
  * @usageNotes
36
36
  * ### Basic Example
37
37
  *
38
- * #### Plain InjectionToken
38
+ * ### Plain InjectionToken
39
39
  *
40
40
  * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
41
41
  *
42
- * #### Tree-shakable InjectionToken
42
+ * ### Tree-shakable InjectionToken
43
43
  *
44
44
  * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
45
45
  *
@@ -133,15 +133,6 @@ export declare abstract class ReflectiveInjector implements Injector {
133
133
  *
134
134
  * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
135
135
  * -->
136
- *
137
- * @usageNotes
138
- * ### Example
139
- *
140
- * ```typescript
141
- * var parent = ReflectiveInjector.resolveAndCreate([]);
142
- * var child = parent.resolveAndCreateChild([]);
143
- * expect(child.parent).toBe(parent);
144
- * ```
145
136
  */
146
137
  abstract readonly parent: Injector | null;
147
138
  /**
@@ -12,32 +12,31 @@ import { ElementRef } from './element_ref';
12
12
  import { NgModuleRef } from './ng_module_factory';
13
13
  import { ViewRef } from './view_ref';
14
14
  /**
15
- * Represents an instance of a Component created via a {@link ComponentFactory}.
16
- *
17
- * `ComponentRef` provides access to the Component Instance as well other objects related to this
18
- * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
19
- * method.
15
+ * Represents a component created by a `ComponentFactory`.
16
+ * Provides access to the component instance and related objects,
17
+ * and provides the means of destroying the instance.
20
18
  *
21
19
  */
22
20
  export declare abstract class ComponentRef<C> {
23
21
  /**
24
- * Location of the Host Element of this Component Instance.
22
+ * The host or anchor [element](guide/glossary#element) for this component instance.
25
23
  */
26
24
  abstract readonly location: ElementRef;
27
25
  /**
28
- * The injector on which the component instance exists.
26
+ * The [dependency injector](guide/glossary#injector) for this component instance.
29
27
  */
30
28
  abstract readonly injector: Injector;
31
29
  /**
32
- * The instance of the Component.
30
+ * This component instance.
33
31
  */
34
32
  abstract readonly instance: C;
35
33
  /**
36
- * The {@link ViewRef} of the Host View of this Component instance.
34
+ * The [host view](guide/glossary#view-tree) defined by the template
35
+ * for this component instance.
37
36
  */
38
37
  abstract readonly hostView: ViewRef;
39
38
  /**
40
- * The {@link ChangeDetectorRef} of the Component instance.
39
+ * The change detector for this component instance.
41
40
  */
42
41
  abstract readonly changeDetectorRef: ChangeDetectorRef;
43
42
  /**
@@ -49,26 +48,35 @@ export declare abstract class ComponentRef<C> {
49
48
  */
50
49
  abstract destroy(): void;
51
50
  /**
52
- * Allows to register a callback that will be called when the component is destroyed.
51
+ * A lifecycle hook that provides additional developer-defined cleanup
52
+ * functionality for the component.
53
+ * @param callback A handler function that cleans up developer-defined data
54
+ * associated with this component. Called when the `destroy()` method is invoked.
53
55
  */
54
56
  abstract onDestroy(callback: Function): void;
55
57
  }
56
58
  export declare abstract class ComponentFactory<C> {
59
+ /**
60
+ * The comonent's HTML selector.
61
+ */
57
62
  abstract readonly selector: string;
63
+ /**
64
+ * The component's type
65
+ */
58
66
  abstract readonly componentType: Type<any>;
59
67
  /**
60
- * selector for all <ng-content> elements in the component.
68
+ * Selector for all <ng-content> elements in the component.
61
69
  */
62
70
  abstract readonly ngContentSelectors: string[];
63
71
  /**
64
- * the inputs of the component.
72
+ * The inputs of the component.
65
73
  */
66
74
  abstract readonly inputs: {
67
75
  propName: string;
68
76
  templateName: string;
69
77
  }[];
70
78
  /**
71
- * the outputs of the component.
79
+ * The outputs of the component.
72
80
  */
73
81
  abstract readonly outputs: {
74
82
  propName: string;