@angular/core 2.0.0-rc.1 → 2.0.0-rc.2
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.
- package/{core.umd.js → bundles/core.umd.js} +6402 -4606
- package/bundles/core.umd.min.js +6 -0
- package/esm/index.d.ts +5 -4
- package/esm/index.js +9 -8
- package/esm/index.js.map +1 -1
- package/esm/private_export.d.ts +96 -11
- package/esm/private_export.js +39 -10
- package/esm/private_export.js.map +1 -1
- package/esm/private_export.metadata.json +1 -1
- package/esm/src/animation/active_animation_players_map.d.ts +11 -0
- package/esm/src/animation/active_animation_players_map.js +47 -0
- package/esm/src/animation/active_animation_players_map.js.map +1 -0
- package/esm/src/animation/animation_constants.d.ts +4 -0
- package/esm/src/animation/animation_constants.js +5 -0
- package/esm/src/animation/animation_constants.js.map +1 -0
- package/esm/src/animation/animation_constants.metadata.json +1 -0
- package/esm/src/animation/animation_driver.d.ts +9 -0
- package/esm/src/animation/animation_driver.js +9 -0
- package/esm/src/animation/animation_driver.js.map +1 -0
- package/esm/src/animation/animation_group_player.d.ts +18 -0
- package/esm/src/animation/animation_group_player.js +60 -0
- package/esm/src/animation/animation_group_player.js.map +1 -0
- package/esm/src/animation/animation_keyframe.d.ts +6 -0
- package/esm/src/animation/animation_keyframe.js +7 -0
- package/esm/src/animation/animation_keyframe.js.map +1 -0
- package/esm/src/animation/animation_player.d.ts +26 -0
- package/esm/src/animation/animation_player.js +30 -0
- package/esm/src/animation/animation_player.js.map +1 -0
- package/esm/src/animation/animation_sequence_player.d.ts +21 -0
- package/esm/src/animation/animation_sequence_player.js +64 -0
- package/esm/src/animation/animation_sequence_player.js.map +1 -0
- package/esm/src/animation/animation_style_util.d.ts +32 -0
- package/esm/src/animation/animation_style_util.js +91 -0
- package/esm/src/animation/animation_style_util.js.map +1 -0
- package/esm/src/animation/animation_style_util.metadata.json +1 -0
- package/esm/src/animation/animation_styles.d.ts +8 -0
- package/esm/src/animation/animation_styles.js +6 -0
- package/esm/src/animation/animation_styles.js.map +1 -0
- package/esm/src/animation/metadata.d.ts +511 -0
- package/esm/src/animation/metadata.js +565 -0
- package/esm/src/animation/metadata.js.map +1 -0
- package/esm/src/animation/metadata.metadata.json +1 -0
- package/esm/src/application_common_providers.d.ts +1 -0
- package/esm/src/application_common_providers.js +5 -4
- package/esm/src/application_common_providers.js.map +1 -1
- package/esm/src/application_common_providers.metadata.json +1 -1
- package/esm/src/application_ref.d.ts +17 -41
- package/esm/src/application_ref.js +32 -23
- package/esm/src/application_ref.js.map +1 -1
- package/esm/src/application_ref.metadata.json +1 -1
- package/esm/src/application_tokens.d.ts +6 -1
- package/esm/src/application_tokens.js +9 -4
- package/esm/src/application_tokens.js.map +1 -1
- package/esm/src/application_tokens.metadata.json +1 -1
- package/esm/src/change_detection/change_detection.d.ts +9 -8
- package/esm/src/change_detection/change_detection.js +7 -7
- package/esm/src/change_detection/change_detection.js.map +1 -1
- package/esm/src/change_detection/change_detection.metadata.json +1 -1
- package/esm/src/change_detection/change_detection_util.d.ts +3 -1
- package/esm/src/change_detection/change_detection_util.js +6 -5
- package/esm/src/change_detection/change_detection_util.js.map +1 -1
- package/esm/src/change_detection/change_detection_util.metadata.json +1 -1
- package/esm/src/change_detection/change_detector_ref.d.ts +3 -0
- package/esm/src/change_detection/change_detector_ref.js +3 -0
- package/esm/src/change_detection/change_detector_ref.js.map +1 -1
- package/esm/src/change_detection/constants.d.ts +1 -0
- package/esm/src/change_detection/constants.js +4 -3
- package/esm/src/change_detection/constants.js.map +1 -1
- package/esm/src/change_detection/constants.metadata.json +1 -1
- package/esm/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
- package/esm/src/change_detection/differs/default_iterable_differ.js +25 -18
- package/esm/src/change_detection/differs/default_iterable_differ.js.map +1 -1
- package/esm/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
- package/esm/src/change_detection/differs/default_keyvalue_differ.js +13 -8
- package/esm/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
- package/esm/src/change_detection/differs/iterable_differs.d.ts +4 -1
- package/esm/src/change_detection/differs/iterable_differs.js +5 -4
- package/esm/src/change_detection/differs/iterable_differs.js.map +1 -1
- package/esm/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
- package/esm/src/change_detection/differs/keyvalue_differs.js +5 -4
- package/esm/src/change_detection/differs/keyvalue_differs.js.map +1 -1
- package/esm/src/change_detection/pipe_transform.js.map +1 -1
- package/esm/src/change_detection.d.ts +1 -1
- package/esm/src/change_detection.js +5 -5
- package/esm/src/change_detection.js.map +1 -1
- package/esm/src/console.js +2 -1
- package/esm/src/console.js.map +1 -1
- package/esm/src/console.metadata.json +1 -1
- package/esm/src/debug/debug_node.d.ts +20 -2
- package/esm/src/debug/debug_node.js +16 -2
- package/esm/src/debug/debug_node.js.map +1 -1
- package/esm/src/debug/debug_node.metadata.json +1 -0
- package/esm/src/debug/debug_renderer.d.ts +10 -6
- package/esm/src/debug/debug_renderer.js +13 -2
- package/esm/src/debug/debug_renderer.js.map +1 -1
- package/esm/src/di/decorators.d.ts +13 -1
- package/esm/src/di/decorators.js +7 -1
- package/esm/src/di/decorators.js.map +1 -1
- package/esm/src/di/decorators.metadata.json +1 -1
- package/esm/src/di/forward_ref.d.ts +3 -1
- package/esm/src/di/forward_ref.js +3 -1
- package/esm/src/di/forward_ref.js.map +1 -1
- package/esm/src/di/injector.d.ts +4 -1
- package/esm/src/di/injector.js +5 -2
- package/esm/src/di/injector.js.map +1 -1
- package/esm/src/di/injector.metadata.json +1 -1
- package/esm/src/di/metadata.d.ts +8 -1
- package/esm/src/di/metadata.js +10 -3
- package/esm/src/di/metadata.js.map +1 -1
- package/esm/src/di/opaque_token.d.ts +2 -1
- package/esm/src/di/opaque_token.js +22 -21
- package/esm/src/di/opaque_token.js.map +1 -1
- package/esm/src/di/provider.d.ts +11 -10
- package/esm/src/di/provider.js +17 -14
- package/esm/src/di/provider.js.map +1 -1
- package/esm/src/di/provider.metadata.json +1 -0
- package/esm/src/di/provider_util.js.map +1 -1
- package/esm/src/di/provider_util.metadata.json +1 -0
- package/esm/src/di/reflective_exceptions.d.ts +11 -16
- package/esm/src/di/reflective_exceptions.js +28 -22
- package/esm/src/di/reflective_exceptions.js.map +1 -1
- package/esm/src/di/reflective_injector.d.ts +3 -33
- package/esm/src/di/reflective_injector.js +10 -7
- package/esm/src/di/reflective_injector.js.map +1 -1
- package/esm/src/di/reflective_key.d.ts +1 -8
- package/esm/src/di/reflective_key.js +3 -2
- package/esm/src/di/reflective_key.js.map +1 -1
- package/esm/src/di/reflective_provider.d.ts +2 -1
- package/esm/src/di/reflective_provider.js +6 -5
- package/esm/src/di/reflective_provider.js.map +1 -1
- package/esm/src/di/reflective_provider.metadata.json +1 -0
- package/esm/src/di.d.ts +2 -2
- package/esm/src/di.js +6 -6
- package/esm/src/di.js.map +1 -1
- package/esm/src/facade/async.d.ts +11 -4
- package/esm/src/facade/async.js +25 -15
- package/esm/src/facade/async.js.map +1 -1
- package/esm/src/facade/base_wrapped_exception.js +4 -4
- package/esm/src/facade/base_wrapped_exception.js.map +1 -1
- package/esm/src/facade/collection.js +1 -1
- package/esm/src/facade/collection.js.map +1 -1
- package/esm/src/facade/collection.metadata.json +1 -1
- package/esm/src/facade/exception_handler.d.ts +2 -11
- package/esm/src/facade/exception_handler.js +8 -7
- package/esm/src/facade/exception_handler.js.map +1 -1
- package/esm/src/facade/exceptions.d.ts +4 -0
- package/esm/src/facade/exceptions.js +6 -2
- package/esm/src/facade/exceptions.js.map +1 -1
- package/esm/src/facade/exceptions.metadata.json +1 -0
- package/esm/src/facade/lang.d.ts +6 -4
- package/esm/src/facade/lang.js +12 -11
- package/esm/src/facade/lang.js.map +1 -1
- package/esm/src/facade/lang.metadata.json +1 -1
- package/esm/src/facade/math.d.ts +2 -0
- package/esm/src/facade/math.js +4 -0
- package/esm/src/facade/math.js.map +1 -0
- package/esm/src/facade/math.metadata.json +1 -0
- package/esm/src/facade/promise.js.map +1 -1
- package/esm/src/linker/component_factory.d.ts +5 -4
- package/esm/src/linker/component_factory.js +7 -3
- package/esm/src/linker/component_factory.js.map +1 -1
- package/esm/src/linker/component_resolver.d.ts +5 -4
- package/esm/src/linker/component_resolver.js +12 -7
- package/esm/src/linker/component_resolver.js.map +1 -1
- package/esm/src/linker/component_resolver.metadata.json +1 -1
- package/esm/src/linker/debug_context.js +5 -4
- package/esm/src/linker/debug_context.js.map +1 -1
- package/esm/src/linker/dynamic_component_loader.d.ts +5 -6
- package/esm/src/linker/dynamic_component_loader.js +5 -3
- package/esm/src/linker/dynamic_component_loader.js.map +1 -1
- package/esm/src/linker/dynamic_component_loader.metadata.json +1 -1
- package/esm/src/linker/element.d.ts +3 -3
- package/esm/src/linker/element.js +5 -5
- package/esm/src/linker/element.js.map +1 -1
- package/esm/src/linker/element_injector.js.map +1 -1
- package/esm/src/linker/element_ref.d.ts +1 -0
- package/esm/src/linker/element_ref.js +5 -5
- package/esm/src/linker/element_ref.js.map +1 -1
- package/esm/src/linker/exceptions.d.ts +4 -1
- package/esm/src/linker/exceptions.js +4 -1
- package/esm/src/linker/exceptions.js.map +1 -1
- package/esm/src/linker/query_list.d.ts +3 -10
- package/esm/src/linker/query_list.js +8 -7
- package/esm/src/linker/query_list.js.map +1 -1
- package/esm/src/linker/systemjs_component_resolver.d.ts +21 -0
- package/esm/src/linker/systemjs_component_resolver.js +44 -0
- package/esm/src/linker/systemjs_component_resolver.js.map +1 -0
- package/esm/src/linker/template_ref.d.ts +2 -1
- package/esm/src/linker/template_ref.js +1 -0
- package/esm/src/linker/template_ref.js.map +1 -1
- package/esm/src/linker/view.d.ts +12 -1
- package/esm/src/linker/view.js +62 -16
- package/esm/src/linker/view.js.map +1 -1
- package/esm/src/linker/view_container_ref.d.ts +2 -10
- package/esm/src/linker/view_container_ref.js +4 -3
- package/esm/src/linker/view_container_ref.js.map +1 -1
- package/esm/src/linker/view_ref.d.ts +5 -1
- package/esm/src/linker/view_ref.js +6 -2
- package/esm/src/linker/view_ref.js.map +1 -1
- package/esm/src/linker/view_type.js.map +1 -1
- package/esm/src/linker/view_utils.d.ts +2 -4
- package/esm/src/linker/view_utils.js +21 -21
- package/esm/src/linker/view_utils.js.map +1 -1
- package/esm/src/linker/view_utils.metadata.json +1 -1
- package/esm/src/linker.d.ts +5 -4
- package/esm/src/linker.js +5 -4
- package/esm/src/linker.js.map +1 -1
- package/esm/src/metadata/di.d.ts +8 -1
- package/esm/src/metadata/di.js +10 -3
- package/esm/src/metadata/di.js.map +1 -1
- package/esm/src/metadata/directives.d.ts +104 -20
- package/esm/src/metadata/directives.js +25 -19
- package/esm/src/metadata/directives.js.map +1 -1
- package/esm/src/metadata/lifecycle_hooks.d.ts +46 -31
- package/esm/src/metadata/lifecycle_hooks.js +464 -10
- package/esm/src/metadata/lifecycle_hooks.js.map +1 -1
- package/esm/src/metadata/lifecycle_hooks.metadata.json +1 -1
- package/esm/src/metadata/view.d.ts +6 -2
- package/esm/src/metadata/view.js +3 -1
- package/esm/src/metadata/view.js.map +1 -1
- package/esm/src/metadata/view.metadata.json +1 -1
- package/esm/src/metadata.d.ts +49 -15
- package/esm/src/metadata.js +35 -10
- package/esm/src/metadata.js.map +1 -1
- package/esm/src/metadata.metadata.json +1 -1
- package/esm/src/platform_common_providers.d.ts +1 -0
- package/esm/src/platform_common_providers.js +3 -3
- package/esm/src/platform_common_providers.js.map +1 -1
- package/esm/src/platform_common_providers.metadata.json +1 -1
- package/esm/src/platform_directives_and_pipes.d.ts +48 -45
- package/esm/src/platform_directives_and_pipes.js +50 -47
- package/esm/src/platform_directives_and_pipes.js.map +1 -1
- package/esm/src/platform_directives_and_pipes.metadata.json +1 -1
- package/esm/src/profile/profile.d.ts +5 -1
- package/esm/src/profile/profile.js +4 -0
- package/esm/src/profile/profile.js.map +1 -1
- package/esm/src/profile/profile.metadata.json +1 -1
- package/esm/src/profile/wtf_impl.js +1 -1
- package/esm/src/profile/wtf_impl.js.map +1 -1
- package/esm/src/profile/wtf_impl.metadata.json +1 -0
- package/esm/src/profile/wtf_init.js +2 -2
- package/esm/src/profile/wtf_init.js.map +1 -1
- package/esm/src/reflection/platform_reflection_capabilities.d.ts +4 -3
- package/esm/src/reflection/platform_reflection_capabilities.js.map +1 -1
- package/esm/src/reflection/reflection.d.ts +1 -1
- package/esm/src/reflection/reflection.js +2 -2
- package/esm/src/reflection/reflection.js.map +1 -1
- package/esm/src/reflection/reflection.metadata.json +1 -1
- package/esm/src/reflection/reflection_capabilities.d.ts +4 -5
- package/esm/src/reflection/reflection_capabilities.js +22 -10
- package/esm/src/reflection/reflection_capabilities.js.map +1 -1
- package/esm/src/reflection/reflector.d.ts +8 -20
- package/esm/src/reflection/reflector.js +13 -3
- package/esm/src/reflection/reflector.js.map +1 -1
- package/esm/src/reflection/reflector_reader.js +3 -3
- package/esm/src/reflection/reflector_reader.js.map +1 -1
- package/esm/src/reflection/types.js.map +1 -1
- package/esm/src/render/api.d.ts +17 -6
- package/esm/src/render/api.js +8 -1
- package/esm/src/render/api.js.map +1 -1
- package/esm/src/render.d.ts +1 -1
- package/esm/src/render.js +1 -1
- package/esm/src/render.js.map +1 -1
- package/esm/src/security.js +6 -6
- package/esm/src/security.js.map +1 -1
- package/esm/src/testability/testability.d.ts +3 -19
- package/esm/src/testability/testability.js +10 -5
- package/esm/src/testability/testability.js.map +1 -1
- package/esm/src/testability/testability.metadata.json +1 -1
- package/esm/src/util/decorators.d.ts +2 -1
- package/esm/src/util/decorators.js +10 -9
- package/esm/src/util/decorators.js.map +1 -1
- package/esm/src/util.js.map +1 -1
- package/esm/src/zone/ng_zone.d.ts +6 -17
- package/esm/src/zone/ng_zone.js +7 -6
- package/esm/src/zone/ng_zone.js.map +1 -1
- package/esm/src/zone/ng_zone_impl.d.ts +1 -4
- package/esm/src/zone/ng_zone_impl.js +3 -2
- package/esm/src/zone/ng_zone_impl.js.map +1 -1
- package/esm/src/zone.js.map +1 -1
- package/esm/testing/async.js +20 -22
- package/esm/testing/async.js.map +1 -1
- package/esm/testing/async.metadata.json +1 -0
- package/esm/testing/async_test_completer.js.map +1 -1
- package/esm/testing/fake_async.d.ts +4 -1
- package/esm/testing/fake_async.js +9 -2
- package/esm/testing/fake_async.js.map +1 -1
- package/esm/testing/lang_utils.js +1 -1
- package/esm/testing/lang_utils.js.map +1 -1
- package/esm/testing/lang_utils.metadata.json +1 -0
- package/esm/testing/logger.js +5 -3
- package/esm/testing/logger.js.map +1 -1
- package/esm/testing/logger.metadata.json +1 -1
- package/esm/testing/mock_application_ref.d.ts +1 -1
- package/esm/testing/mock_application_ref.js +1 -0
- package/esm/testing/mock_application_ref.js.map +1 -1
- package/esm/testing/mock_application_ref.metadata.json +1 -1
- package/esm/testing/ng_zone_mock.d.ts +0 -1
- package/esm/testing/ng_zone_mock.js +2 -1
- package/esm/testing/ng_zone_mock.js.map +1 -1
- package/esm/testing/ng_zone_mock.metadata.json +1 -1
- package/esm/testing/regexp.js +1 -1
- package/esm/testing/regexp.js.map +1 -1
- package/esm/testing/regexp.metadata.json +1 -0
- package/esm/testing/test_injector.d.ts +6 -12
- package/esm/testing/test_injector.js +4 -10
- package/esm/testing/test_injector.js.map +1 -1
- package/esm/testing/test_injector.metadata.json +1 -0
- package/esm/testing/testing.d.ts +2 -2
- package/esm/testing/testing.js +2 -2
- package/esm/testing/testing.js.map +1 -1
- package/esm/testing/testing.metadata.json +1 -1
- package/esm/testing.js.map +1 -1
- package/index.d.ts +5 -4
- package/index.js +10 -8
- package/index.js.map +1 -1
- package/package.json +5 -1
- package/private_export.d.ts +96 -11
- package/private_export.js +39 -10
- package/private_export.js.map +1 -1
- package/private_export.metadata.json +1 -1
- package/src/animation/active_animation_players_map.d.ts +11 -0
- package/src/animation/active_animation_players_map.js +54 -0
- package/src/animation/active_animation_players_map.js.map +1 -0
- package/src/animation/animation_constants.d.ts +4 -0
- package/src/animation/animation_constants.js +6 -0
- package/src/animation/animation_constants.js.map +1 -0
- package/src/animation/animation_constants.metadata.json +1 -0
- package/src/animation/animation_driver.d.ts +9 -0
- package/src/animation/animation_driver.js +25 -0
- package/src/animation/animation_driver.js.map +1 -0
- package/src/animation/animation_group_player.d.ts +18 -0
- package/src/animation/animation_group_player.js +64 -0
- package/src/animation/animation_group_player.js.map +1 -0
- package/src/animation/animation_keyframe.d.ts +6 -0
- package/src/animation/animation_keyframe.js +10 -0
- package/src/animation/animation_keyframe.js.map +1 -0
- package/src/animation/animation_player.d.ts +26 -0
- package/src/animation/animation_player.js +42 -0
- package/src/animation/animation_player.js.map +1 -0
- package/src/animation/animation_sequence_player.d.ts +21 -0
- package/src/animation/animation_sequence_player.js +69 -0
- package/src/animation/animation_sequence_player.js.map +1 -0
- package/src/animation/animation_style_util.d.ts +32 -0
- package/src/animation/animation_style_util.js +99 -0
- package/src/animation/animation_style_util.js.map +1 -0
- package/src/animation/animation_style_util.metadata.json +1 -0
- package/src/animation/animation_styles.d.ts +8 -0
- package/src/animation/animation_styles.js +9 -0
- package/src/animation/animation_styles.js.map +1 -0
- package/src/animation/metadata.d.ts +511 -0
- package/src/animation/metadata.js +627 -0
- package/src/animation/metadata.js.map +1 -0
- package/src/animation/metadata.metadata.json +1 -0
- package/src/application_common_providers.d.ts +1 -0
- package/src/application_common_providers.js +4 -3
- package/src/application_common_providers.js.map +1 -1
- package/src/application_common_providers.metadata.json +1 -1
- package/src/application_ref.d.ts +17 -41
- package/src/application_ref.js +30 -21
- package/src/application_ref.js.map +1 -1
- package/src/application_ref.metadata.json +1 -1
- package/src/application_tokens.d.ts +6 -1
- package/src/application_tokens.js +9 -4
- package/src/application_tokens.js.map +1 -1
- package/src/application_tokens.metadata.json +1 -1
- package/src/change_detection/change_detection.d.ts +9 -8
- package/src/change_detection/change_detection.js +21 -21
- package/src/change_detection/change_detection.js.map +1 -1
- package/src/change_detection/change_detection.metadata.json +1 -1
- package/src/change_detection/change_detection_util.d.ts +3 -1
- package/src/change_detection/change_detection_util.js +6 -5
- package/src/change_detection/change_detection_util.js.map +1 -1
- package/src/change_detection/change_detection_util.metadata.json +1 -1
- package/src/change_detection/change_detector_ref.d.ts +3 -0
- package/src/change_detection/change_detector_ref.js +3 -0
- package/src/change_detection/change_detector_ref.js.map +1 -1
- package/src/change_detection/constants.d.ts +1 -0
- package/src/change_detection/constants.js +4 -3
- package/src/change_detection/constants.js.map +1 -1
- package/src/change_detection/constants.metadata.json +1 -1
- package/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
- package/src/change_detection/differs/default_iterable_differ.js +25 -18
- package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
- package/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
- package/src/change_detection/differs/default_keyvalue_differ.js +13 -8
- package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
- package/src/change_detection/differs/iterable_differs.d.ts +4 -1
- package/src/change_detection/differs/iterable_differs.js +4 -3
- package/src/change_detection/differs/iterable_differs.js.map +1 -1
- package/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
- package/src/change_detection/differs/keyvalue_differs.js +4 -3
- package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
- package/src/change_detection/pipe_transform.js.map +1 -1
- package/src/change_detection.d.ts +1 -1
- package/src/change_detection.js +9 -9
- package/src/change_detection.js.map +1 -1
- package/src/console.js +2 -1
- package/src/console.js.map +1 -1
- package/src/console.metadata.json +1 -1
- package/src/debug/debug_node.d.ts +20 -2
- package/src/debug/debug_node.js +16 -2
- package/src/debug/debug_node.js.map +1 -1
- package/src/debug/debug_node.metadata.json +1 -0
- package/src/debug/debug_renderer.d.ts +10 -6
- package/src/debug/debug_renderer.js +12 -1
- package/src/debug/debug_renderer.js.map +1 -1
- package/src/di/decorators.d.ts +13 -1
- package/src/di/decorators.js +7 -1
- package/src/di/decorators.js.map +1 -1
- package/src/di/decorators.metadata.json +1 -1
- package/src/di/forward_ref.d.ts +3 -1
- package/src/di/forward_ref.js +3 -1
- package/src/di/forward_ref.js.map +1 -1
- package/src/di/injector.d.ts +4 -1
- package/src/di/injector.js +5 -2
- package/src/di/injector.js.map +1 -1
- package/src/di/injector.metadata.json +1 -1
- package/src/di/metadata.d.ts +8 -1
- package/src/di/metadata.js +10 -3
- package/src/di/metadata.js.map +1 -1
- package/src/di/opaque_token.d.ts +2 -1
- package/src/di/opaque_token.js +22 -21
- package/src/di/opaque_token.js.map +1 -1
- package/src/di/provider.d.ts +11 -10
- package/src/di/provider.js +17 -14
- package/src/di/provider.js.map +1 -1
- package/src/di/provider.metadata.json +1 -0
- package/src/di/provider_util.js.map +1 -1
- package/src/di/provider_util.metadata.json +1 -0
- package/src/di/reflective_exceptions.d.ts +11 -16
- package/src/di/reflective_exceptions.js +28 -22
- package/src/di/reflective_exceptions.js.map +1 -1
- package/src/di/reflective_injector.d.ts +3 -33
- package/src/di/reflective_injector.js +9 -6
- package/src/di/reflective_injector.js.map +1 -1
- package/src/di/reflective_key.d.ts +1 -8
- package/src/di/reflective_key.js +3 -2
- package/src/di/reflective_key.js.map +1 -1
- package/src/di/reflective_provider.d.ts +2 -1
- package/src/di/reflective_provider.js +6 -5
- package/src/di/reflective_provider.js.map +1 -1
- package/src/di/reflective_provider.metadata.json +1 -0
- package/src/di.d.ts +2 -2
- package/src/di.js +7 -9
- package/src/di.js.map +1 -1
- package/src/facade/async.d.ts +11 -4
- package/src/facade/async.js +27 -17
- package/src/facade/async.js.map +1 -1
- package/src/facade/base_wrapped_exception.js +4 -4
- package/src/facade/base_wrapped_exception.js.map +1 -1
- package/src/facade/collection.js.map +1 -1
- package/src/facade/collection.metadata.json +1 -1
- package/src/facade/exception_handler.d.ts +2 -11
- package/src/facade/exception_handler.js +8 -7
- package/src/facade/exception_handler.js.map +1 -1
- package/src/facade/exceptions.d.ts +4 -0
- package/src/facade/exceptions.js +6 -2
- package/src/facade/exceptions.js.map +1 -1
- package/src/facade/exceptions.metadata.json +1 -0
- package/src/facade/lang.d.ts +6 -4
- package/src/facade/lang.js +12 -11
- package/src/facade/lang.js.map +1 -1
- package/src/facade/lang.metadata.json +1 -1
- package/src/facade/math.d.ts +2 -0
- package/src/facade/math.js +5 -0
- package/src/facade/math.js.map +1 -0
- package/src/facade/math.metadata.json +1 -0
- package/src/facade/promise.js.map +1 -1
- package/src/linker/component_factory.d.ts +5 -4
- package/src/linker/component_factory.js +7 -3
- package/src/linker/component_factory.js.map +1 -1
- package/src/linker/component_resolver.d.ts +5 -4
- package/src/linker/component_resolver.js +12 -7
- package/src/linker/component_resolver.js.map +1 -1
- package/src/linker/component_resolver.metadata.json +1 -1
- package/src/linker/debug_context.js +5 -4
- package/src/linker/debug_context.js.map +1 -1
- package/src/linker/dynamic_component_loader.d.ts +5 -6
- package/src/linker/dynamic_component_loader.js +5 -3
- package/src/linker/dynamic_component_loader.js.map +1 -1
- package/src/linker/dynamic_component_loader.metadata.json +1 -1
- package/src/linker/element.d.ts +3 -3
- package/src/linker/element.js +5 -5
- package/src/linker/element.js.map +1 -1
- package/src/linker/element_injector.js.map +1 -1
- package/src/linker/element_ref.d.ts +1 -0
- package/src/linker/element_ref.js +5 -5
- package/src/linker/element_ref.js.map +1 -1
- package/src/linker/exceptions.d.ts +4 -1
- package/src/linker/exceptions.js +4 -1
- package/src/linker/exceptions.js.map +1 -1
- package/src/linker/query_list.d.ts +3 -10
- package/src/linker/query_list.js +8 -7
- package/src/linker/query_list.js.map +1 -1
- package/src/linker/systemjs_component_resolver.d.ts +21 -0
- package/src/linker/systemjs_component_resolver.js +52 -0
- package/src/linker/systemjs_component_resolver.js.map +1 -0
- package/src/linker/template_ref.d.ts +2 -1
- package/src/linker/template_ref.js +1 -0
- package/src/linker/template_ref.js.map +1 -1
- package/src/linker/view.d.ts +12 -1
- package/src/linker/view.js +65 -15
- package/src/linker/view.js.map +1 -1
- package/src/linker/view_container_ref.d.ts +2 -10
- package/src/linker/view_container_ref.js +4 -3
- package/src/linker/view_container_ref.js.map +1 -1
- package/src/linker/view_ref.d.ts +5 -1
- package/src/linker/view_ref.js +6 -2
- package/src/linker/view_ref.js.map +1 -1
- package/src/linker/view_type.js.map +1 -1
- package/src/linker/view_utils.d.ts +2 -4
- package/src/linker/view_utils.js +21 -21
- package/src/linker/view_utils.js.map +1 -1
- package/src/linker/view_utils.metadata.json +1 -1
- package/src/linker.d.ts +5 -4
- package/src/linker.js +12 -9
- package/src/linker.js.map +1 -1
- package/src/metadata/di.d.ts +8 -1
- package/src/metadata/di.js +10 -3
- package/src/metadata/di.js.map +1 -1
- package/src/metadata/directives.d.ts +104 -20
- package/src/metadata/directives.js +25 -27
- package/src/metadata/directives.js.map +1 -1
- package/src/metadata/lifecycle_hooks.d.ts +46 -31
- package/src/metadata/lifecycle_hooks.js +496 -10
- package/src/metadata/lifecycle_hooks.js.map +1 -1
- package/src/metadata/lifecycle_hooks.metadata.json +1 -1
- package/src/metadata/view.d.ts +6 -2
- package/src/metadata/view.js +3 -1
- package/src/metadata/view.js.map +1 -1
- package/src/metadata/view.metadata.json +1 -1
- package/src/metadata.d.ts +49 -15
- package/src/metadata.js +70 -37
- package/src/metadata.js.map +1 -1
- package/src/metadata.metadata.json +1 -1
- package/src/platform_common_providers.d.ts +1 -0
- package/src/platform_common_providers.js +3 -3
- package/src/platform_common_providers.js.map +1 -1
- package/src/platform_common_providers.metadata.json +1 -1
- package/src/platform_directives_and_pipes.d.ts +48 -45
- package/src/platform_directives_and_pipes.js +50 -47
- package/src/platform_directives_and_pipes.js.map +1 -1
- package/src/platform_directives_and_pipes.metadata.json +1 -1
- package/src/profile/profile.d.ts +5 -1
- package/src/profile/profile.js +5 -3
- package/src/profile/profile.js.map +1 -1
- package/src/profile/profile.metadata.json +1 -1
- package/src/profile/wtf_impl.js +1 -1
- package/src/profile/wtf_impl.js.map +1 -1
- package/src/profile/wtf_impl.metadata.json +1 -0
- package/src/profile/wtf_init.js +2 -2
- package/src/profile/wtf_init.js.map +1 -1
- package/src/reflection/platform_reflection_capabilities.d.ts +4 -3
- package/src/reflection/platform_reflection_capabilities.js.map +1 -1
- package/src/reflection/reflection.d.ts +1 -1
- package/src/reflection/reflection.js +2 -2
- package/src/reflection/reflection.js.map +1 -1
- package/src/reflection/reflection.metadata.json +1 -1
- package/src/reflection/reflection_capabilities.d.ts +4 -5
- package/src/reflection/reflection_capabilities.js +24 -10
- package/src/reflection/reflection_capabilities.js.map +1 -1
- package/src/reflection/reflector.d.ts +8 -20
- package/src/reflection/reflector.js +13 -3
- package/src/reflection/reflector.js.map +1 -1
- package/src/reflection/reflector_reader.js +3 -3
- package/src/reflection/reflector_reader.js.map +1 -1
- package/src/reflection/types.js.map +1 -1
- package/src/render/api.d.ts +17 -6
- package/src/render/api.js +8 -1
- package/src/render/api.js.map +1 -1
- package/src/render.d.ts +1 -1
- package/src/render.js +2 -2
- package/src/render.js.map +1 -1
- package/src/security.js +6 -6
- package/src/security.js.map +1 -1
- package/src/testability/testability.d.ts +3 -19
- package/src/testability/testability.js +10 -5
- package/src/testability/testability.js.map +1 -1
- package/src/testability/testability.metadata.json +1 -1
- package/src/util/decorators.d.ts +2 -1
- package/src/util/decorators.js +10 -9
- package/src/util/decorators.js.map +1 -1
- package/src/util.js.map +1 -1
- package/src/zone/ng_zone.d.ts +6 -17
- package/src/zone/ng_zone.js +11 -6
- package/src/zone/ng_zone.js.map +1 -1
- package/src/zone/ng_zone_impl.d.ts +1 -4
- package/src/zone/ng_zone_impl.js +3 -2
- package/src/zone/ng_zone_impl.js.map +1 -1
- package/src/zone.js.map +1 -1
- package/testing/async.js +20 -22
- package/testing/async.js.map +1 -1
- package/testing/async.metadata.json +1 -0
- package/testing/async_test_completer.js.map +1 -1
- package/testing/fake_async.d.ts +4 -1
- package/testing/fake_async.js +10 -2
- package/testing/fake_async.js.map +1 -1
- package/testing/lang_utils.js +1 -1
- package/testing/lang_utils.js.map +1 -1
- package/testing/lang_utils.metadata.json +1 -0
- package/testing/logger.js +5 -3
- package/testing/logger.js.map +1 -1
- package/testing/logger.metadata.json +1 -1
- package/testing/mock_application_ref.d.ts +1 -1
- package/testing/mock_application_ref.js +1 -0
- package/testing/mock_application_ref.js.map +1 -1
- package/testing/mock_application_ref.metadata.json +1 -1
- package/testing/ng_zone_mock.d.ts +0 -1
- package/testing/ng_zone_mock.js +2 -1
- package/testing/ng_zone_mock.js.map +1 -1
- package/testing/ng_zone_mock.metadata.json +1 -1
- package/testing/regexp.js +1 -1
- package/testing/regexp.js.map +1 -1
- package/testing/regexp.metadata.json +1 -0
- package/testing/test_injector.d.ts +6 -12
- package/testing/test_injector.js +3 -9
- package/testing/test_injector.js.map +1 -1
- package/testing/test_injector.metadata.json +1 -0
- package/testing/testing.d.ts +2 -2
- package/testing/testing.js +5 -5
- package/testing/testing.js.map +1 -1
- package/testing/testing.metadata.json +1 -1
- package/testing.js.map +1 -1
package/esm/testing/async.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wraps a test function in an asynchronous test zone. The test will automatically
|
|
3
|
-
* complete when all asynchronous calls within this zone are done. Can be used
|
|
4
|
-
* to wrap an {@link inject} call.
|
|
5
|
-
*
|
|
6
|
-
* Example:
|
|
7
|
-
*
|
|
8
|
-
* ```
|
|
9
|
-
* it('...', async(inject([AClass], (object) => {
|
|
10
|
-
* object.doSomething.then(() => {
|
|
11
|
-
* expect(...);
|
|
12
|
-
* })
|
|
13
|
-
* });
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
2
|
+
* Wraps a test function in an asynchronous test zone. The test will automatically
|
|
3
|
+
* complete when all asynchronous calls within this zone are done. Can be used
|
|
4
|
+
* to wrap an {@link inject} call.
|
|
5
|
+
*
|
|
6
|
+
* Example:
|
|
7
|
+
*
|
|
8
|
+
* ```
|
|
9
|
+
* it('...', async(inject([AClass], (object) => {
|
|
10
|
+
* object.doSomething.then(() => {
|
|
11
|
+
* expect(...);
|
|
12
|
+
* })
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
16
|
export function async(fn) {
|
|
17
|
-
return () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
};
|
|
17
|
+
return () => new Promise((finishCallback, failCallback) => {
|
|
18
|
+
var AsyncTestZoneSpec = Zone['AsyncTestZoneSpec'];
|
|
19
|
+
var testZoneSpec = new AsyncTestZoneSpec(finishCallback, failCallback, 'test');
|
|
20
|
+
var testZone = Zone.current.fork(testZoneSpec);
|
|
21
|
+
return testZone.run(fn);
|
|
22
|
+
});
|
|
25
23
|
}
|
|
26
24
|
//# sourceMappingURL=async.js.map
|
package/esm/testing/async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/async.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/async.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,sBAAsB,EAAY;IAChC,MAAM,CAAC,MAAM,IAAI,OAAO,CAAO,CAAC,cAAc,EAAE,YAAY;QACnD,IAAI,iBAAiB,GAAI,IAA8B,CAAC,mBAAmB,CAAC,CAAC;QAC7E,IAAI,YAAY,GAAG,IAAI,iBAAiB,CAAC,cAAc,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;QAC/E,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACZ,CAAC","sourcesContent":["/**\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 */\nexport function async(fn: Function): Function {\n return () => new Promise<void>((finishCallback, failCallback) => {\n var AsyncTestZoneSpec = (Zone as any /** TODO #9100 */)['AsyncTestZoneSpec'];\n var testZoneSpec = new AsyncTestZoneSpec(finishCallback, failCallback, 'test');\n var testZone = Zone.current.fork(testZoneSpec);\n return testZone.run(fn);\n });\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"async":{"__symbolic":"function","parameters":["fn"],"value":{"__symbolic":"error","message":"Function call not supported","line":16,"character":8}}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async_test_completer.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/async_test_completer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"async_test_completer.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/async_test_completer.ts"],"names":[],"mappings":"OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB;AAEtD;;GAEG;AACH;IAAA;QACU,eAAU,GAAG,IAAI,gBAAgB,EAAO,CAAC;IAMnD,CAAC;IALC,IAAI,CAAC,KAAW,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAErD,IAAI,CAAC,KAAW,EAAE,UAAmB,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAErF,IAAI,OAAO,KAAmB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AACjE,CAAC;AAAA","sourcesContent":["import {PromiseCompleter} from '../src/facade/promise';\n\n/**\n * Injectable completer that allows signaling completion of an asynchronous test. Used internally.\n */\nexport class AsyncTestCompleter {\n private _completer = new PromiseCompleter<any>();\n done(value?: any) { this._completer.resolve(value); }\n\n fail(error?: any, stackTrace?: string) { this._completer.reject(error, stackTrace); }\n\n get promise(): Promise<any> { return this._completer.promise; }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -32,9 +32,12 @@ export declare function clearPendingTimers(): void;
|
|
|
32
32
|
*
|
|
33
33
|
* {@example testing/ts/fake_async.ts region='basic'}
|
|
34
34
|
*
|
|
35
|
-
* @param {number} millis Number of millisecond, defaults to 0
|
|
36
35
|
*/
|
|
37
36
|
export declare function tick(millis?: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* Discard all remaining periodic tasks.
|
|
39
|
+
*/
|
|
40
|
+
export declare function discardPeriodicTasks(): void;
|
|
38
41
|
/**
|
|
39
42
|
* Flush any pending microtasks.
|
|
40
43
|
*/
|
|
@@ -22,7 +22,7 @@ export function fakeAsync(fn) {
|
|
|
22
22
|
}
|
|
23
23
|
let fakeAsyncTestZoneSpec = new _FakeAsyncTestZoneSpecType();
|
|
24
24
|
let fakeAsyncZone = Zone.current.fork(fakeAsyncTestZoneSpec);
|
|
25
|
-
return function (...args) {
|
|
25
|
+
return function (...args /** TODO #9100 */) {
|
|
26
26
|
let res = fakeAsyncZone.run(() => {
|
|
27
27
|
let res = fn(...args);
|
|
28
28
|
flushMicrotasks();
|
|
@@ -64,11 +64,18 @@ export function clearPendingTimers() {
|
|
|
64
64
|
*
|
|
65
65
|
* {@example testing/ts/fake_async.ts region='basic'}
|
|
66
66
|
*
|
|
67
|
-
* @param {number} millis Number of millisecond, defaults to 0
|
|
68
67
|
*/
|
|
69
68
|
export function tick(millis = 0) {
|
|
70
69
|
_getFakeAsyncZoneSpec().tick(millis);
|
|
71
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Discard all remaining periodic tasks.
|
|
73
|
+
*/
|
|
74
|
+
export function discardPeriodicTasks() {
|
|
75
|
+
let zoneSpec = _getFakeAsyncZoneSpec();
|
|
76
|
+
let pendingTimers = zoneSpec.pendingPeriodicTimers;
|
|
77
|
+
zoneSpec.pendingPeriodicTimers.length = 0;
|
|
78
|
+
}
|
|
72
79
|
/**
|
|
73
80
|
* Flush any pending microtasks.
|
|
74
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake_async.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/fake_async.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fake_async.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/fake_async.ts"],"names":[],"mappings":"OAAO,EAAC,aAAa,EAAC,MAAM,UAAU;AAGtC,IAAI,0BAA0B,GAAI,IAA8B,CAAC,uBAAuB,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;GAeG;AACH,0BAA0B,EAAY;IACpC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;QACtD,MAAM,IAAI,aAAa,CAAC,qCAAqC,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,qBAAqB,GAAG,IAAI,0BAA0B,EAAE,CAAC;IAC7D,IAAI,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAE7D,MAAM,CAAC,UAAS,GAAG,IAAW,CAAC,iBAAiB;QAC9C,IAAI,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;YAC1B,IAAI,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;YACtB,eAAe,EAAE,CAAC;YAClB,MAAM,CAAC,GAAG,CAAC;QACb,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,IAAI,aAAa,CACnB,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,MAAM,GAAG;gBACxD,uCAAuC,CAAC,CAAC;QAC/C,CAAC;QAED,EAAE,CAAC,CAAC,qBAAqB,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACnD,MAAM,IAAI,aAAa,CACnB,GAAG,qBAAqB,CAAC,aAAa,CAAC,MAAM,+BAA+B,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,CAAC,GAAG,CAAC;IACb,CAAC,CAAC;AACJ,CAAC;AAED;IACE,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACzD,EAAE,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IAC5F,CAAC;IACD,MAAM,CAAC,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH;IACE,cAAc;AAChB,CAAC;AAED;;;;;;;;;;GAUG;AACH,qBAAqB,MAAM,GAAW,CAAC;IACrC,qBAAqB,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH;IACE,IAAI,QAAQ,GAAG,qBAAqB,EAAE,CAAC;IACvC,IAAI,aAAa,GAAG,QAAQ,CAAC,qBAAqB,CAAC;IACnD,QAAQ,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH;IACE,qBAAqB,EAAE,CAAC,eAAe,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["import {BaseException} from '../index';\nimport {getTestInjector} from './test_injector';\n\nlet _FakeAsyncTestZoneSpecType = (Zone as any /** TODO #9100 */)['FakeAsyncTestZoneSpec'];\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 testing/ts/fake_async.ts region='basic'}\n *\n * @param fn\n * @returns {Function} The function wrapped to be executed in the fakeAsync zone\n */\nexport function fakeAsync(fn: Function): Function {\n if (Zone.current.get('FakeAsyncTestZoneSpec') != null) {\n throw new BaseException('fakeAsync() calls can not be nested');\n }\n\n let fakeAsyncTestZoneSpec = new _FakeAsyncTestZoneSpecType();\n let fakeAsyncZone = Zone.current.fork(fakeAsyncTestZoneSpec);\n\n return function(...args: any[] /** TODO #9100 */) {\n let res = fakeAsyncZone.run(() => {\n let res = fn(...args);\n flushMicrotasks();\n return res;\n });\n\n if (fakeAsyncTestZoneSpec.pendingPeriodicTimers.length > 0) {\n throw new BaseException(\n `${fakeAsyncTestZoneSpec.pendingPeriodicTimers.length} ` +\n `periodic timer(s) still in the queue.`);\n }\n\n if (fakeAsyncTestZoneSpec.pendingTimers.length > 0) {\n throw new BaseException(\n `${fakeAsyncTestZoneSpec.pendingTimers.length} timer(s) still in the queue.`);\n }\n return res;\n };\n}\n\nfunction _getFakeAsyncZoneSpec(): any {\n let zoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');\n if (zoneSpec == null) {\n throw new Error('The code should be running in the fakeAsync zone to call this function');\n }\n return zoneSpec;\n}\n\n/**\n * Clear the queue of pending timers and microtasks.\n * Tests no longer need to call this explicitly.\n *\n * @deprecated\n */\nexport function clearPendingTimers(): void {\n // Do nothing.\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 testing/ts/fake_async.ts region='basic'}\n *\n */\nexport function tick(millis: number = 0): void {\n _getFakeAsyncZoneSpec().tick(millis);\n}\n\n/**\n * Discard all remaining periodic tasks.\n */\nexport function discardPeriodicTasks(): void {\n let zoneSpec = _getFakeAsyncZoneSpec();\n let pendingTimers = zoneSpec.pendingPeriodicTimers;\n zoneSpec.pendingPeriodicTimers.length = 0;\n}\n\n/**\n * Flush any pending microtasks.\n */\nexport function flushMicrotasks(): void {\n _getFakeAsyncZoneSpec().flushMicrotasks();\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lang_utils.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/lang_utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lang_utils.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/lang_utils.ts"],"names":[],"mappings":"AAAA,0BAA0B,QAAa,CAAC,iBAAiB;IACvD,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC9B,CAAC;AAED,gCAAgC,IAAc,EAAE,MAAM,GAAU,EAAE;IAChE,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7C,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7C,MAAM,CAAC,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["export function getTypeOf(instance: any /** TODO #9100 */) {\n return instance.constructor;\n}\n\nexport function instantiateType(type: Function, params: any[] = []) {\n var instance = Object.create(type.prototype);\n instance.constructor.apply(instance, params);\n return instance;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"getTypeOf":{"__symbolic":"function","parameters":["instance"],"value":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"instance"},"member":"constructor"}}}}
|
package/esm/testing/logger.js
CHANGED
|
@@ -3,17 +3,19 @@ export class Log {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
this.logItems = [];
|
|
5
5
|
}
|
|
6
|
-
add(value) { this.logItems.push(value); }
|
|
7
|
-
fn(value) {
|
|
6
|
+
add(value /** TODO #9100 */) { this.logItems.push(value); }
|
|
7
|
+
fn(value /** TODO #9100 */) {
|
|
8
8
|
return (a1 = null, a2 = null, a3 = null, a4 = null, a5 = null) => {
|
|
9
9
|
this.logItems.push(value);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
clear() { this.logItems = []; }
|
|
13
|
-
result() { return this.logItems.join(
|
|
13
|
+
result() { return this.logItems.join('; '); }
|
|
14
14
|
}
|
|
15
|
+
/** @nocollapse */
|
|
15
16
|
Log.decorators = [
|
|
16
17
|
{ type: Injectable },
|
|
17
18
|
];
|
|
19
|
+
/** @nocollapse */
|
|
18
20
|
Log.ctorParameters = [];
|
|
19
21
|
//# sourceMappingURL=logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/logger.ts"],"names":[],"mappings":"OAAO,EAAC,UAAU,EAAC,MAAM,UAAU;AACnC;IAGE;QAAgB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IAAC,CAAC;IAErC,GAAG,CAAC,KAAU,CAAC,iBAAiB,IAAU,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEtE,EAAE,CAAC,KAAU,CAAC,iBAAiB;QAC7B,MAAM,CAAC,CAAC,EAAE,GAAQ,IAAI,EAAE,EAAE,GAAQ,IAAI,EAAE,EAAE,GAAQ,IAAI,EAAE,EAAE,GAAQ,IAAI,EAAE,EAAE,GAAQ,IAAI;YACpF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;IAED,KAAK,KAAW,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC;IAErC,MAAM,KAAa,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAQvD,CAAC;AAPD,kBAAkB;AACX,cAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CAAC;AACF,kBAAkB;AACX,kBAAc,GAA2D,EAC/E,CACA","sourcesContent":["import {Injectable} from '../index';\nexport class Log {\n logItems: any[];\n\n constructor() { this.logItems = []; }\n\n add(value: any /** TODO #9100 */): void { this.logItems.push(value); }\n\n fn(value: any /** TODO #9100 */) {\n return (a1: any = null, a2: any = null, a3: any = null, a4: any = null, a5: any = null) => {\n this.logItems.push(value);\n };\n }\n\n clear(): void { this.logItems = []; }\n\n result(): string { return this.logItems.join('; '); }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","metadata":{"Log":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Injectable","
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"Log":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../index","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"add":[{"__symbolic":"method"}],"fn":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"result":[{"__symbolic":"method"}]}}}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApplicationRef,
|
|
1
|
+
import { ApplicationRef, ComponentFactory, ComponentRef, Injector, NgZone, Type } from '../index';
|
|
2
2
|
/**
|
|
3
3
|
* A no-op implementation of {@link ApplicationRef}, useful for testing.
|
|
4
4
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock_application_ref.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/mock_application_ref.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mock_application_ref.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/mock_application_ref.ts"],"names":[],"mappings":"OAAO,EAAC,cAAc,EAAkC,UAAU,EAAyB,MAAM,UAAU;AAC3G,wCAAwC,cAAc;IACpD,yBAAyB,CAAC,QAA0C,IAAS,CAAC;IAE9E,uBAAuB,CAAC,OAAmB,IAAS,CAAC;IAErD,SAAS,CAAI,gBAAqC,IAAqB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAErF,IAAI,QAAQ,KAAe,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;IAEzC,IAAI,IAAI,KAAa,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;IAEnC,GAAG,CAAC,QAAkB,IAAS,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7C,wBAAwB,KAAmB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAEzD,OAAO,KAAU,CAAC;IAElB,IAAI,KAAU,CAAC;IAEf,IAAI,cAAc,KAAa,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;;AAK/C,CAAC;AAJD,kBAAkB;AACX,6BAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CACA","sourcesContent":["import {ApplicationRef, ComponentFactory, ComponentRef, Injectable, Injector, NgZone, Type} from '../index';\nexport class MockApplicationRef extends ApplicationRef {\n registerBootstrapListener(listener: (ref: ComponentRef<any>) => void): void {}\n\n registerDisposeListener(dispose: () => void): void {}\n\n bootstrap<C>(componentFactory: ComponentFactory<C>): ComponentRef<C> { return null; }\n\n get injector(): Injector { return null; };\n\n get zone(): NgZone { return null; };\n\n run(callback: Function): any { return null; }\n\n waitForAsyncInitializers(): Promise<any> { return null; }\n\n dispose(): void {}\n\n tick(): void {}\n\n get componentTypes(): Type[] { return null; };\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","metadata":{"MockApplicationRef":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Injectable","
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"MockApplicationRef":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../index","name":"Injectable"}}],"members":{"registerBootstrapListener":[{"__symbolic":"method"}],"registerDisposeListener":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"run":[{"__symbolic":"method"}],"waitForAsyncInitializers":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"tick":[{"__symbolic":"method"}]}}}}
|
|
@@ -3,7 +3,6 @@ import { EventEmitter, ObservableWrapper } from '../src/facade/async';
|
|
|
3
3
|
export class MockNgZone extends NgZone {
|
|
4
4
|
constructor() {
|
|
5
5
|
super({ enableLongStackTrace: false });
|
|
6
|
-
/** @internal */
|
|
7
6
|
this._mockOnStable = new EventEmitter(false);
|
|
8
7
|
}
|
|
9
8
|
get onStable() { return this._mockOnStable; }
|
|
@@ -11,8 +10,10 @@ export class MockNgZone extends NgZone {
|
|
|
11
10
|
runOutsideAngular(fn) { return fn(); }
|
|
12
11
|
simulateZoneExit() { ObservableWrapper.callNext(this.onStable, null); }
|
|
13
12
|
}
|
|
13
|
+
/** @nocollapse */
|
|
14
14
|
MockNgZone.decorators = [
|
|
15
15
|
{ type: Injectable },
|
|
16
16
|
];
|
|
17
|
+
/** @nocollapse */
|
|
17
18
|
MockNgZone.ctorParameters = [];
|
|
18
19
|
//# sourceMappingURL=ng_zone_mock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng_zone_mock.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/ng_zone_mock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ng_zone_mock.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/ng_zone_mock.ts"],"names":[],"mappings":"OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,UAAU;OACpC,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,qBAAqB;AACnE,gCAAgC,MAAM;IAGpC;QAAgB,MAAM,EAAC,oBAAoB,EAAE,KAAK,EAAC,CAAC,CAAC;QAF7C,kBAAa,GAAsB,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IAEb,CAAC;IAEvD,IAAI,QAAQ,KAAK,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAE7C,GAAG,CAAC,EAAY,IAAS,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAEvC,iBAAiB,CAAC,EAAY,IAAS,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAErD,gBAAgB,KAAW,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAQ/E,CAAC;AAPD,kBAAkB;AACX,qBAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CAAC;AACF,kBAAkB;AACX,yBAAc,GAA2D,EAC/E,CACA","sourcesContent":["import {Injectable, NgZone} from '../index';\nimport {EventEmitter, ObservableWrapper} from '../src/facade/async';\nexport class MockNgZone extends NgZone {\n private _mockOnStable: EventEmitter<any> = new EventEmitter(false);\n\n constructor() { super({enableLongStackTrace: false}); }\n\n get onStable() { return this._mockOnStable; }\n\n run(fn: Function): any { return fn(); }\n\n runOutsideAngular(fn: Function): any { return fn(); }\n\n simulateZoneExit(): void { ObservableWrapper.callNext(this.onStable, null); }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","metadata":{"MockNgZone":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Injectable","
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"MockNgZone":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../index","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"run":[{"__symbolic":"method"}],"runOutsideAngular":[{"__symbolic":"method"}],"simulateZoneExit":[{"__symbolic":"method"}]}}}}
|
package/esm/testing/regexp.js
CHANGED
|
@@ -2,6 +2,6 @@ import { RegExpWrapper, StringWrapper } from '../src/facade/lang';
|
|
|
2
2
|
var _RE_SPECIAL_CHARS = ['-', '[', ']', '/', '{', '}', '\\', '(', ')', '*', '+', '?', '.', '^', '$', '|'];
|
|
3
3
|
var _ESCAPE_RE = RegExpWrapper.create(`[\\${_RE_SPECIAL_CHARS.join('\\')}]`);
|
|
4
4
|
export function containsRegexp(input) {
|
|
5
|
-
return RegExpWrapper.create(StringWrapper.replaceAllMapped(input, _ESCAPE_RE, (match) => `\\${match[0]}`));
|
|
5
|
+
return RegExpWrapper.create(StringWrapper.replaceAllMapped(input, _ESCAPE_RE, (match /** TODO #9100 */) => `\\${match[0]}`));
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=regexp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexp.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/regexp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"regexp.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/regexp.ts"],"names":[],"mappings":"OAAO,EAAC,aAAa,EAAE,aAAa,EAAC,MAAM,oBAAoB;AAE/D,IAAI,iBAAiB,GACjB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACtF,IAAI,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7E,+BAA+B,KAAa;IAC1C,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,gBAAgB,CACtD,KAAK,EAAE,UAAU,EAAE,CAAC,KAAU,CAAC,iBAAiB,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import {RegExpWrapper, StringWrapper} from '../src/facade/lang';\n\nvar _RE_SPECIAL_CHARS =\n ['-', '[', ']', '/', '{', '}', '\\\\', '(', ')', '*', '+', '?', '.', '^', '$', '|'];\nvar _ESCAPE_RE = RegExpWrapper.create(`[\\\\${_RE_SPECIAL_CHARS.join('\\\\')}]`);\nexport function containsRegexp(input: string): RegExp {\n return RegExpWrapper.create(StringWrapper.replaceAllMapped(\n input, _ESCAPE_RE, (match: any /** TODO #9100 */) => `\\\\${match[0]}`));\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"containsRegexp":{"__symbolic":"function","parameters":["input"],"value":{"__symbolic":"error","message":"Function call not supported","line":7,"character":24}}}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Provider, ReflectiveInjector, Type } from '../index';
|
|
2
2
|
export { async } from './async';
|
|
3
3
|
export declare class TestInjector {
|
|
4
4
|
private _instantiated;
|
|
5
5
|
private _injector;
|
|
6
6
|
private _providers;
|
|
7
7
|
reset(): void;
|
|
8
|
-
platformProviders: Array<Type | Provider | any[]>;
|
|
9
|
-
applicationProviders: Array<Type | Provider | any[]>;
|
|
10
|
-
addProviders(providers: Array<Type | Provider | any[]>): void;
|
|
8
|
+
platformProviders: Array<Type | Provider | any[] | any>;
|
|
9
|
+
applicationProviders: Array<Type | Provider | any[] | any>;
|
|
10
|
+
addProviders(providers: Array<Type | Provider | any[] | any>): void;
|
|
11
11
|
createInjector(): ReflectiveInjector;
|
|
12
12
|
get(token: any): any;
|
|
13
13
|
execute(tokens: any[], fn: Function): any;
|
|
@@ -51,9 +51,6 @@ export declare function resetBaseTestProviders(): void;
|
|
|
51
51
|
* eventually
|
|
52
52
|
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
|
53
53
|
*
|
|
54
|
-
* @param {Array} tokens
|
|
55
|
-
* @param {Function} fn
|
|
56
|
-
* @return {Function}
|
|
57
54
|
*/
|
|
58
55
|
export declare function inject(tokens: any[], fn: Function): Function;
|
|
59
56
|
export declare class InjectSetupWrapper {
|
|
@@ -61,12 +58,12 @@ export declare class InjectSetupWrapper {
|
|
|
61
58
|
constructor(_providers: () => any);
|
|
62
59
|
private _addProviders();
|
|
63
60
|
inject(tokens: any[], fn: Function): Function;
|
|
64
|
-
/** @
|
|
61
|
+
/** @deprecated {use async(withProviders().inject())} */
|
|
65
62
|
injectAsync(tokens: any[], fn: Function): Function;
|
|
66
63
|
}
|
|
67
64
|
export declare function withProviders(providers: () => any): InjectSetupWrapper;
|
|
68
65
|
/**
|
|
69
|
-
* @
|
|
66
|
+
* @deprecated {use async(inject())}
|
|
70
67
|
*
|
|
71
68
|
* Allows injecting dependencies in `beforeEach()` and `it()`. The test must return
|
|
72
69
|
* a promise which will resolve when all asynchronous activity is complete.
|
|
@@ -81,8 +78,5 @@ export declare function withProviders(providers: () => any): InjectSetupWrapper;
|
|
|
81
78
|
* })
|
|
82
79
|
* ```
|
|
83
80
|
*
|
|
84
|
-
* @param {Array} tokens
|
|
85
|
-
* @param {Function} fn
|
|
86
|
-
* @return {Function}
|
|
87
81
|
*/
|
|
88
82
|
export declare function injectAsync(tokens: any[], fn: Function): Function;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseException } from '../src/facade/exceptions';
|
|
1
|
+
import { PLATFORM_INITIALIZER, ReflectiveInjector } from '../index';
|
|
3
2
|
import { ListWrapper } from '../src/facade/collection';
|
|
3
|
+
import { BaseException } from '../src/facade/exceptions';
|
|
4
4
|
import { FunctionWrapper, isPresent } from '../src/facade/lang';
|
|
5
5
|
import { async } from './async';
|
|
6
6
|
import { AsyncTestCompleter } from './async_test_completer';
|
|
@@ -107,9 +107,6 @@ export function resetBaseTestProviders() {
|
|
|
107
107
|
* eventually
|
|
108
108
|
* becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });`
|
|
109
109
|
*
|
|
110
|
-
* @param {Array} tokens
|
|
111
|
-
* @param {Function} fn
|
|
112
|
-
* @return {Function}
|
|
113
110
|
*/
|
|
114
111
|
export function inject(tokens, fn) {
|
|
115
112
|
let testInjector = getTestInjector();
|
|
@@ -143,7 +140,7 @@ export class InjectSetupWrapper {
|
|
|
143
140
|
return inject_impl(tokens, fn)();
|
|
144
141
|
};
|
|
145
142
|
}
|
|
146
|
-
/** @
|
|
143
|
+
/** @deprecated {use async(withProviders().inject())} */
|
|
147
144
|
injectAsync(tokens, fn) {
|
|
148
145
|
return () => {
|
|
149
146
|
this._addProviders();
|
|
@@ -155,7 +152,7 @@ export function withProviders(providers) {
|
|
|
155
152
|
return new InjectSetupWrapper(providers);
|
|
156
153
|
}
|
|
157
154
|
/**
|
|
158
|
-
* @
|
|
155
|
+
* @deprecated {use async(inject())}
|
|
159
156
|
*
|
|
160
157
|
* Allows injecting dependencies in `beforeEach()` and `it()`. The test must return
|
|
161
158
|
* a promise which will resolve when all asynchronous activity is complete.
|
|
@@ -170,9 +167,6 @@ export function withProviders(providers) {
|
|
|
170
167
|
* })
|
|
171
168
|
* ```
|
|
172
169
|
*
|
|
173
|
-
* @param {Array} tokens
|
|
174
|
-
* @param {Function} fn
|
|
175
|
-
* @return {Function}
|
|
176
170
|
*/
|
|
177
171
|
export function injectAsync(tokens, fn) {
|
|
178
172
|
return async(inject(tokens, fn));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test_injector.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/test_injector.ts"],"names":[],"mappings":"OAIS,EAAC,kBAAkB,EAAY,oBAAoB,EAAO,MAAM,UAAU;OAC5E,EAAC,aAAa,EAAC,MAAM,0BAA0B;OAC/C,EAAC,WAAW,EAAC,MAAM,0BAA0B;OAC7C,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,oBAAoB;OAEtD,EAAC,KAAK,EAAC,MAAM,SAAS;OACtB,EAAC,kBAAkB,EAAC,MAAM,wBAAwB;AAEzD,SAAQ,KAAK,QAAO,SAAS,CAAC;AAE9B;IAAA;QACU,kBAAa,GAAY,KAAK,CAAC;QAE/B,cAAS,GAAuB,IAAI,CAAC;QAErC,eAAU,GAAmC,EAAE,CAAC;QAQxD,sBAAiB,GAAmC,EAAE,CAAC;QAEvD,yBAAoB,GAAmC,EAAE,CAAC;IA+B5D,CAAC;IAvCC,KAAK;QACH,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAMD,YAAY,CAAC,SAAyC;QACpD,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,aAAa,CAAC,0DAA0D,CAAC,CAAC;QACtF,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACnE,CAAC;IAED,cAAc;QACZ,IAAI,YAAY,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC/E,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,qBAAqB,CAC/C,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,E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ACH,CAAC;AAED;IACE,YAAoB,UAAqB;QAArB,eAAU,GAAV,UAAU,CAAW;IAAG,CAAC;IAErC,aAAa;QACnB,IAAI,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC5C,EAAE,CAAC,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACnC,eAAe,EAAE,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,MAAM,CAAC,MAAa,EAAE,EAAY;QAChC,MAAM,CAAC;YACL,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACnC,CAAC,CAAA;IACH,CAAC;IAED,wDAAwD;IACxD,WAAW,CAAC,MAAa,EAAE,EAAY;QACrC,MAAM,CAAC;YACL,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACxC,CAAC,CAAA;IACH,CAAC;AACH,CAAC;AAED,8BAA8B,SAAoB;IAChD,MAAM,CAAC,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4BAA4B,MAAa,EAAE,EAAY;IACrD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;AACnC,CAAC;AAED,gFAAgF;AAChF,2BAA2B;AAC3B,IAAI,WAAW,GAAG,MAAM,CAAC;AACzB,IAAI,gBAAgB,GAAG,WAAW,CAAC","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {ReflectiveInjector, Provider, PLATFORM_INITIALIZER, Type} from '../index';\nimport {BaseException} from '../src/facade/exceptions';\nimport {ListWrapper} from '../src/facade/collection';\nimport {FunctionWrapper, isPresent} from '../src/facade/lang';\n\nimport {async} from './async';\nimport {AsyncTestCompleter} from './async_test_completer';\n\nexport {async} from './async';\n\nexport class TestInjector {\n private _instantiated: boolean = false;\n\n private _injector: ReflectiveInjector = null;\n\n private _providers: Array<Type | Provider | any[]> = [];\n\n reset() {\n this._injector = null;\n this._providers = [];\n this._instantiated = false;\n }\n\n platformProviders: Array<Type | Provider | any[]> = [];\n\n applicationProviders: Array<Type | Provider | any[]> = [];\n\n addProviders(providers: Array<Type | Provider | any[]>) {\n if (this._instantiated) {\n throw new BaseException('Cannot add providers after test injector is instantiated');\n }\n this._providers = ListWrapper.concat(this._providers, providers);\n }\n\n createInjector() {\n var rootInjector = ReflectiveInjector.resolveAndCreate(this.platformProviders);\n this._injector = rootInjector.resolveAndCreateChild(\n ListWrapper.concat(this.applicationProviders, this._providers));\n this._instantiated = true;\n return this._injector;\n }\n\n get(token: any) {\n if (!this._instantiated) {\n this.createInjector();\n }\n return this._injector.get(token);\n }\n\n execute(tokens: any[], fn: Function): any {\n if (!this._instantiated) {\n this.createInjector();\n }\n var params = tokens.map(t => this._injector.get(t));\n return FunctionWrapper.apply(fn, params);\n }\n}\n\nvar _testInjector: TestInjector = null;\n\nexport function getTestInjector() {\n if (_testInjector == null) {\n _testInjector = new TestInjector();\n }\n return _testInjector;\n}\n\n/**\n * Set the providers that the test injector should use. These should be providers\n * 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 teh current platform. If you absolutely need to change the providers,\n * first use `resetBaseTestProviders`.\n *\n * Test Providers for individual platforms are available from\n * 'angular2/platform/testing/<platform_name>'.\n */\nexport function setBaseTestProviders(platformProviders: Array<Type | Provider | any[]>,\n applicationProviders: Array<Type | Provider | any[]>) {\n var testInjector = getTestInjector();\n if (testInjector.platformProviders.length > 0 || testInjector.applicationProviders.length > 0) {\n throw new BaseException('Cannot set base providers because it has already been called');\n }\n testInjector.platformProviders = platformProviders;\n testInjector.applicationProviders = applicationProviders;\n var injector = testInjector.createInjector();\n let inits: Function[] = injector.get(PLATFORM_INITIALIZER, null);\n if (isPresent(inits)) {\n inits.forEach(init => init());\n }\n testInjector.reset();\n}\n\n/**\n * Reset the providers for the test injector.\n */\nexport function resetBaseTestProviders() {\n var testInjector = getTestInjector();\n testInjector.platformProviders = [];\n testInjector.applicationProviders = [];\n testInjector.reset();\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 * @param {Array} tokens\n * @param {Function} fn\n * @return {Function}\n */\nexport function inject(tokens: any[], fn: Function): Function {\n let testInjector = getTestInjector();\n if (tokens.indexOf(AsyncTestCompleter) >= 0) {\n // Return an async test method that returns a Promise if AsyncTestCompleter is one of the\n // injected tokens.\n return () => {\n let completer: AsyncTestCompleter = testInjector.get(AsyncTestCompleter);\n testInjector.execute(tokens, fn);\n return completer.promise;\n }\n } else {\n // Return a synchronous test method with the injected tokens.\n return () => { return getTestInjector().execute(tokens, fn); };\n }\n}\n\nexport class InjectSetupWrapper {\n constructor(private _providers: () => any) {}\n\n private _addProviders() {\n var additionalProviders = this._providers();\n if (additionalProviders.length > 0) {\n getTestInjector().addProviders(additionalProviders);\n }\n }\n\n inject(tokens: any[], fn: Function): Function {\n return () => {\n this._addProviders();\n return inject_impl(tokens, fn)();\n }\n }\n\n /** @Deprecated {use async(withProviders().inject())} */\n injectAsync(tokens: any[], fn: Function): Function {\n return () => {\n this._addProviders();\n return injectAsync_impl(tokens, fn)();\n }\n }\n}\n\nexport function withProviders(providers: () => any) {\n return new InjectSetupWrapper(providers);\n}\n\n/**\n * @Deprecated {use async(inject())}\n *\n * Allows injecting dependencies in `beforeEach()` and `it()`. The test must return\n * a promise which will resolve when all asynchronous activity is complete.\n *\n * Example:\n *\n * ```\n * it('...', injectAsync([AClass], (object) => {\n * return object.doSomething().then(() => {\n * expect(...);\n * });\n * })\n * ```\n *\n * @param {Array} tokens\n * @param {Function} fn\n * @return {Function}\n */\nexport function injectAsync(tokens: any[], fn: Function): Function {\n return async(inject(tokens, fn));\n}\n\n// This is to ensure inject(Async) within InjectSetupWrapper doesn't call itself\n// when transpiled to Dart.\nvar inject_impl = inject;\nvar injectAsync_impl = injectAsync;\n"]}
|
|
1
|
+
{"version":3,"file":"test_injector.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/test_injector.ts"],"names":[],"mappings":"OAAO,EAAC,oBAAoB,EAAY,kBAAkB,EAAO,MAAM,UAAU;OAC1E,EAAC,WAAW,EAAC,MAAM,0BAA0B;OAC7C,EAAC,aAAa,EAAC,MAAM,0BAA0B;OAC/C,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,oBAAoB;OAEtD,EAAC,KAAK,EAAC,MAAM,SAAS;OACtB,EAAC,kBAAkB,EAAC,MAAM,wBAAwB;AAEzD,SAAQ,KAAK,QAAO,SAAS,CAAC;AAE9B;IAAA;QACU,kBAAa,GAAY,KAAK,CAAC;QAE/B,cAAS,GAAuB,IAAI,CAAC;QAErC,eAAU,GAAmC,EAAE,CAAC;QAQxD,sBAAiB,GAAmC,EAAE,CAAC;QAEvD,yBAAoB,GAAmC,EAAE,CAAC;IA+B5D,CAAC;IAvCC,KAAK;QACH,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAMD,YAAY,CAAC,SAAyC;QACpD,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACvB,MAAM,IAAI,aAAa,CAAC,0DAA0D,CAAC,CAAC;QACtF,CAAC;QACD,IAAI,C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ED,gFAAgF;AAChF,2BAA2B;AAC3B,IAAI,WAAW,GAAG,MAAM,CAAC;AACzB,IAAI,gBAAgB,GAAG,WAAW,CAAC","sourcesContent":["import {PLATFORM_INITIALIZER, Provider, ReflectiveInjector, Type} from '../index';\nimport {ListWrapper} from '../src/facade/collection';\nimport {BaseException} from '../src/facade/exceptions';\nimport {FunctionWrapper, isPresent} from '../src/facade/lang';\n\nimport {async} from './async';\nimport {AsyncTestCompleter} from './async_test_completer';\n\nexport {async} from './async';\n\nexport class TestInjector {\n private _instantiated: boolean = false;\n\n private _injector: ReflectiveInjector = null;\n\n private _providers: Array<Type|Provider|any[]|any> = [];\n\n reset() {\n this._injector = null;\n this._providers = [];\n this._instantiated = false;\n }\n\n platformProviders: Array<Type|Provider|any[]|any> = [];\n\n applicationProviders: Array<Type|Provider|any[]|any> = [];\n\n addProviders(providers: Array<Type|Provider|any[]|any>) {\n if (this._instantiated) {\n throw new BaseException('Cannot add providers after test injector is instantiated');\n }\n this._providers = ListWrapper.concat(this._providers, providers);\n }\n\n createInjector() {\n var rootInjector = ReflectiveInjector.resolveAndCreate(this.platformProviders);\n this._injector = rootInjector.resolveAndCreateChild(\n ListWrapper.concat(this.applicationProviders, this._providers));\n this._instantiated = true;\n return this._injector;\n }\n\n get(token: any) {\n if (!this._instantiated) {\n this.createInjector();\n }\n return this._injector.get(token);\n }\n\n execute(tokens: any[], fn: Function): any {\n if (!this._instantiated) {\n this.createInjector();\n }\n var params = tokens.map(t => this._injector.get(t));\n return FunctionWrapper.apply(fn, params);\n }\n}\n\nvar _testInjector: TestInjector = null;\n\nexport function getTestInjector() {\n if (_testInjector == null) {\n _testInjector = new TestInjector();\n }\n return _testInjector;\n}\n\n/**\n * Set the providers that the test injector should use. These should be providers\n * 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 teh current platform. If you absolutely need to change the providers,\n * first use `resetBaseTestProviders`.\n *\n * Test Providers for individual platforms are available from\n * 'angular2/platform/testing/<platform_name>'.\n */\nexport function setBaseTestProviders(\n platformProviders: Array<Type|Provider|any[]>,\n applicationProviders: Array<Type|Provider|any[]>) {\n var testInjector = getTestInjector();\n if (testInjector.platformProviders.length > 0 || testInjector.applicationProviders.length > 0) {\n throw new BaseException('Cannot set base providers because it has already been called');\n }\n testInjector.platformProviders = platformProviders;\n testInjector.applicationProviders = applicationProviders;\n var injector = testInjector.createInjector();\n let inits: Function[] = injector.get(PLATFORM_INITIALIZER, null);\n if (isPresent(inits)) {\n inits.forEach(init => init());\n }\n testInjector.reset();\n}\n\n/**\n * Reset the providers for the test injector.\n */\nexport function resetBaseTestProviders() {\n var testInjector = getTestInjector();\n testInjector.platformProviders = [];\n testInjector.applicationProviders = [];\n testInjector.reset();\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 */\nexport function inject(tokens: any[], fn: Function): Function {\n let testInjector = getTestInjector();\n if (tokens.indexOf(AsyncTestCompleter) >= 0) {\n // Return an async test method that returns a Promise if AsyncTestCompleter is one of the\n // injected tokens.\n return () => {\n let completer: AsyncTestCompleter = testInjector.get(AsyncTestCompleter);\n testInjector.execute(tokens, fn);\n return completer.promise;\n };\n } else {\n // Return a synchronous test method with the injected tokens.\n return () => { return getTestInjector().execute(tokens, fn); };\n }\n}\n\nexport class InjectSetupWrapper {\n constructor(private _providers: () => any) {}\n\n private _addProviders() {\n var additionalProviders = this._providers();\n if (additionalProviders.length > 0) {\n getTestInjector().addProviders(additionalProviders);\n }\n }\n\n inject(tokens: any[], fn: Function): Function {\n return () => {\n this._addProviders();\n return inject_impl(tokens, fn)();\n };\n }\n\n /** @deprecated {use async(withProviders().inject())} */\n injectAsync(tokens: any[], fn: Function): Function {\n return () => {\n this._addProviders();\n return injectAsync_impl(tokens, fn)();\n };\n }\n}\n\nexport function withProviders(providers: () => any) {\n return new InjectSetupWrapper(providers);\n}\n\n/**\n * @deprecated {use async(inject())}\n *\n * Allows injecting dependencies in `beforeEach()` and `it()`. The test must return\n * a promise which will resolve when all asynchronous activity is complete.\n *\n * Example:\n *\n * ```\n * it('...', injectAsync([AClass], (object) => {\n * return object.doSomething().then(() => {\n * expect(...);\n * });\n * })\n * ```\n *\n */\nexport function injectAsync(tokens: any[], fn: Function): Function {\n return async(inject(tokens, fn));\n}\n\n// This is to ensure inject(Async) within InjectSetupWrapper doesn't call itself\n// when transpiled to Dart.\nvar inject_impl = inject;\nvar injectAsync_impl = injectAsync;\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"withProviders":{"__symbolic":"function","parameters":["providers"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"InjectSetupWrapper"},"arguments":[{"__symbolic":"reference","name":"providers"}]}},"injectAsync":{"__symbolic":"function","parameters":["tokens","fn"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./async","name":"async"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"reference","name":"inject"},"arguments":[{"__symbolic":"reference","name":"tokens"},{"__symbolic":"reference","name":"fn"}]}]}}}}
|
package/esm/testing/testing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { async, inject, injectAsync } from './test_injector';
|
|
2
2
|
export declare var expect: Function;
|
|
3
3
|
/**
|
|
4
4
|
* Run a function (with an optional asynchronous callback) after each test case.
|
|
@@ -57,7 +57,7 @@ export declare var xdescribe: Function;
|
|
|
57
57
|
*
|
|
58
58
|
* {@example testing/ts/testing.ts region='beforeEachProviders'}
|
|
59
59
|
*/
|
|
60
|
-
export declare function beforeEachProviders(fn: any): void;
|
|
60
|
+
export declare function beforeEachProviders(fn: () => Array<any>): void;
|
|
61
61
|
/**
|
|
62
62
|
* Wrapper around Jasmine beforeEach function.
|
|
63
63
|
*
|
package/esm/testing/testing.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getTestInjector } from './test_injector';
|
|
2
1
|
import { isPromise } from '../src/facade/lang';
|
|
3
|
-
|
|
2
|
+
import { getTestInjector } from './test_injector';
|
|
3
|
+
export { async, inject, injectAsync } from './test_injector';
|
|
4
4
|
var _global = (typeof window === 'undefined' ? global : window);
|
|
5
5
|
export var expect = _global.expect;
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/testing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/testing/testing.ts"],"names":[],"mappings":"OAIO,EAAC,SAAS,EAAC,MAAM,oBAAoB;OAErC,EAAsB,eAAe,EAAsB,MAAM,iBAAiB;AAEzF,SAAQ,KAAK,EAAE,MAAM,EAAE,WAAW,QAAO,iBAAiB,CAAC;AAI3D,IAAI,OAAO,GAAQ,CAAC,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAErE,OAAO,IAAI,MAAM,GAAa,OAAO,CAAC,MAAM,CAAC;AAE7C;;;;;;;;GAQG;AACH,OAAO,IAAI,SAAS,GAAa,OAAO,CAAC,SAAS,CAAC;AAEnD;;;;;;;;GAQG;AACH,OAAO,IAAI,QAAQ,GAAa,OAAO,CAAC,QAAQ,CAAC;AAEjD;;GAEG;AACH,OAAO,IAAI,SAAS,GAAa,OAAO,CAAC,SAAS,CAAC;AAEnD;;;;;;;;;GASG;AACH,OAAO,IAAI,SAAS,GAAa,OAAO,CAAC,SAAS,CAAC;AAEnD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CAAC;QACH,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,6DAA6D;YAC7D,EAAE,CAAC,IAAI,CAAC,CAAC;QACX,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,aAAa,KAAe,EAAE,IAAY,EAAE,MAAgB,EAAE,WAAmB;IAC/E,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;;;;GAUG;AACH,2BAA2B,EAAY;IACrC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,mBAAmB,IAAY,EAAE,EAAY,EAAE,OAAO,GAAW,IAAI;IACnE,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;;GAUG;AACH,oBAAoB,IAAY,EAAE,EAAY,EAAE,OAAO,GAAW,IAAI;IACpE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,oBAAoB,IAAY,EAAE,EAAY,EAAE,OAAO,GAAW,IAAI;IACpE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;;GASG;AACH,oBAAoB,IAAY,EAAE,EAAY,EAAE,OAAO,GAAW,IAAI;IACpE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["/**\n * Public Test Library for unit testing Angular2 Applications. Uses the\n * Jasmine framework.\n */\nimport {isPromise} from '../src/facade/lang';\n\nimport {TestInjector, async, getTestInjector, inject, injectAsync} from './test_injector';\n\nexport {async, inject, injectAsync} from './test_injector';\n\ndeclare var global: any /** TODO #9100 */;\n\nvar _global = <any>(typeof window === 'undefined' ? global : window);\n\nexport var expect: Function = _global.expect;\n\n/**\n * Run a function (with an optional asynchronous callback) after each test case.\n *\n * See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='afterEach'}\n */\nexport var afterEach: Function = _global.afterEach;\n\n/**\n * Group test cases together under a common description prefix.\n *\n * See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='describeIt'}\n */\nexport var describe: Function = _global.describe;\n\n/**\n * See {@link fdescribe}.\n */\nexport var ddescribe: Function = _global.fdescribe;\n\n/**\n * Like {@link describe}, but instructs the test runner to only run\n * the test cases in this group. This is useful for debugging.\n *\n * See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='fdescribe'}\n */\nexport var fdescribe: Function = _global.fdescribe;\n\n/**\n * Like {@link describe}, but instructs the test runner to exclude\n * this group of test cases from execution. This is useful for\n * debugging, or for excluding broken tests until they can be fixed.\n *\n * See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='xdescribe'}\n */\nexport var xdescribe: Function = _global.xdescribe;\n\nvar jsmBeforeEach = _global.beforeEach;\nvar jsmIt = _global.it;\nvar jsmIIt = _global.fit;\nvar jsmXIt = _global.xit;\n\nvar testInjector: TestInjector = getTestInjector();\n\n// Reset the test providers before each test.\njsmBeforeEach(() => { testInjector.reset(); });\n\n/**\n * Allows overriding default providers of the test injector,\n * which are defined in test_injector.js.\n *\n * The given function must return a list of DI providers.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='beforeEachProviders'}\n */\nexport function beforeEachProviders(fn: () => Array<any>): void {\n jsmBeforeEach(() => {\n var providers = fn();\n if (!providers) return;\n try {\n testInjector.addProviders(providers);\n } catch (e) {\n throw new Error(\n 'beforeEachProviders was called after the injector had ' +\n 'been used in a beforeEach or it block. This invalidates the ' +\n 'test injector');\n }\n });\n}\n\nfunction _wrapTestFn(fn: Function) {\n // Wraps a test or beforeEach function to handle synchronous and asynchronous execution.\n return (done: any) => {\n if (fn.length === 0) {\n let retVal = fn();\n if (isPromise(retVal)) {\n // Asynchronous test function - wait for completion.\n (<Promise<any>>retVal).then(done, done.fail);\n } else {\n // Synchronous test function - complete immediately.\n done();\n }\n } else {\n // Asynchronous test function that takes \"done\" as parameter.\n fn(done);\n }\n };\n}\n\nfunction _it(jsmFn: Function, name: string, testFn: Function, testTimeOut: number): void {\n jsmFn(name, _wrapTestFn(testFn), testTimeOut);\n}\n\n/**\n * Wrapper around Jasmine beforeEach function.\n *\n * beforeEach may be used with the `inject` function to fetch dependencies.\n *\n * See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='beforeEach'}\n */\nexport function beforeEach(fn: Function): void {\n jsmBeforeEach(_wrapTestFn(fn));\n}\n\n/**\n * Define a single test case with the given test name and execution function.\n *\n * The test function can be either a synchronous function, the result of {@link async},\n * or an injected function created via {@link inject}.\n *\n * Wrapper around Jasmine it function. See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='describeIt'}\n */\nexport function it(name: string, fn: Function, timeOut: number = null): void {\n return _it(jsmIt, name, fn, timeOut);\n}\n\n/**\n * Like {@link it}, but instructs the test runner to exclude this test\n * entirely. Useful for debugging or for excluding broken tests until\n * they can be fixed.\n *\n * Wrapper around Jasmine xit function. See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='xit'}\n */\nexport function xit(name: string, fn: Function, timeOut: number = null): void {\n return _it(jsmXIt, name, fn, timeOut);\n}\n\n/**\n * See {@link fit}.\n */\nexport function iit(name: string, fn: Function, timeOut: number = null): void {\n return _it(jsmIIt, name, fn, timeOut);\n}\n\n/**\n * Like {@link it}, but instructs the test runner to only run this test.\n * Useful for debugging.\n *\n * Wrapper around Jasmine fit function. See http://jasmine.github.io/ for more details.\n *\n * ## Example:\n *\n * {@example testing/ts/testing.ts region='fit'}\n */\nexport function fit(name: string, fn: Function, timeOut: number = null): void {\n return _it(jsmIIt, name, fn, timeOut);\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","metadata":{"expect":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"expect"},"afterEach":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"afterEach"},"describe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"describe"},"ddescribe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"fdescribe"},"fdescribe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"fdescribe"},"xdescribe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"xdescribe"}}}
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"expect":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"expect"},"afterEach":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"afterEach"},"describe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"describe"},"ddescribe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"fdescribe"},"fdescribe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"fdescribe"},"xdescribe":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"_global"},"member":"xdescribe"},"it":{"__symbolic":"function","parameters":["name","fn","timeOut"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"_it"},"arguments":[{"__symbolic":"reference","name":"jsmIt"},{"__symbolic":"reference","name":"name"},{"__symbolic":"reference","name":"fn"},{"__symbolic":"reference","name":"timeOut"}]}},"xit":{"__symbolic":"function","parameters":["name","fn","timeOut"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"_it"},"arguments":[{"__symbolic":"reference","name":"jsmXIt"},{"__symbolic":"reference","name":"name"},{"__symbolic":"reference","name":"fn"},{"__symbolic":"reference","name":"timeOut"}]}},"iit":{"__symbolic":"function","parameters":["name","fn","timeOut"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"_it"},"arguments":[{"__symbolic":"reference","name":"jsmIIt"},{"__symbolic":"reference","name":"name"},{"__symbolic":"reference","name":"fn"},{"__symbolic":"reference","name":"timeOut"}]}},"fit":{"__symbolic":"function","parameters":["name","fn","timeOut"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"_it"},"arguments":[{"__symbolic":"reference","name":"jsmIIt"},{"__symbolic":"reference","name":"name"},{"__symbolic":"reference","name":"fn"},{"__symbolic":"reference","name":"timeOut"}]}}}}
|
package/esm/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../modules/@angular/core/testing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../../../modules/@angular/core/testing.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './testing/fake_async';\nexport * from './testing/lang_utils';\nexport * from './testing/logger';\nexport * from './testing/ng_zone_mock';\nexport * from './testing/regexp';\nexport * from './testing/test_injector';\nexport * from './testing/testing';\nexport * from './testing/mock_application_ref';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/index.d.ts
CHANGED
|
@@ -17,9 +17,10 @@ export * from './src/change_detection';
|
|
|
17
17
|
export * from './src/platform_directives_and_pipes';
|
|
18
18
|
export * from './src/platform_common_providers';
|
|
19
19
|
export * from './src/application_common_providers';
|
|
20
|
-
export * from './src/reflection/reflection';
|
|
21
20
|
export { wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn } from './src/profile/profile';
|
|
22
|
-
export { Type, enableProdMode } from
|
|
23
|
-
export { EventEmitter } from
|
|
24
|
-
export { ExceptionHandler, WrappedException, BaseException } from
|
|
21
|
+
export { Type, enableProdMode } from './src/facade/lang';
|
|
22
|
+
export { EventEmitter } from './src/facade/async';
|
|
23
|
+
export { ExceptionHandler, WrappedException, BaseException } from './src/facade/exceptions';
|
|
25
24
|
export * from './private_export';
|
|
25
|
+
export * from './src/animation/metadata';
|
|
26
|
+
export { AnimationPlayer } from './src/animation/animation_player';
|