@angular/core 6.0.3 → 6.0.7

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 (233) hide show
  1. package/bundles/core-testing.umd.js +61 -237
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +11 -4
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +591 -2007
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +4 -32
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/core.externs.js +3 -3
  11. package/esm2015/src/application_init.js +2 -9
  12. package/esm2015/src/application_module.js +1 -10
  13. package/esm2015/src/application_ref.js +15 -30
  14. package/esm2015/src/change_detection/change_detector_ref.js +7 -5
  15. package/esm2015/src/change_detection/differs/iterable_differs.js +4 -3
  16. package/esm2015/src/change_detection/differs/keyvalue_differs.js +4 -3
  17. package/esm2015/src/change_detection/pipe_transform.js +3 -6
  18. package/esm2015/src/console.js +0 -11
  19. package/esm2015/src/di/forward_ref.js +8 -6
  20. package/esm2015/src/di/injectable.js +1 -4
  21. package/esm2015/src/di/injection_token.js +6 -8
  22. package/esm2015/src/di/injector.js +5 -10
  23. package/esm2015/src/di/metadata.js +1 -16
  24. package/esm2015/src/di/provider.js +47 -138
  25. package/esm2015/src/di/reflective_errors.js +14 -7
  26. package/esm2015/src/di/reflective_injector.js +22 -24
  27. package/esm2015/src/di/reflective_provider.js +11 -12
  28. package/esm2015/src/error_handler.js +2 -5
  29. package/esm2015/src/event_emitter.js +6 -3
  30. package/esm2015/src/i18n/tokens.js +7 -4
  31. package/esm2015/src/linker/compiler.js +1 -12
  32. package/esm2015/src/linker/query_list.js +4 -4
  33. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +3 -10
  34. package/esm2015/src/linker/view_ref.js +10 -7
  35. package/esm2015/src/metadata/di.js +10 -16
  36. package/esm2015/src/metadata/directives.js +111 -33
  37. package/esm2015/src/metadata/lifecycle_hooks.js +9 -9
  38. package/esm2015/src/metadata/ng_module.js +19 -11
  39. package/esm2015/src/render3/node_manipulation.js +2 -3
  40. package/esm2015/src/render3/view_ref.js +7 -3
  41. package/esm2015/src/testability/testability.js +2 -16
  42. package/esm2015/src/version.js +1 -1
  43. package/esm2015/src/view/ng_module.js +4 -1
  44. package/esm2015/src/zone/ng_zone.js +2 -1
  45. package/esm2015/testing/src/fake_async.js +5 -3
  46. package/esm2015/testing/src/fake_async_fallback.js +5 -3
  47. package/esm2015/testing/src/logger.js +0 -7
  48. package/esm2015/testing/src/metadata_override.js +1 -1
  49. package/esm2015/testing/src/ng_zone_mock.js +0 -7
  50. package/esm2015/testing/src/test_bed.js +1 -34
  51. package/esm2015/testing/src/test_compiler.js +1 -12
  52. package/esm5/index.js +5 -1
  53. package/esm5/public_api.js +6 -1
  54. package/esm5/src/application_init.js +3 -5
  55. package/esm5/src/application_module.js +2 -2
  56. package/esm5/src/application_ref.js +35 -211
  57. package/esm5/src/application_tokens.js +1 -1
  58. package/esm5/src/change_detection/change_detection.js +1 -1
  59. package/esm5/src/change_detection/change_detection_util.js +7 -72
  60. package/esm5/src/change_detection/change_detector_ref.js +1 -1
  61. package/esm5/src/change_detection/constants.js +1 -24
  62. package/esm5/src/change_detection/differs/default_iterable_differ.js +26 -209
  63. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +7 -38
  64. package/esm5/src/change_detection/differs/iterable_differs.js +5 -42
  65. package/esm5/src/change_detection/differs/keyvalue_differs.js +6 -51
  66. package/esm5/src/change_detection/pipe_transform.js +1 -1
  67. package/esm5/src/change_detection.js +6 -1
  68. package/esm5/src/codegen_private_exports.js +1 -1
  69. package/esm5/src/console.js +2 -7
  70. package/esm5/src/core.js +6 -1
  71. package/esm5/src/core_private_export.js +1 -1
  72. package/esm5/src/core_render3_private_export.js +2 -1
  73. package/esm5/src/debug/debug_node.js +3 -15
  74. package/esm5/src/di/defs.js +1 -1
  75. package/esm5/src/di/forward_ref.js +7 -6
  76. package/esm5/src/di/injectable.js +2 -3
  77. package/esm5/src/di/injection_token.js +5 -83
  78. package/esm5/src/di/injector.js +13 -27
  79. package/esm5/src/di/metadata.js +1 -6
  80. package/esm5/src/di/provider.js +1 -1
  81. package/esm5/src/di/r3_injector.js +13 -39
  82. package/esm5/src/di/reflective_errors.js +14 -7
  83. package/esm5/src/di/reflective_injector.js +19 -265
  84. package/esm5/src/di/reflective_key.js +4 -45
  85. package/esm5/src/di/reflective_provider.js +17 -35
  86. package/esm5/src/di/scope.js +1 -1
  87. package/esm5/src/di.js +6 -1
  88. package/esm5/src/error_handler.js +7 -66
  89. package/esm5/src/errors.js +1 -1
  90. package/esm5/src/event_emitter.js +4 -95
  91. package/esm5/src/i18n/tokens.js +9 -49
  92. package/esm5/src/linker/compiler.js +9 -69
  93. package/esm5/src/linker/component_factory.js +2 -18
  94. package/esm5/src/linker/component_factory_resolver.js +1 -1
  95. package/esm5/src/linker/element_ref.js +2 -32
  96. package/esm5/src/linker/ng_module_factory.js +3 -25
  97. package/esm5/src/linker/ng_module_factory_loader.js +2 -10
  98. package/esm5/src/linker/query_list.js +12 -112
  99. package/esm5/src/linker/system_js_ng_module_factory_loader.js +4 -16
  100. package/esm5/src/linker/template_ref.js +2 -26
  101. package/esm5/src/linker/view_container_ref.js +2 -38
  102. package/esm5/src/linker/view_ref.js +10 -115
  103. package/esm5/src/linker.js +2 -1
  104. package/esm5/src/metadata/di.js +7 -25
  105. package/esm5/src/metadata/directives.js +111 -20
  106. package/esm5/src/metadata/lifecycle_hooks.js +1 -1
  107. package/esm5/src/metadata/ng_module.js +14 -9
  108. package/esm5/src/metadata/view.js +1 -20
  109. package/esm5/src/metadata.js +1 -1
  110. package/esm5/src/platform_core_providers.js +1 -1
  111. package/esm5/src/profile/profile.js +1 -1
  112. package/esm5/src/profile/wtf_impl.js +1 -1
  113. package/esm5/src/reflection/platform_reflection_capabilities.js +1 -1
  114. package/esm5/src/reflection/reflection.js +1 -1
  115. package/esm5/src/reflection/reflection_capabilities.js +3 -8
  116. package/esm5/src/reflection/reflector.js +2 -10
  117. package/esm5/src/reflection/types.js +1 -1
  118. package/esm5/src/render/api.js +7 -71
  119. package/esm5/src/render.js +2 -1
  120. package/esm5/src/render3/assert.js +1 -1
  121. package/esm5/src/render3/component.js +6 -5
  122. package/esm5/src/render3/definition.js +6 -8
  123. package/esm5/src/render3/di.js +9 -14
  124. package/esm5/src/render3/errors.js +1 -1
  125. package/esm5/src/render3/hooks.js +2 -2
  126. package/esm5/src/render3/index.js +11 -1
  127. package/esm5/src/render3/instructions.js +52 -38
  128. package/esm5/src/render3/interfaces/container.js +1 -1
  129. package/esm5/src/render3/interfaces/definition.js +1 -1
  130. package/esm5/src/render3/interfaces/injector.js +1 -1
  131. package/esm5/src/render3/interfaces/node.js +1 -1
  132. package/esm5/src/render3/interfaces/projection.js +1 -1
  133. package/esm5/src/render3/interfaces/query.js +1 -1
  134. package/esm5/src/render3/interfaces/renderer.js +1 -3
  135. package/esm5/src/render3/interfaces/view.js +1 -1
  136. package/esm5/src/render3/ng_dev_mode.js +1 -1
  137. package/esm5/src/render3/node_assert.js +1 -1
  138. package/esm5/src/render3/node_manipulation.js +12 -15
  139. package/esm5/src/render3/node_selector_matcher.js +2 -2
  140. package/esm5/src/render3/pipe.js +1 -1
  141. package/esm5/src/render3/pure_function.js +1 -1
  142. package/esm5/src/render3/query.js +11 -59
  143. package/esm5/src/render3/util.js +1 -1
  144. package/esm5/src/render3/view_ref.js +15 -345
  145. package/esm5/src/sanitization/html_sanitizer.js +8 -12
  146. package/esm5/src/sanitization/inert_body.js +8 -72
  147. package/esm5/src/sanitization/sanitization.js +1 -1
  148. package/esm5/src/sanitization/security.js +2 -37
  149. package/esm5/src/sanitization/style_sanitizer.js +1 -1
  150. package/esm5/src/sanitization/url_sanitizer.js +1 -1
  151. package/esm5/src/testability/testability.js +21 -143
  152. package/esm5/src/type.js +1 -1
  153. package/esm5/src/util/decorators.js +1 -1
  154. package/esm5/src/util/lang.js +1 -1
  155. package/esm5/src/util/property.js +1 -1
  156. package/esm5/src/util.js +6 -1
  157. package/esm5/src/version.js +3 -13
  158. package/esm5/src/view/element.js +7 -7
  159. package/esm5/src/view/entrypoint.js +1 -1
  160. package/esm5/src/view/errors.js +1 -1
  161. package/esm5/src/view/index.js +1 -1
  162. package/esm5/src/view/ng_content.js +1 -1
  163. package/esm5/src/view/ng_module.js +4 -1
  164. package/esm5/src/view/provider.js +12 -12
  165. package/esm5/src/view/pure_expression.js +1 -1
  166. package/esm5/src/view/query.js +6 -6
  167. package/esm5/src/view/refs.js +8 -14
  168. package/esm5/src/view/services.js +16 -20
  169. package/esm5/src/view/text.js +1 -1
  170. package/esm5/src/view/types.js +19 -41
  171. package/esm5/src/view/util.js +5 -5
  172. package/esm5/src/view/view.js +4 -6
  173. package/esm5/src/view/view_attach.js +5 -5
  174. package/esm5/src/zone/ng_zone.js +22 -257
  175. package/esm5/src/zone.js +2 -1
  176. package/esm5/testing/index.js +5 -1
  177. package/esm5/testing/public_api.js +6 -1
  178. package/esm5/testing/src/async.js +1 -1
  179. package/esm5/testing/src/async_fallback.js +1 -1
  180. package/esm5/testing/src/async_test_completer.js +2 -8
  181. package/esm5/testing/src/before_each.js +6 -1
  182. package/esm5/testing/src/component_fixture.js +9 -75
  183. package/esm5/testing/src/fake_async.js +12 -3
  184. package/esm5/testing/src/fake_async_fallback.js +5 -3
  185. package/esm5/testing/src/lang_utils.js +1 -1
  186. package/esm5/testing/src/logger.js +1 -1
  187. package/esm5/testing/src/metadata_override.js +1 -1
  188. package/esm5/testing/src/ng_zone_mock.js +1 -1
  189. package/esm5/testing/src/private_export_testing.js +1 -1
  190. package/esm5/testing/src/render3.js +1 -5
  191. package/esm5/testing/src/test_bed.js +20 -172
  192. package/esm5/testing/src/test_compiler.js +5 -43
  193. package/esm5/testing/src/testing.js +6 -1
  194. package/esm5/testing/src/testing_internal.js +3 -9
  195. package/fesm2015/core.js +248 -177
  196. package/fesm2015/core.js.map +1 -1
  197. package/fesm2015/testing.js +9 -13
  198. package/fesm2015/testing.js.map +1 -1
  199. package/fesm5/core.js +591 -2007
  200. package/fesm5/core.js.map +1 -1
  201. package/fesm5/testing.js +61 -237
  202. package/fesm5/testing.js.map +1 -1
  203. package/package.json +1 -1
  204. package/src/application_ref.d.ts +7 -8
  205. package/src/change_detection/change_detector_ref.d.ts +6 -4
  206. package/src/change_detection/differs/iterable_differs.d.ts +3 -2
  207. package/src/change_detection/differs/keyvalue_differs.d.ts +3 -2
  208. package/src/change_detection/pipe_transform.d.ts +2 -5
  209. package/src/di/forward_ref.d.ts +7 -5
  210. package/src/di/injectable.d.ts +4 -14
  211. package/src/di/injection_token.d.ts +5 -7
  212. package/src/di/injector.d.ts +7 -10
  213. package/src/di/metadata.d.ts +13 -86
  214. package/src/di/provider.d.ts +55 -150
  215. package/src/di/reflective_errors.d.ts +13 -6
  216. package/src/di/reflective_injector.d.ts +21 -23
  217. package/src/di/reflective_provider.d.ts +7 -8
  218. package/src/error_handler.d.ts +1 -4
  219. package/src/event_emitter.d.ts +3 -0
  220. package/src/i18n/tokens.d.ts +8 -4
  221. package/src/linker/query_list.d.ts +2 -2
  222. package/src/linker/view_ref.d.ts +9 -6
  223. package/src/metadata/di.d.ts +41 -59
  224. package/src/metadata/directives.d.ts +410 -460
  225. package/src/metadata/lifecycle_hooks.d.ts +8 -8
  226. package/src/metadata/ng_module.d.ts +49 -38
  227. package/src/render3/view_ref.d.ts +6 -2
  228. package/src/zone/ng_zone.d.ts +1 -0
  229. package/testing/src/fake_async.d.ts +4 -2
  230. package/testing/src/fake_async_fallback.d.ts +4 -2
  231. package/testing/src/metadata_override.d.ts +3 -3
  232. package/testing.d.ts +0 -5
  233. package/testing.metadata.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v6.0.3
2
+ * @license Angular v6.0.7
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -415,7 +415,8 @@ let _inFakeAsyncCall = false;
415
415
  *
416
416
  * Can be used to wrap inject() calls.
417
417
  *
418
- * ## Example
418
+ * \@usageNotes
419
+ * ### Example
419
420
  *
420
421
  * {\@example core/testing/ts/fake_async.ts region='basic'}
421
422
  *
@@ -479,7 +480,8 @@ function _getFakeAsyncZoneSpec() {
479
480
  * The microtasks queue is drained at the very start of this function and after any timer callback
480
481
  * has been executed.
481
482
  *
482
- * ## Example
483
+ * \@usageNotes
484
+ * ### Example
483
485
  *
484
486
  * {\@example core/testing/ts/fake_async.ts region='basic'}
485
487
  *
@@ -554,7 +556,8 @@ function resetFakeAsyncZone() {
554
556
  *
555
557
  * Can be used to wrap inject() calls.
556
558
  *
557
- * ## Example
559
+ * \@usageNotes
560
+ * ### Example
558
561
  *
559
562
  * {\@example core/testing/ts/fake_async.ts region='basic'}
560
563
  *
@@ -577,7 +580,8 @@ function fakeAsync(fn) {
577
580
  * The microtasks queue is drained at the very start of this function and after any timer callback
578
581
  * has been executed.
579
582
  *
580
- * ## Example
583
+ * \@usageNotes
584
+ * ### Example
581
585
  *
582
586
  * {\@example core/testing/ts/fake_async.ts region='basic'}
583
587
  *
@@ -764,8 +768,6 @@ class TestingCompiler extends Compiler {
764
768
  TestingCompiler.decorators = [
765
769
  { type: Injectable }
766
770
  ];
767
- /** @nocollapse */
768
- TestingCompiler.ctorParameters = () => [];
769
771
  /**
770
772
  * A factory for creating a Compiler
771
773
  *
@@ -1172,8 +1174,6 @@ class TestBed {
1172
1174
  ],
1173
1175
  },] },
1174
1176
  ];
1175
- /** @nocollapse */
1176
- RootScopeModule.ctorParameters = () => [];
1177
1177
  rootScopeImports.push(RootScopeModule);
1178
1178
  }
1179
1179
  providers.push({ provide: ɵAPP_ROOT, useValue: this._isRoot });
@@ -1184,8 +1184,6 @@ class TestBed {
1184
1184
  DynamicTestModule.decorators = [
1185
1185
  { type: NgModule, args: [{ providers, declarations, imports, schemas },] },
1186
1186
  ];
1187
- /** @nocollapse */
1188
- DynamicTestModule.ctorParameters = () => [];
1189
1187
  const /** @type {?} */ compilerFactory = this.platform.injector.get(TestingCompilerFactory);
1190
1188
  this._compiler = compilerFactory.createTestingCompiler(this._compilerOptions);
1191
1189
  for (const /** @type {?} */ summary of [this._testEnvAotSummaries, ...this._aotSummaries]) {
@@ -1347,8 +1345,6 @@ class TestBed {
1347
1345
  OverrideComponent.decorators = [
1348
1346
  { type: Component, args: [{ selector: 'empty', template },] },
1349
1347
  ];
1350
- /** @nocollapse */
1351
- OverrideComponent.ctorParameters = () => [];
1352
1348
  this._templateOverrides.push({ component, templateOf: OverrideComponent });
1353
1349
  }
1354
1350
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","sources":["../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/async_fallback.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/async.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/component_fixture.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/fake_async_fallback.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/fake_async.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/async_test_completer.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/test_compiler.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/test_bed.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/before_each.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/render3.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/public_api.ts","../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/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 * ## 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 * ## 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 const pendingTimers = zoneSpec.pendingPeriodicTimers;\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 * @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 * ## 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 * ## 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 private _resolve: (result: any) => void;\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 })\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})\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})\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\n/**\n* Wraps a function in a new function which sets up document and HTML for running a test.\n*\n* This function is intended to wrap an existing testing function. The wrapper\n* adds HTML to the `body` element of the `document` and subsequently tears it down.\n*\n* This function is intended to be used with `async await` and `Promise`s. If the wrapped\n* function returns a promise (or is `async`) then the teardown is delayed until that `Promise`\n* is resolved.\n*\n* On `node` this function detects if `document` is present and if not it will create one by\n* loading `domino` and installing it.\n*\n* Example:\n*\n* ```\n* describe('something', () => {\n* it('should do something', withBody('<my-app></my-app>', async () => {\n* const myApp = renderComponent(MyApp);\n* await whenRendered(myApp);\n* expect(getRenderedText(myApp)).toEqual('Hello World!');\n* }));\n* });\n* ```\n*\n* @param html HTML which should be inserted into `body` of the `document`.\n* @param blockFn function to wrap. The function can return promise or be `async`.\n* @experimental\n*/\nexport function withBody<T>(html: string, blockFn: T): T {\n return function(done: {(): void, fail(): void}) {\n ensureDocument();\n let returnValue: any = undefined;\n if (typeof blockFn === 'function') {\n document.body.innerHTML = html;\n // TODO(i): I'm not sure why a cast is required here but otherwise I get\n // TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'never' has\n // no compatible call signatures.\n let blockReturn = (blockFn as any)();\n if (blockReturn instanceof Promise) {\n blockReturn = blockReturn.then(done, done.fail);\n } else {\n done();\n }\n }\n } as any;\n}\n\nlet savedDocument: Document|undefined = undefined;\nlet savedRequestAnimationFrame: ((callback: FrameRequestCallback) => number)|undefined = undefined;\nlet savedNode: typeof Node|undefined = undefined;\nlet requestAnimationFrameCount = 0;\n\n/**\n * System.js uses regexp to look for `require` statements. `domino` has to be\n * extracted into a constant so that the regexp in the System.js does not match\n * and does not try to load domino in the browser.\n */\nconst domino: any = (function(domino) {\n if (typeof global == 'object' && global.process && typeof require == 'function') {\n try {\n return require(domino);\n } catch (e) {\n // It is possible that we don't have domino available in which case just give up.\n }\n }\n // Seems like we don't have domino, give up.\n return null;\n})('domino');\n\n/**\n * Ensure that global has `Document` if we are in node.js\n * @experimental\n */\nexport function ensureDocument(): void {\n if (domino) {\n // we are in node.js.\n const window = domino.createWindow('', 'http://localhost');\n savedDocument = (global as any).document;\n (global as any).window = window;\n (global as any).document = window.document;\n // Trick to avoid Event patching from\n // https://github.com/angular/angular/blob/7cf5e95ac9f0f2648beebf0d5bd9056b79946970/packages/platform-browser/src/dom/events/dom_events.ts#L112-L132\n // It fails with Domino with TypeError: Cannot assign to read only property\n // 'stopImmediatePropagation' of object '#<Event>'\n (global as any).Event = null;\n savedNode = (global as any).Node;\n (global as any).Node = domino.impl.Node;\n\n savedRequestAnimationFrame = (global as any).requestAnimationFrame;\n (global as any).requestAnimationFrame = function(cb: FrameRequestCallback): number {\n setImmediate(cb);\n return requestAnimationFrameCount++;\n };\n }\n}\n\n/**\n * Restore the state of `Document` between tests.\n * @experimental\n */\nexport function cleanupDocument(): void {\n if (savedDocument) {\n (global as any).document = savedDocument;\n (global as any).window = undefined;\n savedDocument = undefined;\n }\n if (savedNode) {\n (global as any).Node = savedNode;\n savedNode = undefined;\n }\n if (savedRequestAnimationFrame) {\n (global as any).requestAnimationFrame = savedRequestAnimationFrame;\n savedRequestAnimationFrame = undefined;\n }\n}\n\nif (typeof beforeEach == 'function') beforeEach(ensureDocument);\nif (typeof afterEach == 'function') beforeEach(cleanupDocument);","/**\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 this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_Zone","clearOverrides","stringify","overrideComponentView","APP_ROOT","overrideProvider","_global"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,OAAO,sBAAS,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,EAAC,CAAC;;;;;;;;;;;;;;;;;;;;AAmBvE,uBAA8B,EAAY;;;IAGxC,IAAI,OAAO,CAAC,OAAO,EAAE;;QAEnB,OAAO,UAAS,IAAS;YACvB,IAAI,CAAC,IAAI,EAAE;;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AAChE,IAAI,OAAO,SAAS,IAAI,UAAU;IAAE,UAAU,CAAC,eAAe,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjHhE,AAA8B;;;;;;;;;;;;;;;;;;;ACb9B;;GAEG;;;;"}
1
+ {"version":3,"file":"testing.js","sources":["../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/async_fallback.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/async.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/component_fixture.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/fake_async_fallback.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/fake_async.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/async_test_completer.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/test_compiler.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/test_bed.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/before_each.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/src/render3.ts","../../../../../../../../../../../execroot/angular/bazel-out/darwin-fastbuild/bin/packages/core/testing/public_api.ts","../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 const pendingTimers = zoneSpec.pendingPeriodicTimers;\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 * @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 private _resolve: (result: any) => void;\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 })\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})\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})\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\n/**\n* Wraps a function in a new function which sets up document and HTML for running a test.\n*\n* This function is intended to wrap an existing testing function. The wrapper\n* adds HTML to the `body` element of the `document` and subsequently tears it down.\n*\n* This function is intended to be used with `async await` and `Promise`s. If the wrapped\n* function returns a promise (or is `async`) then the teardown is delayed until that `Promise`\n* is resolved.\n*\n* On `node` this function detects if `document` is present and if not it will create one by\n* loading `domino` and installing it.\n*\n* Example:\n*\n* ```\n* describe('something', () => {\n* it('should do something', withBody('<my-app></my-app>', async () => {\n* const myApp = renderComponent(MyApp);\n* await whenRendered(myApp);\n* expect(getRenderedText(myApp)).toEqual('Hello World!');\n* }));\n* });\n* ```\n*\n* @param html HTML which should be inserted into `body` of the `document`.\n* @param blockFn function to wrap. The function can return promise or be `async`.\n* @experimental\n*/\nexport function withBody<T>(html: string, blockFn: T): T {\n return function(done: {(): void, fail(): void}) {\n ensureDocument();\n let returnValue: any = undefined;\n if (typeof blockFn === 'function') {\n document.body.innerHTML = html;\n // TODO(i): I'm not sure why a cast is required here but otherwise I get\n // TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'never' has\n // no compatible call signatures.\n let blockReturn = (blockFn as any)();\n if (blockReturn instanceof Promise) {\n blockReturn = blockReturn.then(done, done.fail);\n } else {\n done();\n }\n }\n } as any;\n}\n\nlet savedDocument: Document|undefined = undefined;\nlet savedRequestAnimationFrame: ((callback: FrameRequestCallback) => number)|undefined = undefined;\nlet savedNode: typeof Node|undefined = undefined;\nlet requestAnimationFrameCount = 0;\n\n/**\n * System.js uses regexp to look for `require` statements. `domino` has to be\n * extracted into a constant so that the regexp in the System.js does not match\n * and does not try to load domino in the browser.\n */\nconst domino: any = (function(domino) {\n if (typeof global == 'object' && global.process && typeof require == 'function') {\n try {\n return require(domino);\n } catch (e) {\n // It is possible that we don't have domino available in which case just give up.\n }\n }\n // Seems like we don't have domino, give up.\n return null;\n})('domino');\n\n/**\n * Ensure that global has `Document` if we are in node.js\n * @experimental\n */\nexport function ensureDocument(): void {\n if (domino) {\n // we are in node.js.\n const window = domino.createWindow('', 'http://localhost');\n savedDocument = (global as any).document;\n (global as any).window = window;\n (global as any).document = window.document;\n // Trick to avoid Event patching from\n // https://github.com/angular/angular/blob/7cf5e95ac9f0f2648beebf0d5bd9056b79946970/packages/platform-browser/src/dom/events/dom_events.ts#L112-L132\n // It fails with Domino with TypeError: Cannot assign to read only property\n // 'stopImmediatePropagation' of object '#<Event>'\n (global as any).Event = null;\n savedNode = (global as any).Node;\n (global as any).Node = domino.impl.Node;\n\n savedRequestAnimationFrame = (global as any).requestAnimationFrame;\n (global as any).requestAnimationFrame = function(cb: FrameRequestCallback): number {\n setImmediate(cb);\n return requestAnimationFrameCount++;\n };\n }\n}\n\n/**\n * Restore the state of `Document` between tests.\n * @experimental\n */\nexport function cleanupDocument(): void {\n if (savedDocument) {\n (global as any).document = savedDocument;\n (global as any).window = undefined;\n savedDocument = undefined;\n }\n if (savedNode) {\n (global as any).Node = savedNode;\n savedNode = undefined;\n }\n if (savedRequestAnimationFrame) {\n (global as any).requestAnimationFrame = savedRequestAnimationFrame;\n savedRequestAnimationFrame = undefined;\n }\n}\n\nif (typeof beforeEach == 'function') beforeEach(ensureDocument);\nif (typeof afterEach == 'function') beforeEach(cleanupDocument);","/**\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 this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_Zone","clearOverrides","stringify","overrideComponentView","APP_ROOT","overrideProvider","_global"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,OAAO,sBAAS,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,EAAC,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,CAAC,GAAQ;gBACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;oBAC3B,OAAO,IAAI,CAAC,IAAI,CA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