{"version":3,"sources":["license.js","loader.js","alias.lint-test.js","binding.lint-test.js","cache.lint-test.js","chains.lint-test.js","computed.lint-test.js","container.lint-test.js","container/lib/container.lint-test.js","container/lib/index.lint-test.js","container/lib/registry.lint-test.js","container/tests/container_test.js","container/tests/container_test.lint-test.js","container/tests/owner_test.js","container/tests/owner_test.lint-test.js","container/tests/registry_test.js","container/tests/registry_test.lint-test.js","core.lint-test.js","dependent_keys.lint-test.js","deprecate_property.lint-test.js","descriptor.lint-test.js","ember-application/lib/index.lint-test.js","ember-application/lib/initializers/dom-templates.lint-test.js","ember-application/lib/system/application-instance.lint-test.js","ember-application/lib/system/application.lint-test.js","ember-application/lib/system/engine-instance.lint-test.js","ember-application/lib/system/engine-parent.lint-test.js","ember-application/lib/system/engine.lint-test.js","ember-application/lib/system/resolver.lint-test.js","ember-application/lib/utils/validate-type.lint-test.js","ember-application/tests/system/application_instance_test.js","ember-application/tests/system/application_instance_test.lint-test.js","ember-application/tests/system/application_test.js","ember-application/tests/system/application_test.lint-test.js","ember-application/tests/system/bootstrap-test.js","ember-application/tests/system/bootstrap-test.lint-test.js","ember-application/tests/system/dependency_injection/custom_resolver_test.js","ember-application/tests/system/dependency_injection/custom_resolver_test.lint-test.js","ember-application/tests/system/dependency_injection/default_resolver_test.js","ember-application/tests/system/dependency_injection/default_resolver_test.lint-test.js","ember-application/tests/system/dependency_injection/normalization_test.js","ember-application/tests/system/dependency_injection/normalization_test.lint-test.js","ember-application/tests/system/dependency_injection/to_string_test.js","ember-application/tests/system/dependency_injection/to_string_test.lint-test.js","ember-application/tests/system/dependency_injection_test.js","ember-application/tests/system/dependency_injection_test.lint-test.js","ember-application/tests/system/engine_initializers_test.js","ember-application/tests/system/engine_initializers_test.lint-test.js","ember-application/tests/system/engine_instance_initializers_test.js","ember-application/tests/system/engine_instance_initializers_test.lint-test.js","ember-application/tests/system/engine_instance_test.js","ember-application/tests/system/engine_instance_test.lint-test.js","ember-application/tests/system/engine_parent_test.js","ember-application/tests/system/engine_parent_test.lint-test.js","ember-application/tests/system/engine_test.js","ember-application/tests/system/engine_test.lint-test.js","ember-application/tests/system/initializers_test.js","ember-application/tests/system/initializers_test.lint-test.js","ember-application/tests/system/instance_initializers_test.js","ember-application/tests/system/instance_initializers_test.lint-test.js","ember-application/tests/system/logging_test.js","ember-application/tests/system/logging_test.lint-test.js","ember-application/tests/system/readiness_test.js","ember-application/tests/system/readiness_test.lint-test.js","ember-application/tests/system/reset_test.js","ember-application/tests/system/reset_test.lint-test.js","ember-application/tests/system/visit_test.js","ember-application/tests/system/visit_test.lint-test.js","ember-application/tests/test-helpers/registry-check.js","ember-application/tests/test-helpers/registry-check.lint-test.js","ember-babel.js","ember-console.lint-test.js","ember-console/lib/index.lint-test.js","ember-debug/deprecate.lint-test.js","ember-debug/error.lint-test.js","ember-debug/features.lint-test.js","ember-debug/handlers.lint-test.js","ember-debug/index.lint-test.js","ember-debug/lib/deprecate.lint-test.js","ember-debug/lib/error.lint-test.js","ember-debug/lib/features.lint-test.js","ember-debug/lib/handlers.lint-test.js","ember-debug/lib/index.lint-test.js","ember-debug/lib/testing.lint-test.js","ember-debug/lib/warn.lint-test.js","ember-debug/testing.lint-test.js","ember-debug/tests/error_test.js","ember-debug/tests/error_test.lint-test.js","ember-debug/tests/handlers-test.js","ember-debug/tests/handlers-test.lint-test.js","ember-debug/tests/main_test.js","ember-debug/tests/main_test.lint-test.js","ember-debug/tests/warn_if_using_stripped_feature_flags_test.js","ember-debug/tests/warn_if_using_stripped_feature_flags_test.lint-test.js","ember-debug/warn.lint-test.js","ember-dev/test-helper/assertion.js","ember-dev/test-helper/debug.js","ember-dev/test-helper/deprecation.js","ember-dev/test-helper/index.js","ember-dev/test-helper/method-call-tracker.js","ember-dev/test-helper/remaining-template.js","ember-dev/test-helper/remaining-view.js","ember-dev/test-helper/run-loop.js","ember-dev/test-helper/setup-qunit.js","ember-dev/test-helper/utils.js","ember-dev/test-helper/warning.js","ember-environment.lint-test.js","ember-environment/lib/global.lint-test.js","ember-environment/lib/index.lint-test.js","ember-environment/lib/utils.lint-test.js","ember-extension-support/lib/container_debug_adapter.lint-test.js","ember-extension-support/lib/data_adapter.lint-test.js","ember-extension-support/lib/index.lint-test.js","ember-extension-support/tests/container_debug_adapter_test.js","ember-extension-support/tests/container_debug_adapter_test.lint-test.js","ember-extension-support/tests/data_adapter_test.js","ember-extension-support/tests/data_adapter_test.lint-test.js","ember-glimmer/tests/integration/application/actions-test.js","ember-glimmer/tests/integration/application/actions-test.lint-test.js","ember-glimmer/tests/integration/application/engine-test.js","ember-glimmer/tests/integration/application/engine-test.lint-test.js","ember-glimmer/tests/integration/application/rendering-test.js","ember-glimmer/tests/integration/application/rendering-test.lint-test.js","ember-glimmer/tests/integration/binding_integration_test.js","ember-glimmer/tests/integration/binding_integration_test.lint-test.js","ember-glimmer/tests/integration/components/append-test.js","ember-glimmer/tests/integration/components/append-test.lint-test.js","ember-glimmer/tests/integration/components/attribute-bindings-test.js","ember-glimmer/tests/integration/components/attribute-bindings-test.lint-test.js","ember-glimmer/tests/integration/components/attrs-lookup-test.js","ember-glimmer/tests/integration/components/attrs-lookup-test.lint-test.js","ember-glimmer/tests/integration/components/class-bindings-test.js","ember-glimmer/tests/integration/components/class-bindings-test.lint-test.js","ember-glimmer/tests/integration/components/contextual-components-test.js","ember-glimmer/tests/integration/components/contextual-components-test.lint-test.js","ember-glimmer/tests/integration/components/curly-components-test.js","ember-glimmer/tests/integration/components/curly-components-test.lint-test.js","ember-glimmer/tests/integration/components/destroy-test.js","ember-glimmer/tests/integration/components/destroy-test.lint-test.js","ember-glimmer/tests/integration/components/dynamic-components-test.js","ember-glimmer/tests/integration/components/dynamic-components-test.lint-test.js","ember-glimmer/tests/integration/components/fragment-components-test.js","ember-glimmer/tests/integration/components/fragment-components-test.lint-test.js","ember-glimmer/tests/integration/components/instrumentation-compile-test.js","ember-glimmer/tests/integration/components/instrumentation-compile-test.lint-test.js","ember-glimmer/tests/integration/components/instrumentation-test.js","ember-glimmer/tests/integration/components/instrumentation-test.lint-test.js","ember-glimmer/tests/integration/components/life-cycle-test.js","ember-glimmer/tests/integration/components/life-cycle-test.lint-test.js","ember-glimmer/tests/integration/components/link-to-test.js","ember-glimmer/tests/integration/components/link-to-test.lint-test.js","ember-glimmer/tests/integration/components/local-lookup-test.js","ember-glimmer/tests/integration/components/local-lookup-test.lint-test.js","ember-glimmer/tests/integration/components/render-to-element-test.js","ember-glimmer/tests/integration/components/render-to-element-test.lint-test.js","ember-glimmer/tests/integration/components/target-action-test.js","ember-glimmer/tests/integration/components/target-action-test.lint-test.js","ember-glimmer/tests/integration/components/utils-test.js","ember-glimmer/tests/integration/components/utils-test.lint-test.js","ember-glimmer/tests/integration/components/web-component-fallback-test.js","ember-glimmer/tests/integration/components/web-component-fallback-test.lint-test.js","ember-glimmer/tests/integration/components/will-destroy-element-hook-test.js","ember-glimmer/tests/integration/components/will-destroy-element-hook-test.lint-test.js","ember-glimmer/tests/integration/content-test.js","ember-glimmer/tests/integration/content-test.lint-test.js","ember-glimmer/tests/integration/custom-component-manager-test.js","ember-glimmer/tests/integration/custom-component-manager-test.lint-test.js","ember-glimmer/tests/integration/event-dispatcher-test.js","ember-glimmer/tests/integration/event-dispatcher-test.lint-test.js","ember-glimmer/tests/integration/helpers/-class-test.js","ember-glimmer/tests/integration/helpers/-class-test.lint-test.js","ember-glimmer/tests/integration/helpers/closure-action-test.js","ember-glimmer/tests/integration/helpers/closure-action-test.lint-test.js","ember-glimmer/tests/integration/helpers/concat-test.js","ember-glimmer/tests/integration/helpers/concat-test.lint-test.js","ember-glimmer/tests/integration/helpers/custom-helper-test.js","ember-glimmer/tests/integration/helpers/custom-helper-test.lint-test.js","ember-glimmer/tests/integration/helpers/element-action-test.js","ember-glimmer/tests/integration/helpers/element-action-test.lint-test.js","ember-glimmer/tests/integration/helpers/get-test.js","ember-glimmer/tests/integration/helpers/get-test.lint-test.js","ember-glimmer/tests/integration/helpers/hash-test.js","ember-glimmer/tests/integration/helpers/hash-test.lint-test.js","ember-glimmer/tests/integration/helpers/if-unless-test.js","ember-glimmer/tests/integration/helpers/if-unless-test.lint-test.js","ember-glimmer/tests/integration/helpers/input-test.js","ember-glimmer/tests/integration/helpers/input-test.lint-test.js","ember-glimmer/tests/integration/helpers/loc-test.js","ember-glimmer/tests/integration/helpers/loc-test.lint-test.js","ember-glimmer/tests/integration/helpers/log-test.js","ember-glimmer/tests/integration/helpers/log-test.lint-test.js","ember-glimmer/tests/integration/helpers/mut-test.js","ember-glimmer/tests/integration/helpers/mut-test.lint-test.js","ember-glimmer/tests/integration/helpers/partial-test.js","ember-glimmer/tests/integration/helpers/partial-test.lint-test.js","ember-glimmer/tests/integration/helpers/readonly-test.js","ember-glimmer/tests/integration/helpers/readonly-test.lint-test.js","ember-glimmer/tests/integration/helpers/render-test.js","ember-glimmer/tests/integration/helpers/render-test.lint-test.js","ember-glimmer/tests/integration/helpers/text-area-test.js","ember-glimmer/tests/integration/helpers/text-area-test.lint-test.js","ember-glimmer/tests/integration/helpers/unbound-test.js","ember-glimmer/tests/integration/helpers/unbound-test.lint-test.js","ember-glimmer/tests/integration/helpers/yield-test.js","ember-glimmer/tests/integration/helpers/yield-test.lint-test.js","ember-glimmer/tests/integration/input-test.js","ember-glimmer/tests/integration/input-test.lint-test.js","ember-glimmer/tests/integration/mount-test.js","ember-glimmer/tests/integration/mount-test.lint-test.js","ember-glimmer/tests/integration/outlet-test.js","ember-glimmer/tests/integration/outlet-test.lint-test.js","ember-glimmer/tests/integration/refinements-test.js","ember-glimmer/tests/integration/refinements-test.lint-test.js","ember-glimmer/tests/integration/svg-test.js","ember-glimmer/tests/integration/svg-test.lint-test.js","ember-glimmer/tests/integration/syntax/each-in-test.js","ember-glimmer/tests/integration/syntax/each-in-test.lint-test.js","ember-glimmer/tests/integration/syntax/each-test.js","ember-glimmer/tests/integration/syntax/each-test.lint-test.js","ember-glimmer/tests/integration/syntax/experimental-syntax-test.js","ember-glimmer/tests/integration/syntax/experimental-syntax-test.lint-test.js","ember-glimmer/tests/integration/syntax/if-unless-test.js","ember-glimmer/tests/integration/syntax/if-unless-test.lint-test.js","ember-glimmer/tests/integration/syntax/in-element-test.js","ember-glimmer/tests/integration/syntax/in-element-test.lint-test.js","ember-glimmer/tests/integration/syntax/with-dynamic-var-test.js","ember-glimmer/tests/integration/syntax/with-dynamic-var-test.lint-test.js","ember-glimmer/tests/integration/syntax/with-test.js","ember-glimmer/tests/integration/syntax/with-test.lint-test.js","ember-glimmer/tests/unit/layout-cache-test.js","ember-glimmer/tests/unit/layout-cache-test.lint-test.js","ember-glimmer/tests/unit/outlet-test.js","ember-glimmer/tests/unit/outlet-test.lint-test.js","ember-glimmer/tests/unit/template-factory-test.js","ember-glimmer/tests/unit/template-factory-test.lint-test.js","ember-glimmer/tests/unit/utils/debug-stack-test.js","ember-glimmer/tests/unit/utils/debug-stack-test.lint-test.js","ember-glimmer/tests/unit/utils/iterable-test.js","ember-glimmer/tests/unit/utils/iterable-test.lint-test.js","ember-glimmer/tests/utils/abstract-test-case.js","ember-glimmer/tests/utils/abstract-test-case.lint-test.js","ember-glimmer/tests/utils/helpers.js","ember-glimmer/tests/utils/helpers.lint-test.js","ember-glimmer/tests/utils/shared-conditional-tests.js","ember-glimmer/tests/utils/shared-conditional-tests.lint-test.js","ember-glimmer/tests/utils/string-test.js","ember-glimmer/tests/utils/string-test.lint-test.js","ember-glimmer/tests/utils/test-case.js","ember-glimmer/tests/utils/test-case.lint-test.js","ember-glimmer/tests/utils/test-helpers.js","ember-glimmer/tests/utils/test-helpers.lint-test.js","ember-metal/lib/alias.lint-test.js","ember-metal/lib/binding.lint-test.js","ember-metal/lib/cache.lint-test.js","ember-metal/lib/chains.lint-test.js","ember-metal/lib/computed.lint-test.js","ember-metal/lib/core.lint-test.js","ember-metal/lib/dependent_keys.lint-test.js","ember-metal/lib/deprecate_property.lint-test.js","ember-metal/lib/descriptor.lint-test.js","ember-metal/lib/error_handler.lint-test.js","ember-metal/lib/events.lint-test.js","ember-metal/lib/expand_properties.lint-test.js","ember-metal/lib/get_properties.lint-test.js","ember-metal/lib/index.lint-test.js","ember-metal/lib/injected_property.lint-test.js","ember-metal/lib/instrumentation.lint-test.js","ember-metal/lib/is_blank.lint-test.js","ember-metal/lib/is_empty.lint-test.js","ember-metal/lib/is_none.lint-test.js","ember-metal/lib/is_present.lint-test.js","ember-metal/lib/is_proxy.lint-test.js","ember-metal/lib/libraries.lint-test.js","ember-metal/lib/map.lint-test.js","ember-metal/lib/merge.lint-test.js","ember-metal/lib/meta.lint-test.js","ember-metal/lib/meta_listeners.lint-test.js","ember-metal/lib/mixin.lint-test.js","ember-metal/lib/observer.lint-test.js","ember-metal/lib/observer_set.lint-test.js","ember-metal/lib/path_cache.lint-test.js","ember-metal/lib/properties.lint-test.js","ember-metal/lib/property_events.lint-test.js","ember-metal/lib/property_get.lint-test.js","ember-metal/lib/property_set.lint-test.js","ember-metal/lib/replace.lint-test.js","ember-metal/lib/run_loop.lint-test.js","ember-metal/lib/set_properties.lint-test.js","ember-metal/lib/tags.lint-test.js","ember-metal/lib/transaction.lint-test.js","ember-metal/lib/watch_key.lint-test.js","ember-metal/lib/watch_path.lint-test.js","ember-metal/lib/watching.lint-test.js","ember-metal/lib/weak_map.lint-test.js","ember-metal/tests/accessors/get_path_test.js","ember-metal/tests/accessors/get_path_test.lint-test.js","ember-metal/tests/accessors/get_properties_test.js","ember-metal/tests/accessors/get_properties_test.lint-test.js","ember-metal/tests/accessors/get_test.js","ember-metal/tests/accessors/get_test.lint-test.js","ember-metal/tests/accessors/is_global_path_test.js","ember-metal/tests/accessors/is_global_path_test.lint-test.js","ember-metal/tests/accessors/mandatory_setters_test.js","ember-metal/tests/accessors/mandatory_setters_test.lint-test.js","ember-metal/tests/accessors/set_path_test.js","ember-metal/tests/accessors/set_path_test.lint-test.js","ember-metal/tests/accessors/set_test.js","ember-metal/tests/accessors/set_test.lint-test.js","ember-metal/tests/alias_test.js","ember-metal/tests/alias_test.lint-test.js","ember-metal/tests/binding/connect_test.js","ember-metal/tests/binding/connect_test.lint-test.js","ember-metal/tests/binding/sync_test.js","ember-metal/tests/binding/sync_test.lint-test.js","ember-metal/tests/cache_test.js","ember-metal/tests/cache_test.lint-test.js","ember-metal/tests/chains_test.js","ember-metal/tests/chains_test.lint-test.js","ember-metal/tests/computed_test.js","ember-metal/tests/computed_test.lint-test.js","ember-metal/tests/descriptor_test.js","ember-metal/tests/descriptor_test.lint-test.js","ember-metal/tests/events_test.js","ember-metal/tests/events_test.lint-test.js","ember-metal/tests/expand_properties_test.js","ember-metal/tests/expand_properties_test.lint-test.js","ember-metal/tests/injected_property_test.js","ember-metal/tests/injected_property_test.lint-test.js","ember-metal/tests/instrumentation_test.js","ember-metal/tests/instrumentation_test.lint-test.js","ember-metal/tests/is_blank_test.js","ember-metal/tests/is_blank_test.lint-test.js","ember-metal/tests/is_empty_test.js","ember-metal/tests/is_empty_test.lint-test.js","ember-metal/tests/is_none_test.js","ember-metal/tests/is_none_test.lint-test.js","ember-metal/tests/is_present_test.js","ember-metal/tests/is_present_test.lint-test.js","ember-metal/tests/libraries_test.js","ember-metal/tests/libraries_test.lint-test.js","ember-metal/tests/main_test.js","ember-metal/tests/main_test.lint-test.js","ember-metal/tests/map_test.js","ember-metal/tests/map_test.lint-test.js","ember-metal/tests/meta_test.js","ember-metal/tests/meta_test.lint-test.js","ember-metal/tests/mixin/alias_method_test.js","ember-metal/tests/mixin/alias_method_test.lint-test.js","ember-metal/tests/mixin/apply_test.js","ember-metal/tests/mixin/apply_test.lint-test.js","ember-metal/tests/mixin/computed_test.js","ember-metal/tests/mixin/computed_test.lint-test.js","ember-metal/tests/mixin/concatenated_properties_test.js","ember-metal/tests/mixin/concatenated_properties_test.lint-test.js","ember-metal/tests/mixin/detect_test.js","ember-metal/tests/mixin/detect_test.lint-test.js","ember-metal/tests/mixin/introspection_test.js","ember-metal/tests/mixin/introspection_test.lint-test.js","ember-metal/tests/mixin/merged_properties_test.js","ember-metal/tests/mixin/merged_properties_test.lint-test.js","ember-metal/tests/mixin/method_test.js","ember-metal/tests/mixin/method_test.lint-test.js","ember-metal/tests/mixin/observer_test.js","ember-metal/tests/mixin/observer_test.lint-test.js","ember-metal/tests/mixin/reopen_test.js","ember-metal/tests/mixin/reopen_test.lint-test.js","ember-metal/tests/mixin/required_test.js","ember-metal/tests/mixin/required_test.lint-test.js","ember-metal/tests/mixin/without_test.js","ember-metal/tests/mixin/without_test.lint-test.js","ember-metal/tests/observer_test.js","ember-metal/tests/observer_test.lint-test.js","ember-metal/tests/performance_test.js","ember-metal/tests/performance_test.lint-test.js","ember-metal/tests/properties_test.js","ember-metal/tests/properties_test.lint-test.js","ember-metal/tests/property_did_change_hook.js","ember-metal/tests/property_did_change_hook.lint-test.js","ember-metal/tests/run_loop/add_queue_test.js","ember-metal/tests/run_loop/add_queue_test.lint-test.js","ember-metal/tests/run_loop/debounce_test.js","ember-metal/tests/run_loop/debounce_test.lint-test.js","ember-metal/tests/run_loop/later_test.js","ember-metal/tests/run_loop/later_test.lint-test.js","ember-metal/tests/run_loop/next_test.js","ember-metal/tests/run_loop/next_test.lint-test.js","ember-metal/tests/run_loop/once_test.js","ember-metal/tests/run_loop/once_test.lint-test.js","ember-metal/tests/run_loop/onerror_test.js","ember-metal/tests/run_loop/onerror_test.lint-test.js","ember-metal/tests/run_loop/run_bind_test.js","ember-metal/tests/run_loop/run_bind_test.lint-test.js","ember-metal/tests/run_loop/run_test.js","ember-metal/tests/run_loop/run_test.lint-test.js","ember-metal/tests/run_loop/schedule_test.js","ember-metal/tests/run_loop/schedule_test.lint-test.js","ember-metal/tests/run_loop/sync_test.js","ember-metal/tests/run_loop/sync_test.lint-test.js","ember-metal/tests/run_loop/unwind_test.js","ember-metal/tests/run_loop/unwind_test.lint-test.js","ember-metal/tests/set_properties_test.js","ember-metal/tests/set_properties_test.lint-test.js","ember-metal/tests/watching/is_watching_test.js","ember-metal/tests/watching/is_watching_test.lint-test.js","ember-metal/tests/watching/unwatch_test.js","ember-metal/tests/watching/unwatch_test.lint-test.js","ember-metal/tests/watching/watch_test.js","ember-metal/tests/watching/watch_test.lint-test.js","ember-metal/tests/weak_map_test.js","ember-metal/tests/weak_map_test.lint-test.js","ember-routing/lib/ext/controller.lint-test.js","ember-routing/lib/ext/run_loop.lint-test.js","ember-routing/lib/index.lint-test.js","ember-routing/lib/location/api.lint-test.js","ember-routing/lib/location/auto_location.lint-test.js","ember-routing/lib/location/hash_location.lint-test.js","ember-routing/lib/location/history_location.lint-test.js","ember-routing/lib/location/none_location.lint-test.js","ember-routing/lib/location/util.lint-test.js","ember-routing/lib/services/router.lint-test.js","ember-routing/lib/services/routing.lint-test.js","ember-routing/lib/system/cache.lint-test.js","ember-routing/lib/system/controller_for.lint-test.js","ember-routing/lib/system/dsl.lint-test.js","ember-routing/lib/system/generate_controller.lint-test.js","ember-routing/lib/system/query_params.lint-test.js","ember-routing/lib/system/route.lint-test.js","ember-routing/lib/system/router.lint-test.js","ember-routing/lib/system/router_state.lint-test.js","ember-routing/lib/utils.lint-test.js","ember-routing/tests/ext/controller_test.js","ember-routing/tests/ext/controller_test.lint-test.js","ember-routing/tests/location/auto_location_test.js","ember-routing/tests/location/auto_location_test.lint-test.js","ember-routing/tests/location/hash_location_test.js","ember-routing/tests/location/hash_location_test.lint-test.js","ember-routing/tests/location/history_location_test.js","ember-routing/tests/location/history_location_test.lint-test.js","ember-routing/tests/location/none_location_test.js","ember-routing/tests/location/none_location_test.lint-test.js","ember-routing/tests/location/util_test.js","ember-routing/tests/location/util_test.lint-test.js","ember-routing/tests/system/cache_test.js","ember-routing/tests/system/cache_test.lint-test.js","ember-routing/tests/system/controller_for_test.js","ember-routing/tests/system/controller_for_test.lint-test.js","ember-routing/tests/system/dsl_test.js","ember-routing/tests/system/dsl_test.lint-test.js","ember-routing/tests/system/route_test.js","ember-routing/tests/system/route_test.lint-test.js","ember-routing/tests/system/router_test.js","ember-routing/tests/system/router_test.lint-test.js","ember-routing/tests/utils_test.js","ember-routing/tests/utils_test.lint-test.js","ember-runtime/lib/compare.lint-test.js","ember-runtime/lib/computed/computed_macros.lint-test.js","ember-runtime/lib/computed/reduce_computed_macros.lint-test.js","ember-runtime/lib/controllers/controller.lint-test.js","ember-runtime/lib/copy.lint-test.js","ember-runtime/lib/ext/function.lint-test.js","ember-runtime/lib/ext/rsvp.lint-test.js","ember-runtime/lib/ext/string.lint-test.js","ember-runtime/lib/index.lint-test.js","ember-runtime/lib/inject.lint-test.js","ember-runtime/lib/is-equal.lint-test.js","ember-runtime/lib/mixins/-proxy.lint-test.js","ember-runtime/lib/mixins/action_handler.lint-test.js","ember-runtime/lib/mixins/array.lint-test.js","ember-runtime/lib/mixins/comparable.lint-test.js","ember-runtime/lib/mixins/container_proxy.lint-test.js","ember-runtime/lib/mixins/controller.lint-test.js","ember-runtime/lib/mixins/copyable.lint-test.js","ember-runtime/lib/mixins/enumerable.lint-test.js","ember-runtime/lib/mixins/evented.lint-test.js","ember-runtime/lib/mixins/freezable.lint-test.js","ember-runtime/lib/mixins/mutable_array.lint-test.js","ember-runtime/lib/mixins/mutable_enumerable.lint-test.js","ember-runtime/lib/mixins/observable.lint-test.js","ember-runtime/lib/mixins/promise_proxy.lint-test.js","ember-runtime/lib/mixins/registry_proxy.lint-test.js","ember-runtime/lib/mixins/target_action_support.lint-test.js","ember-runtime/lib/string_registry.lint-test.js","ember-runtime/lib/system/application.lint-test.js","ember-runtime/lib/system/array_proxy.lint-test.js","ember-runtime/lib/system/core_object.lint-test.js","ember-runtime/lib/system/lazy_load.lint-test.js","ember-runtime/lib/system/namespace.lint-test.js","ember-runtime/lib/system/native_array.lint-test.js","ember-runtime/lib/system/object.lint-test.js","ember-runtime/lib/system/object_proxy.lint-test.js","ember-runtime/lib/system/service.lint-test.js","ember-runtime/lib/system/string.lint-test.js","ember-runtime/lib/utils.lint-test.js","ember-runtime/tests/computed/computed_macros_test.js","ember-runtime/tests/computed/computed_macros_test.lint-test.js","ember-runtime/tests/computed/reduce_computed_macros_test.js","ember-runtime/tests/computed/reduce_computed_macros_test.lint-test.js","ember-runtime/tests/controllers/controller_test.js","ember-runtime/tests/controllers/controller_test.lint-test.js","ember-runtime/tests/core/compare_test.js","ember-runtime/tests/core/compare_test.lint-test.js","ember-runtime/tests/core/copy_test.js","ember-runtime/tests/core/copy_test.lint-test.js","ember-runtime/tests/core/isEqual_test.js","ember-runtime/tests/core/isEqual_test.lint-test.js","ember-runtime/tests/core/is_array_test.js","ember-runtime/tests/core/is_array_test.lint-test.js","ember-runtime/tests/core/is_empty_test.js","ember-runtime/tests/core/is_empty_test.lint-test.js","ember-runtime/tests/core/type_of_test.js","ember-runtime/tests/core/type_of_test.lint-test.js","ember-runtime/tests/ext/function_test.js","ember-runtime/tests/ext/function_test.lint-test.js","ember-runtime/tests/ext/mixin_test.js","ember-runtime/tests/ext/mixin_test.lint-test.js","ember-runtime/tests/ext/rsvp_test.js","ember-runtime/tests/ext/rsvp_test.lint-test.js","ember-runtime/tests/inject_test.js","ember-runtime/tests/inject_test.lint-test.js","ember-runtime/tests/legacy_1x/mixins/observable/chained_test.js","ember-runtime/tests/legacy_1x/mixins/observable/chained_test.lint-test.js","ember-runtime/tests/legacy_1x/mixins/observable/observable_test.js","ember-runtime/tests/legacy_1x/mixins/observable/observable_test.lint-test.js","ember-runtime/tests/legacy_1x/mixins/observable/observersForKey_test.js","ember-runtime/tests/legacy_1x/mixins/observable/observersForKey_test.lint-test.js","ember-runtime/tests/legacy_1x/mixins/observable/propertyChanges_test.js","ember-runtime/tests/legacy_1x/mixins/observable/propertyChanges_test.lint-test.js","ember-runtime/tests/legacy_1x/system/binding_test.js","ember-runtime/tests/legacy_1x/system/binding_test.lint-test.js","ember-runtime/tests/legacy_1x/system/object/base_test.js","ember-runtime/tests/legacy_1x/system/object/base_test.lint-test.js","ember-runtime/tests/legacy_1x/system/object/bindings_test.js","ember-runtime/tests/legacy_1x/system/object/bindings_test.lint-test.js","ember-runtime/tests/legacy_1x/system/object/concatenated_test.js","ember-runtime/tests/legacy_1x/system/object/concatenated_test.lint-test.js","ember-runtime/tests/legacy_1x/system/run_loop_test.js","ember-runtime/tests/legacy_1x/system/run_loop_test.lint-test.js","ember-runtime/tests/main_test.js","ember-runtime/tests/main_test.lint-test.js","ember-runtime/tests/mixins/array_test.js","ember-runtime/tests/mixins/array_test.lint-test.js","ember-runtime/tests/mixins/comparable_test.js","ember-runtime/tests/mixins/comparable_test.lint-test.js","ember-runtime/tests/mixins/container_proxy_test.js","ember-runtime/tests/mixins/container_proxy_test.lint-test.js","ember-runtime/tests/mixins/copyable_test.js","ember-runtime/tests/mixins/copyable_test.lint-test.js","ember-runtime/tests/mixins/enumerable_test.js","ember-runtime/tests/mixins/enumerable_test.lint-test.js","ember-runtime/tests/mixins/freezable_test.js","ember-runtime/tests/mixins/freezable_test.lint-test.js","ember-runtime/tests/mixins/mutable_array_test.js","ember-runtime/tests/mixins/mutable_array_test.lint-test.js","ember-runtime/tests/mixins/mutable_enumerable_test.js","ember-runtime/tests/mixins/mutable_enumerable_test.lint-test.js","ember-runtime/tests/mixins/observable_test.js","ember-runtime/tests/mixins/observable_test.lint-test.js","ember-runtime/tests/mixins/promise_proxy_test.js","ember-runtime/tests/mixins/promise_proxy_test.lint-test.js","ember-runtime/tests/mixins/target_action_support_test.js","ember-runtime/tests/mixins/target_action_support_test.lint-test.js","ember-runtime/tests/suites/array.js","ember-runtime/tests/suites/array.lint-test.js","ember-runtime/tests/suites/array/includes.js","ember-runtime/tests/suites/array/includes.lint-test.js","ember-runtime/tests/suites/array/indexOf.js","ember-runtime/tests/suites/array/indexOf.lint-test.js","ember-runtime/tests/suites/array/lastIndexOf.js","ember-runtime/tests/suites/array/lastIndexOf.lint-test.js","ember-runtime/tests/suites/array/objectAt.js","ember-runtime/tests/suites/array/objectAt.lint-test.js","ember-runtime/tests/suites/copyable.js","ember-runtime/tests/suites/copyable.lint-test.js","ember-runtime/tests/suites/copyable/copy.js","ember-runtime/tests/suites/copyable/copy.lint-test.js","ember-runtime/tests/suites/copyable/frozenCopy.js","ember-runtime/tests/suites/copyable/frozenCopy.lint-test.js","ember-runtime/tests/suites/enumerable.js","ember-runtime/tests/suites/enumerable.lint-test.js","ember-runtime/tests/suites/enumerable/any.js","ember-runtime/tests/suites/enumerable/any.lint-test.js","ember-runtime/tests/suites/enumerable/compact.js","ember-runtime/tests/suites/enumerable/compact.lint-test.js","ember-runtime/tests/suites/enumerable/contains.js","ember-runtime/tests/suites/enumerable/contains.lint-test.js","ember-runtime/tests/suites/enumerable/every.js","ember-runtime/tests/suites/enumerable/every.lint-test.js","ember-runtime/tests/suites/enumerable/filter.js","ember-runtime/tests/suites/enumerable/filter.lint-test.js","ember-runtime/tests/suites/enumerable/find.js","ember-runtime/tests/suites/enumerable/find.lint-test.js","ember-runtime/tests/suites/enumerable/firstObject.js","ember-runtime/tests/suites/enumerable/firstObject.lint-test.js","ember-runtime/tests/suites/enumerable/forEach.js","ember-runtime/tests/suites/enumerable/forEach.lint-test.js","ember-runtime/tests/suites/enumerable/includes.js","ember-runtime/tests/suites/enumerable/includes.lint-test.js","ember-runtime/tests/suites/enumerable/invoke.js","ember-runtime/tests/suites/enumerable/invoke.lint-test.js","ember-runtime/tests/suites/enumerable/is_any.js","ember-runtime/tests/suites/enumerable/is_any.lint-test.js","ember-runtime/tests/suites/enumerable/lastObject.js","ember-runtime/tests/suites/enumerable/lastObject.lint-test.js","ember-runtime/tests/suites/enumerable/map.js","ember-runtime/tests/suites/enumerable/map.lint-test.js","ember-runtime/tests/suites/enumerable/mapBy.js","ember-runtime/tests/suites/enumerable/mapBy.lint-test.js","ember-runtime/tests/suites/enumerable/reduce.js","ember-runtime/tests/suites/enumerable/reduce.lint-test.js","ember-runtime/tests/suites/enumerable/reject.js","ember-runtime/tests/suites/enumerable/reject.lint-test.js","ember-runtime/tests/suites/enumerable/sortBy.js","ember-runtime/tests/suites/enumerable/sortBy.lint-test.js","ember-runtime/tests/suites/enumerable/toArray.js","ember-runtime/tests/suites/enumerable/toArray.lint-test.js","ember-runtime/tests/suites/enumerable/uniq.js","ember-runtime/tests/suites/enumerable/uniq.lint-test.js","ember-runtime/tests/suites/enumerable/uniqBy.js","ember-runtime/tests/suites/enumerable/uniqBy.lint-test.js","ember-runtime/tests/suites/enumerable/without.js","ember-runtime/tests/suites/enumerable/without.lint-test.js","ember-runtime/tests/suites/mutable_array.js","ember-runtime/tests/suites/mutable_array.lint-test.js","ember-runtime/tests/suites/mutable_array/addObject.js","ember-runtime/tests/suites/mutable_array/addObject.lint-test.js","ember-runtime/tests/suites/mutable_array/clear.js","ember-runtime/tests/suites/mutable_array/clear.lint-test.js","ember-runtime/tests/suites/mutable_array/insertAt.js","ember-runtime/tests/suites/mutable_array/insertAt.lint-test.js","ember-runtime/tests/suites/mutable_array/popObject.js","ember-runtime/tests/suites/mutable_array/popObject.lint-test.js","ember-runtime/tests/suites/mutable_array/pushObject.js","ember-runtime/tests/suites/mutable_array/pushObject.lint-test.js","ember-runtime/tests/suites/mutable_array/pushObjects.js","ember-runtime/tests/suites/mutable_array/pushObjects.lint-test.js","ember-runtime/tests/suites/mutable_array/removeAt.js","ember-runtime/tests/suites/mutable_array/removeAt.lint-test.js","ember-runtime/tests/suites/mutable_array/removeObject.js","ember-runtime/tests/suites/mutable_array/removeObject.lint-test.js","ember-runtime/tests/suites/mutable_array/replace.js","ember-runtime/tests/suites/mutable_array/replace.lint-test.js","ember-runtime/tests/suites/mutable_array/reverseObjects.js","ember-runtime/tests/suites/mutable_array/reverseObjects.lint-test.js","ember-runtime/tests/suites/mutable_array/setObjects.js","ember-runtime/tests/suites/mutable_array/setObjects.lint-test.js","ember-runtime/tests/suites/mutable_array/shiftObject.js","ember-runtime/tests/suites/mutable_array/shiftObject.lint-test.js","ember-runtime/tests/suites/mutable_array/unshiftObject.js","ember-runtime/tests/suites/mutable_array/unshiftObject.lint-test.js","ember-runtime/tests/suites/mutable_array/unshiftObjects.js","ember-runtime/tests/suites/mutable_array/unshiftObjects.lint-test.js","ember-runtime/tests/suites/mutable_enumerable.js","ember-runtime/tests/suites/mutable_enumerable.lint-test.js","ember-runtime/tests/suites/mutable_enumerable/addObject.js","ember-runtime/tests/suites/mutable_enumerable/addObject.lint-test.js","ember-runtime/tests/suites/mutable_enumerable/removeObject.js","ember-runtime/tests/suites/mutable_enumerable/removeObject.lint-test.js","ember-runtime/tests/suites/mutable_enumerable/removeObjects.js","ember-runtime/tests/suites/mutable_enumerable/removeObjects.lint-test.js","ember-runtime/tests/suites/suite.js","ember-runtime/tests/suites/suite.lint-test.js","ember-runtime/tests/system/application/base_test.js","ember-runtime/tests/system/application/base_test.lint-test.js","ember-runtime/tests/system/array_proxy/arranged_content_test.js","ember-runtime/tests/system/array_proxy/arranged_content_test.lint-test.js","ember-runtime/tests/system/array_proxy/content_change_test.js","ember-runtime/tests/system/array_proxy/content_change_test.lint-test.js","ember-runtime/tests/system/array_proxy/content_update_test.js","ember-runtime/tests/system/array_proxy/content_update_test.lint-test.js","ember-runtime/tests/system/array_proxy/length_test.js","ember-runtime/tests/system/array_proxy/length_test.lint-test.js","ember-runtime/tests/system/array_proxy/suite_test.js","ember-runtime/tests/system/array_proxy/suite_test.lint-test.js","ember-runtime/tests/system/array_proxy/watching_and_listening_test.js","ember-runtime/tests/system/array_proxy/watching_and_listening_test.lint-test.js","ember-runtime/tests/system/core_object_test.js","ember-runtime/tests/system/core_object_test.lint-test.js","ember-runtime/tests/system/lazy_load_test.js","ember-runtime/tests/system/lazy_load_test.lint-test.js","ember-runtime/tests/system/namespace/base_test.js","ember-runtime/tests/system/namespace/base_test.lint-test.js","ember-runtime/tests/system/native_array/a_test.js","ember-runtime/tests/system/native_array/a_test.lint-test.js","ember-runtime/tests/system/native_array/copyable_suite_test.js","ember-runtime/tests/system/native_array/copyable_suite_test.lint-test.js","ember-runtime/tests/system/native_array/replace_test.js","ember-runtime/tests/system/native_array/replace_test.lint-test.js","ember-runtime/tests/system/native_array/suite_test.js","ember-runtime/tests/system/native_array/suite_test.lint-test.js","ember-runtime/tests/system/object/computed_test.js","ember-runtime/tests/system/object/computed_test.lint-test.js","ember-runtime/tests/system/object/create_test.js","ember-runtime/tests/system/object/create_test.lint-test.js","ember-runtime/tests/system/object/destroy_test.js","ember-runtime/tests/system/object/destroy_test.lint-test.js","ember-runtime/tests/system/object/detectInstance_test.js","ember-runtime/tests/system/object/detectInstance_test.lint-test.js","ember-runtime/tests/system/object/detect_test.js","ember-runtime/tests/system/object/detect_test.lint-test.js","ember-runtime/tests/system/object/es-compatibility-test.js","ember-runtime/tests/system/object/es-compatibility-test.lint-test.js","ember-runtime/tests/system/object/events_test.js","ember-runtime/tests/system/object/events_test.lint-test.js","ember-runtime/tests/system/object/extend_test.js","ember-runtime/tests/system/object/extend_test.lint-test.js","ember-runtime/tests/system/object/observer_test.js","ember-runtime/tests/system/object/observer_test.lint-test.js","ember-runtime/tests/system/object/reopenClass_test.js","ember-runtime/tests/system/object/reopenClass_test.lint-test.js","ember-runtime/tests/system/object/reopen_test.js","ember-runtime/tests/system/object/reopen_test.lint-test.js","ember-runtime/tests/system/object/strict-mode-test.js","ember-runtime/tests/system/object/strict-mode-test.lint-test.js","ember-runtime/tests/system/object/subclasses_test.js","ember-runtime/tests/system/object/subclasses_test.lint-test.js","ember-runtime/tests/system/object/toString_test.js","ember-runtime/tests/system/object/toString_test.lint-test.js","ember-runtime/tests/system/object_proxy_test.js","ember-runtime/tests/system/object_proxy_test.lint-test.js","ember-runtime/tests/system/string/camelize_test.js","ember-runtime/tests/system/string/camelize_test.lint-test.js","ember-runtime/tests/system/string/capitalize_test.js","ember-runtime/tests/system/string/capitalize_test.lint-test.js","ember-runtime/tests/system/string/classify_test.js","ember-runtime/tests/system/string/classify_test.lint-test.js","ember-runtime/tests/system/string/dasherize_test.js","ember-runtime/tests/system/string/dasherize_test.lint-test.js","ember-runtime/tests/system/string/decamelize_test.js","ember-runtime/tests/system/string/decamelize_test.lint-test.js","ember-runtime/tests/system/string/fmt_string_test.js","ember-runtime/tests/system/string/fmt_string_test.lint-test.js","ember-runtime/tests/system/string/loc_test.js","ember-runtime/tests/system/string/loc_test.lint-test.js","ember-runtime/tests/system/string/underscore_test.js","ember-runtime/tests/system/string/underscore_test.lint-test.js","ember-runtime/tests/system/string/w_test.js","ember-runtime/tests/system/string/w_test.lint-test.js","ember-template-compiler/compat.lint-test.js","ember-template-compiler/index.lint-test.js","ember-template-compiler/lib/compat.lint-test.js","ember-template-compiler/lib/index.lint-test.js","ember-template-compiler/lib/plugins/assert-input-helper-without-block.lint-test.js","ember-template-compiler/lib/plugins/assert-reserved-named-arguments.lint-test.js","ember-template-compiler/lib/plugins/deprecate-render-model.lint-test.js","ember-template-compiler/lib/plugins/deprecate-render.lint-test.js","ember-template-compiler/lib/plugins/extract-pragma-tag.lint-test.js","ember-template-compiler/lib/plugins/index.lint-test.js","ember-template-compiler/lib/plugins/transform-action-syntax.lint-test.js","ember-template-compiler/lib/plugins/transform-angle-bracket-components.lint-test.js","ember-template-compiler/lib/plugins/transform-attrs-into-args.lint-test.js","ember-template-compiler/lib/plugins/transform-dot-component-invocation.lint-test.js","ember-template-compiler/lib/plugins/transform-each-in-into-each.lint-test.js","ember-template-compiler/lib/plugins/transform-has-block-syntax.lint-test.js","ember-template-compiler/lib/plugins/transform-inline-link-to.lint-test.js","ember-template-compiler/lib/plugins/transform-input-on-to-onEvent.lint-test.js","ember-template-compiler/lib/plugins/transform-input-type-syntax.lint-test.js","ember-template-compiler/lib/plugins/transform-old-binding-syntax.lint-test.js","ember-template-compiler/lib/plugins/transform-old-class-binding-syntax.lint-test.js","ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.lint-test.js","ember-template-compiler/lib/plugins/transform-top-level-components.lint-test.js","ember-template-compiler/lib/system/bootstrap.lint-test.js","ember-template-compiler/lib/system/calculate-location-display.lint-test.js","ember-template-compiler/lib/system/compile-options.lint-test.js","ember-template-compiler/lib/system/compile.lint-test.js","ember-template-compiler/lib/system/precompile.lint-test.js","ember-template-compiler/plugins/assert-input-helper-without-block.lint-test.js","ember-template-compiler/plugins/assert-reserved-named-arguments.lint-test.js","ember-template-compiler/plugins/deprecate-render-model.lint-test.js","ember-template-compiler/plugins/deprecate-render.lint-test.js","ember-template-compiler/plugins/extract-pragma-tag.lint-test.js","ember-template-compiler/plugins/index.lint-test.js","ember-template-compiler/plugins/transform-action-syntax.lint-test.js","ember-template-compiler/plugins/transform-angle-bracket-components.lint-test.js","ember-template-compiler/plugins/transform-attrs-into-args.lint-test.js","ember-template-compiler/plugins/transform-dot-component-invocation.lint-test.js","ember-template-compiler/plugins/transform-each-in-into-each.lint-test.js","ember-template-compiler/plugins/transform-has-block-syntax.lint-test.js","ember-template-compiler/plugins/transform-inline-link-to.lint-test.js","ember-template-compiler/plugins/transform-input-on-to-onEvent.lint-test.js","ember-template-compiler/plugins/transform-input-type-syntax.lint-test.js","ember-template-compiler/plugins/transform-old-binding-syntax.lint-test.js","ember-template-compiler/plugins/transform-old-class-binding-syntax.lint-test.js","ember-template-compiler/plugins/transform-quoted-bindings-into-just-bindings.lint-test.js","ember-template-compiler/plugins/transform-top-level-components.lint-test.js","ember-template-compiler/system/bootstrap.lint-test.js","ember-template-compiler/system/calculate-location-display.lint-test.js","ember-template-compiler/system/compile-options.lint-test.js","ember-template-compiler/system/compile.lint-test.js","ember-template-compiler/system/precompile.lint-test.js","ember-template-compiler/tests/plugins/assert-input-helper-without-block-test.js","ember-template-compiler/tests/plugins/assert-input-helper-without-block-test.lint-test.js","ember-template-compiler/tests/plugins/assert-reserved-named-arguments-test.js","ember-template-compiler/tests/plugins/assert-reserved-named-arguments-test.lint-test.js","ember-template-compiler/tests/plugins/deprecate-render-model-test.js","ember-template-compiler/tests/plugins/deprecate-render-model-test.lint-test.js","ember-template-compiler/tests/plugins/deprecate-render-test.js","ember-template-compiler/tests/plugins/deprecate-render-test.lint-test.js","ember-template-compiler/tests/plugins/transform-dot-component-invocation-test.js","ember-template-compiler/tests/plugins/transform-dot-component-invocation-test.lint-test.js","ember-template-compiler/tests/plugins/transform-inline-link-to-test.js","ember-template-compiler/tests/plugins/transform-inline-link-to-test.lint-test.js","ember-template-compiler/tests/plugins/transform-input-on-test.js","ember-template-compiler/tests/plugins/transform-input-on-test.lint-test.js","ember-template-compiler/tests/plugins/transform-input-type-syntax-test.js","ember-template-compiler/tests/plugins/transform-input-type-syntax-test.lint-test.js","ember-template-compiler/tests/system/bootstrap-test.js","ember-template-compiler/tests/system/bootstrap-test.lint-test.js","ember-template-compiler/tests/system/compile_options_test.js","ember-template-compiler/tests/system/compile_options_test.lint-test.js","ember-testing/adapters/adapter.lint-test.js","ember-testing/adapters/qunit.lint-test.js","ember-testing/events.lint-test.js","ember-testing/ext/application.lint-test.js","ember-testing/ext/rsvp.lint-test.js","ember-testing/helpers.lint-test.js","ember-testing/helpers/and_then.lint-test.js","ember-testing/helpers/click.lint-test.js","ember-testing/helpers/current_path.lint-test.js","ember-testing/helpers/current_route_name.lint-test.js","ember-testing/helpers/current_url.lint-test.js","ember-testing/helpers/fill_in.lint-test.js","ember-testing/helpers/find.lint-test.js","ember-testing/helpers/find_with_assert.lint-test.js","ember-testing/helpers/key_event.lint-test.js","ember-testing/helpers/pause_test.lint-test.js","ember-testing/helpers/trigger_event.lint-test.js","ember-testing/helpers/visit.lint-test.js","ember-testing/helpers/wait.lint-test.js","ember-testing/index.lint-test.js","ember-testing/initializers.lint-test.js","ember-testing/lib/adapters/adapter.lint-test.js","ember-testing/lib/adapters/qunit.lint-test.js","ember-testing/lib/events.lint-test.js","ember-testing/lib/ext/application.lint-test.js","ember-testing/lib/ext/rsvp.lint-test.js","ember-testing/lib/helpers.lint-test.js","ember-testing/lib/helpers/and_then.lint-test.js","ember-testing/lib/helpers/click.lint-test.js","ember-testing/lib/helpers/current_path.lint-test.js","ember-testing/lib/helpers/current_route_name.lint-test.js","ember-testing/lib/helpers/current_url.lint-test.js","ember-testing/lib/helpers/fill_in.lint-test.js","ember-testing/lib/helpers/find.lint-test.js","ember-testing/lib/helpers/find_with_assert.lint-test.js","ember-testing/lib/helpers/key_event.lint-test.js","ember-testing/lib/helpers/pause_test.lint-test.js","ember-testing/lib/helpers/trigger_event.lint-test.js","ember-testing/lib/helpers/visit.lint-test.js","ember-testing/lib/helpers/wait.lint-test.js","ember-testing/lib/index.lint-test.js","ember-testing/lib/initializers.lint-test.js","ember-testing/lib/setup_for_testing.lint-test.js","ember-testing/lib/support.lint-test.js","ember-testing/lib/test.lint-test.js","ember-testing/lib/test/adapter.lint-test.js","ember-testing/lib/test/helpers.lint-test.js","ember-testing/lib/test/on_inject_helpers.lint-test.js","ember-testing/lib/test/pending_requests.lint-test.js","ember-testing/lib/test/promise.lint-test.js","ember-testing/lib/test/run.lint-test.js","ember-testing/lib/test/waiters.lint-test.js","ember-testing/setup_for_testing.lint-test.js","ember-testing/support.lint-test.js","ember-testing/test.lint-test.js","ember-testing/test/adapter.lint-test.js","ember-testing/test/helpers.lint-test.js","ember-testing/test/on_inject_helpers.lint-test.js","ember-testing/test/pending_requests.lint-test.js","ember-testing/test/promise.lint-test.js","ember-testing/test/run.lint-test.js","ember-testing/test/waiters.lint-test.js","ember-testing/tests/acceptance_test.js","ember-testing/tests/acceptance_test.lint-test.js","ember-testing/tests/adapters/adapter_test.js","ember-testing/tests/adapters/adapter_test.lint-test.js","ember-testing/tests/adapters/qunit_test.js","ember-testing/tests/adapters/qunit_test.lint-test.js","ember-testing/tests/adapters_test.js","ember-testing/tests/adapters_test.lint-test.js","ember-testing/tests/ext/rsvp_test.js","ember-testing/tests/ext/rsvp_test.lint-test.js","ember-testing/tests/helper_registration_test.js","ember-testing/tests/helper_registration_test.lint-test.js","ember-testing/tests/helpers_test.js","ember-testing/tests/helpers_test.lint-test.js","ember-testing/tests/integration_test.js","ember-testing/tests/integration_test.lint-test.js","ember-testing/tests/reexports_test.js","ember-testing/tests/reexports_test.lint-test.js","ember-testing/tests/simple_setup.js","ember-testing/tests/simple_setup.lint-test.js","ember-testing/tests/test/waiters-test.js","ember-testing/tests/test/waiters-test.lint-test.js","ember-utils.lint-test.js","ember-utils/lib/apply-str.lint-test.js","ember-utils/lib/assign.lint-test.js","ember-utils/lib/dictionary.lint-test.js","ember-utils/lib/guid.lint-test.js","ember-utils/lib/index.lint-test.js","ember-utils/lib/inspect.lint-test.js","ember-utils/lib/intern.lint-test.js","ember-utils/lib/invoke.lint-test.js","ember-utils/lib/lookup-descriptor.lint-test.js","ember-utils/lib/make-array.lint-test.js","ember-utils/lib/name.lint-test.js","ember-utils/lib/owner.lint-test.js","ember-utils/lib/proxy-utils.lint-test.js","ember-utils/lib/super.lint-test.js","ember-utils/lib/symbol.lint-test.js","ember-utils/lib/to-string.lint-test.js","ember-utils/lib/weak-map-utils.lint-test.js","ember-utils/tests/assign_test.js","ember-utils/tests/assign_test.lint-test.js","ember-utils/tests/can_invoke_test.js","ember-utils/tests/can_invoke_test.lint-test.js","ember-utils/tests/checkHasSuper_test.js","ember-utils/tests/checkHasSuper_test.lint-test.js","ember-utils/tests/generate_guid_test.js","ember-utils/tests/generate_guid_test.lint-test.js","ember-utils/tests/guid_for_test.js","ember-utils/tests/guid_for_test.lint-test.js","ember-utils/tests/inspect_test.js","ember-utils/tests/inspect_test.lint-test.js","ember-utils/tests/make_array_test.js","ember-utils/tests/make_array_test.lint-test.js","ember-utils/tests/to-string-test.js","ember-utils/tests/to-string-test.lint-test.js","ember-utils/tests/try_invoke_test.js","ember-utils/tests/try_invoke_test.lint-test.js","ember-views/lib/compat/attrs.lint-test.js","ember-views/lib/compat/fallback-view-registry.lint-test.js","ember-views/lib/component_lookup.lint-test.js","ember-views/lib/index.lint-test.js","ember-views/lib/mixins/action_support.lint-test.js","ember-views/lib/mixins/child_views_support.lint-test.js","ember-views/lib/mixins/class_names_support.lint-test.js","ember-views/lib/mixins/text_support.lint-test.js","ember-views/lib/mixins/view_state_support.lint-test.js","ember-views/lib/mixins/view_support.lint-test.js","ember-views/lib/system/action_manager.lint-test.js","ember-views/lib/system/event_dispatcher.lint-test.js","ember-views/lib/system/ext.lint-test.js","ember-views/lib/system/jquery.lint-test.js","ember-views/lib/system/lookup_partial.lint-test.js","ember-views/lib/system/utils.lint-test.js","ember-views/lib/utils/lookup-component.lint-test.js","ember-views/lib/views/core_view.lint-test.js","ember-views/lib/views/states.lint-test.js","ember-views/lib/views/states/default.lint-test.js","ember-views/lib/views/states/destroying.lint-test.js","ember-views/lib/views/states/has_element.lint-test.js","ember-views/lib/views/states/in_dom.lint-test.js","ember-views/lib/views/states/pre_render.lint-test.js","ember/lib/index.lint-test.js","ember/tests/application_lifecycle_test.js","ember/tests/application_lifecycle_test.lint-test.js","ember/tests/component_context_test.js","ember/tests/component_context_test.lint-test.js","ember/tests/component_registration_test.js","ember/tests/component_registration_test.lint-test.js","ember/tests/controller_test.js","ember/tests/controller_test.lint-test.js","ember/tests/error_handler_test.js","ember/tests/error_handler_test.lint-test.js","ember/tests/global-api-test.js","ember/tests/global-api-test.lint-test.js","ember/tests/helpers/helper_registration_test.js","ember/tests/helpers/helper_registration_test.lint-test.js","ember/tests/helpers/link_to_test.js","ember/tests/helpers/link_to_test.lint-test.js","ember/tests/helpers/link_to_test/link_to_transitioning_classes_test.js","ember/tests/helpers/link_to_test/link_to_transitioning_classes_test.lint-test.js","ember/tests/helpers/link_to_test/link_to_with_query_params_test.js","ember/tests/helpers/link_to_test/link_to_with_query_params_test.lint-test.js","ember/tests/homepage_example_test.js","ember/tests/homepage_example_test.lint-test.js","ember/tests/integration/multiple-app-test.js","ember/tests/integration/multiple-app-test.lint-test.js","ember/tests/production_build_test.js","ember/tests/production_build_test.lint-test.js","ember/tests/reexports_test.js","ember/tests/reexports_test.lint-test.js","ember/tests/routing/basic_test.js","ember/tests/routing/basic_test.lint-test.js","ember/tests/routing/decoupled_basic_test.js","ember/tests/routing/decoupled_basic_test.lint-test.js","ember/tests/routing/query_params_test.js","ember/tests/routing/query_params_test.lint-test.js","ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js","ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.lint-test.js","ember/tests/routing/query_params_test/overlapping_query_params_test.js","ember/tests/routing/query_params_test/overlapping_query_params_test.lint-test.js","ember/tests/routing/query_params_test/query_param_async_get_handler_test.js","ember/tests/routing/query_params_test/query_param_async_get_handler_test.lint-test.js","ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js","ember/tests/routing/query_params_test/query_params_paramless_link_to_test.lint-test.js","ember/tests/routing/query_params_test/shared_state_test.js","ember/tests/routing/query_params_test/shared_state_test.lint-test.js","ember/tests/routing/router_map_test.js","ember/tests/routing/router_map_test.lint-test.js","ember/tests/routing/router_service_test/basic_test.js","ember/tests/routing/router_service_test/basic_test.lint-test.js","ember/tests/routing/router_service_test/currenturl_lifecycle_test.js","ember/tests/routing/router_service_test/currenturl_lifecycle_test.lint-test.js","ember/tests/routing/router_service_test/isActive_test.js","ember/tests/routing/router_service_test/isActive_test.lint-test.js","ember/tests/routing/router_service_test/replaceWith_test.js","ember/tests/routing/router_service_test/replaceWith_test.lint-test.js","ember/tests/routing/router_service_test/transitionTo_test.js","ember/tests/routing/router_service_test/transitionTo_test.lint-test.js","ember/tests/routing/router_service_test/urlFor_test.js","ember/tests/routing/router_service_test/urlFor_test.lint-test.js","ember/tests/routing/substates_test.js","ember/tests/routing/substates_test.lint-test.js","ember/tests/routing/toplevel_dom_test.js","ember/tests/routing/toplevel_dom_test.lint-test.js","ember/tests/view_instrumentation_test.js","ember/tests/view_instrumentation_test.lint-test.js","error_handler.lint-test.js","events.lint-test.js","expand_properties.lint-test.js","external-helpers/lib/external-helpers-dev.lint-test.js","external-helpers/lib/external-helpers-prod.lint-test.js","get_properties.lint-test.js","index.lint-test.js","injected_property.lint-test.js","instrumentation.lint-test.js","internal-test-helpers/apply-mixins.js","internal-test-helpers/build-owner.js","internal-test-helpers/confirm-export.js","internal-test-helpers/equal-inner-html.js","internal-test-helpers/equal-tokens.js","internal-test-helpers/factory.js","internal-test-helpers/index.js","internal-test-helpers/lib/apply-mixins.lint-test.js","internal-test-helpers/lib/build-owner.lint-test.js","internal-test-helpers/lib/confirm-export.lint-test.js","internal-test-helpers/lib/equal-inner-html.lint-test.js","internal-test-helpers/lib/equal-tokens.lint-test.js","internal-test-helpers/lib/factory.lint-test.js","internal-test-helpers/lib/index.lint-test.js","internal-test-helpers/lib/matchers.lint-test.js","internal-test-helpers/lib/module-for.lint-test.js","internal-test-helpers/lib/run.lint-test.js","internal-test-helpers/lib/strip.lint-test.js","internal-test-helpers/lib/test-cases/abstract-application.lint-test.js","internal-test-helpers/lib/test-cases/abstract-rendering.lint-test.js","internal-test-helpers/lib/test-cases/abstract.lint-test.js","internal-test-helpers/lib/test-cases/application.lint-test.js","internal-test-helpers/lib/test-cases/autoboot-application.lint-test.js","internal-test-helpers/lib/test-cases/default-resolver-application.lint-test.js","internal-test-helpers/lib/test-cases/query-param.lint-test.js","internal-test-helpers/lib/test-cases/rendering.lint-test.js","internal-test-helpers/lib/test-cases/router.lint-test.js","internal-test-helpers/lib/test-cases/test-resolver-application.lint-test.js","internal-test-helpers/lib/test-groups.lint-test.js","internal-test-helpers/lib/test-resolver.lint-test.js","internal-test-helpers/matchers.js","internal-test-helpers/module-for.js","internal-test-helpers/run.js","internal-test-helpers/strip.js","internal-test-helpers/test-cases/abstract-application.js","internal-test-helpers/test-cases/abstract-rendering.js","internal-test-helpers/test-cases/abstract.js","internal-test-helpers/test-cases/application.js","internal-test-helpers/test-cases/autoboot-application.js","internal-test-helpers/test-cases/default-resolver-application.js","internal-test-helpers/test-cases/query-param.js","internal-test-helpers/test-cases/rendering.js","internal-test-helpers/test-cases/router.js","internal-test-helpers/test-cases/test-resolver-application.js","internal-test-helpers/test-groups.js","internal-test-helpers/test-resolver.js","internal-test-helpers/tests/index-test.js","internal-test-helpers/tests/index-test.lint-test.js","is_blank.lint-test.js","is_empty.lint-test.js","is_none.lint-test.js","is_present.lint-test.js","is_proxy.lint-test.js","libraries.lint-test.js","loader/lib/index.lint-test.js","map.lint-test.js","merge.lint-test.js","meta.lint-test.js","meta_listeners.lint-test.js","mixin.lint-test.js","node-module.js","node-module/lib/node-module.lint-test.js","observer.lint-test.js","observer_set.lint-test.js","path_cache.lint-test.js","properties.lint-test.js","property_events.lint-test.js","property_get.lint-test.js","property_set.lint-test.js","replace.lint-test.js","run_loop.lint-test.js","set_properties.lint-test.js","tags.lint-test.js","transaction.lint-test.js","watch_key.lint-test.js","watch_path.lint-test.js","watching.lint-test.js","weak_map.lint-test.js"],"sourcesContent":["/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011-2017 Tilde Inc. and contributors\n * Portions Copyright 2006-2011 Strobe Inc.\n * Portions Copyright 2008-2011 Apple Inc. All rights reserved.\n * @license Licensed under MIT license\n * See https://raw.github.com/emberjs/ember.js/master/LICENSE\n * @version 2.18.0\n */\n","/*global process */\nvar enifed, requireModule, Ember;\nvar mainContext = this; // Used in ember-environment/lib/global.js\n\n(function() {\n function missingModule(name, referrerName) {\n if (referrerName) {\n throw new Error('Could not find module ' + name + ' required by: ' + referrerName);\n } else {\n throw new Error('Could not find module ' + name);\n }\n }\n\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n\n var exports = seen[name];\n\n if (exports !== undefined) {\n return exports;\n }\n\n exports = seen[name] = {};\n\n if (!mod) {\n missingModule(_name, referrerName);\n }\n\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n\n for (var i = 0; i < deps.length; i++) {\n if (deps[i] === 'exports') {\n reified[i] = exports;\n } else if (deps[i] === 'require') {\n reified[i] = requireModule;\n } else {\n reified[i] = internalRequire(deps[i], name);\n }\n }\n\n callback.apply(this, reified);\n\n return exports;\n }\n\n var isNode = typeof window === 'undefined' &&\n typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n if (!isNode) {\n Ember = this.Ember = this.Ember || {};\n }\n\n if (typeof Ember === 'undefined') { Ember = {}; }\n\n if (typeof Ember.__loader === 'undefined') {\n var registry = {};\n var seen = {};\n\n enifed = function(name, deps, callback) {\n var value = { };\n\n if (!callback) {\n value.deps = [];\n value.callback = deps;\n } else {\n value.deps = deps;\n value.callback = callback;\n }\n\n registry[name] = value;\n };\n\n requireModule = function(name) {\n return internalRequire(name, null);\n };\n\n // setup `require` module\n requireModule['default'] = requireModule;\n\n requireModule.has = function registryHas(moduleName) {\n return !!registry[moduleName] || !!registry[moduleName + '/index'];\n };\n\n requireModule._eak_seen = registry;\n\n Ember.__loader = {\n define: enifed,\n require: requireModule,\n registry: registry\n };\n } else {\n enifed = Ember.__loader.define;\n requireModule = Ember.__loader.require;\n }\n})();\n","QUnit.module('ESLint | alias.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'alias.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | binding.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'binding.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | cache.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'cache.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | chains.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'chains.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | computed.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'computed.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | container.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | container/lib/container.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container/lib/container.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | container/lib/index.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container/lib/index.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | container/lib/registry.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container/lib/registry.js should pass ESLint\\n\\n');\n});\n","enifed('container/tests/container_test', ['ember-babel', 'ember-utils', 'ember-metal', 'ember/features', 'container', 'internal-test-helpers'], function (_emberBabel, _emberUtils, _emberMetal, _features, _container, _internalTestHelpers) {\n 'use strict';\n\n QUnit.module('Container');\n\n QUnit.test('A registered factory returns the same instance each time', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n\n var postController = container.lookup('controller:post');\n\n ok(postController instanceof PostController, 'The lookup is an instance of the factory');\n\n equal(postController, container.lookup('controller:post'));\n });\n\n QUnit.test('uses create time injections if factory has no extend', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var AppleController = (0, _internalTestHelpers.factory)();\n var PostController = (0, _internalTestHelpers.factory)();\n\n PostController.extend = undefined; // remove extend\n\n registry.register('controller:apple', AppleController);\n registry.register('controller:post', PostController);\n registry.injection('controller:post', 'apple', 'controller:apple');\n\n var postController = container.lookup('controller:post');\n\n ok(postController.apple instanceof AppleController, 'instance receives an apple of instance AppleController');\n });\n\n QUnit.test('A registered factory returns a fresh instance if singleton: false is passed as an option', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n\n var postController1 = container.lookup('controller:post');\n var postController2 = container.lookup('controller:post', { singleton: false });\n var postController3 = container.lookup('controller:post', { singleton: false });\n var postController4 = container.lookup('controller:post');\n\n equal(postController1.toString(), postController4.toString(), 'Singleton factories looked up normally return the same value');\n notEqual(postController1.toString(), postController2.toString(), 'Singleton factories are not equal to factories looked up with singleton: false');\n notEqual(postController2.toString(), postController3.toString(), 'Two factories looked up with singleton: false are not equal');\n notEqual(postController3.toString(), postController4.toString(), 'A singleton factory looked up after a factory called with singleton: false is not equal');\n\n ok(postController1 instanceof PostController, 'All instances are instances of the registered factory');\n ok(postController2 instanceof PostController, 'All instances are instances of the registered factory');\n ok(postController3 instanceof PostController, 'All instances are instances of the registered factory');\n ok(postController4 instanceof PostController, 'All instances are instances of the registered factory');\n });\n\n QUnit.test('A factory type with a registered injection\\'s instances receive that injection', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var Store = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n registry.register('store:main', Store);\n\n registry.typeInjection('controller', 'store', 'store:main');\n\n var postController = container.lookup('controller:post');\n var store = container.lookup('store:main');\n\n equal(postController.store, store);\n });\n\n QUnit.test('An individual factory with a registered injection receives the injection', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var Store = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n registry.register('store:main', Store);\n\n registry.injection('controller:post', 'store', 'store:main');\n\n var postController = container.lookup('controller:post');\n var store = container.lookup('store:main');\n\n equal(postController.store, store, 'has the correct store injected');\n });\n\n QUnit.test('A factory with both type and individual injections', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var Store = (0, _internalTestHelpers.factory)();\n var Router = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n registry.register('store:main', Store);\n registry.register('router:main', Router);\n\n registry.injection('controller:post', 'store', 'store:main');\n registry.typeInjection('controller', 'router', 'router:main');\n\n var postController = container.lookup('controller:post');\n var store = container.lookup('store:main');\n var router = container.lookup('router:main');\n\n equal(postController.store, store);\n equal(postController.router, router);\n });\n\n QUnit.test('A non-singleton instance is never cached', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n\n registry.register('view:post', PostView, { singleton: false });\n\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n\n ok(postView1 !== postView2, 'Non-singletons are not cached');\n });\n\n QUnit.test('A non-instantiated property is not instantiated', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var template = function () {};\n registry.register('template:foo', template, { instantiate: false });\n equal(container.lookup('template:foo'), template);\n });\n\n QUnit.test('A failed lookup returns undefined', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n\n equal(container.lookup('doesnot:exist'), undefined);\n });\n\n QUnit.test('An invalid factory throws an error', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n\n registry.register('controller:foo', {});\n\n throws(function () {\n container.lookup('controller:foo');\n }, /Failed to create an instance of \\'controller:foo\\'/);\n });\n\n QUnit.test('Injecting a failed lookup raises an error', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var fooInstance = {};\n var fooFactory = {};\n\n var Foo = {\n create: function (args) {\n return fooInstance;\n },\n extend: function (args) {\n return fooFactory;\n }\n };\n\n registry.register('model:foo', Foo);\n registry.injection('model:foo', 'store', 'store:main');\n\n throws(function () {\n container.lookup('model:foo');\n });\n });\n\n QUnit.test('Injecting a falsy value does not raise an error', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var ApplicationController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:application', ApplicationController);\n registry.register('user:current', null, { instantiate: false });\n registry.injection('controller:application', 'currentUser', 'user:current');\n\n strictEqual(container.lookup('controller:application').currentUser, null);\n });\n\n QUnit.test('The container returns same value each time even if the value is falsy', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n\n registry.register('falsy:value', null, { instantiate: false });\n\n strictEqual(container.lookup('falsy:value'), container.lookup('falsy:value'));\n });\n\n QUnit.test('Destroying the container destroys any cached singletons', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var PostView = (0, _internalTestHelpers.factory)();\n var template = function () {};\n\n registry.register('controller:post', PostController);\n registry.register('view:post', PostView, { singleton: false });\n registry.register('template:post', template, { instantiate: false });\n\n registry.injection('controller:post', 'postView', 'view:post');\n\n var postController = container.lookup('controller:post');\n var postView = postController.postView;\n\n ok(postView instanceof PostView, 'The non-singleton was injected');\n\n container.destroy();\n\n ok(postController.isDestroyed, 'Singletons are destroyed');\n ok(!postView.isDestroyed, 'Non-singletons are not destroyed');\n });\n\n QUnit.test('The container can use a registry hook to resolve factories lazily', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.resolver = {\n resolve: function (fullName) {\n if (fullName === 'controller:post') {\n return PostController;\n }\n }\n };\n\n var postController = container.lookup('controller:post');\n\n ok(postController instanceof PostController, 'The correct factory was provided');\n });\n\n QUnit.test('The container normalizes names before resolving', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function (fullName) {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n var postController = container.lookup('controller:normalized');\n\n ok(postController instanceof PostController, 'Normalizes the name before resolving');\n });\n\n QUnit.test('The container normalizes names when looking factory up', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function (fullName) {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n var fact = container.factoryFor('controller:normalized');\n\n var factInstance = fact.create();\n ok(factInstance instanceof PostController, 'Normalizes the name');\n });\n\n QUnit.test('Options can be registered that should be applied to a given factory', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n\n registry.resolver = {\n resolve: function (fullName) {\n if (fullName === 'view:post') {\n return PostView;\n }\n }\n };\n\n registry.options('view:post', { instantiate: true, singleton: false });\n\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n\n ok(postView1 instanceof PostView, 'The correct factory was provided');\n ok(postView2 instanceof PostView, 'The correct factory was provided');\n\n ok(postView1 !== postView2, 'The two lookups are different');\n });\n\n QUnit.test('Options can be registered that should be applied to all factories for a given type', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n\n registry.resolver = {\n resolve: function (fullName) {\n if (fullName === 'view:post') {\n return PostView;\n }\n }\n };\n\n registry.optionsForType('view', { singleton: false });\n\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n\n ok(postView1 instanceof PostView, 'The correct factory was provided');\n ok(postView2 instanceof PostView, 'The correct factory was provided');\n\n ok(postView1 !== postView2, 'The two lookups are different');\n });\n\n QUnit.test('An injected non-singleton instance is never cached', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostView = (0, _internalTestHelpers.factory)();\n var PostViewHelper = (0, _internalTestHelpers.factory)();\n\n registry.register('view:post', PostView, { singleton: false });\n registry.register('view_helper:post', PostViewHelper, { singleton: false });\n registry.injection('view:post', 'viewHelper', 'view_helper:post');\n\n var postView1 = container.lookup('view:post');\n var postView2 = container.lookup('view:post');\n\n ok(postView1.viewHelper !== postView2.viewHelper, 'Injected non-singletons are not cached');\n });\n\n QUnit.test('Factory resolves are cached', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n registry.resolve = function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n };\n\n deepEqual(resolveWasCalled, []);\n container.factoryFor('controller:post');\n deepEqual(resolveWasCalled, ['controller:post']);\n\n container.factoryFor('controller:post');\n deepEqual(resolveWasCalled, ['controller:post']);\n });\n\n QUnit.test('factory for non extendables (MODEL) resolves are cached', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n registry.resolve = function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n };\n\n deepEqual(resolveWasCalled, []);\n container.factoryFor('model:post');\n deepEqual(resolveWasCalled, ['model:post']);\n\n container.factoryFor('model:post');\n deepEqual(resolveWasCalled, ['model:post']);\n });\n\n QUnit.test('factory for non extendables resolves are cached', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = {};\n var resolveWasCalled = [];\n\n registry.resolve = function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n };\n\n deepEqual(resolveWasCalled, []);\n container.factoryFor('foo:post');\n deepEqual(resolveWasCalled, ['foo:post']);\n\n container.factoryFor('foo:post');\n deepEqual(resolveWasCalled, ['foo:post']);\n });\n\n QUnit.test('A factory\\'s lazy injections are validated when first instantiated', function () {\n var registry = new _container.Registry();\n var container = registry.container();\n var Apple = (0, _internalTestHelpers.factory)();\n var Orange = (0, _internalTestHelpers.factory)();\n\n Apple.reopenClass({\n _lazyInjections: function () {\n return ['orange:main', 'banana:main'];\n }\n });\n\n registry.register('apple:main', Apple);\n registry.register('orange:main', Orange);\n\n throws(function () {\n container.lookup('apple:main');\n }, /Attempting to inject an unknown injection: 'banana:main'/);\n });\n\n QUnit.test('Lazy injection validations are cached', function () {\n expect(1);\n\n var registry = new _container.Registry();\n var container = registry.container();\n var Apple = (0, _internalTestHelpers.factory)();\n var Orange = (0, _internalTestHelpers.factory)();\n\n Apple.reopenClass({\n _lazyInjections: function () {\n ok(true, 'should call lazy injection method');\n return ['orange:main'];\n }\n });\n\n registry.register('apple:main', Apple);\n registry.register('orange:main', Orange);\n\n container.lookup('apple:main');\n container.lookup('apple:main');\n });\n\n QUnit.test('An object with its owner pre-set should be returned from ownerInjection', function () {\n var owner = {};\n var registry = new _container.Registry();\n var container = registry.container({ owner: owner });\n\n var result = container.ownerInjection();\n\n equal(result[_emberUtils.OWNER], owner, 'owner is properly included');\n });\n\n QUnit.test('lookup passes options through to expandlocallookup', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n registry.expandLocalLookup = function (fullName, options) {\n assert.ok(true, 'expandLocalLookup was called');\n assert.equal(fullName, 'foo:bar');\n assert.deepEqual(options, { source: 'baz:qux' });\n\n return 'controller:post';\n };\n\n var PostControllerLookupResult = container.lookup('foo:bar', { source: 'baz:qux' });\n\n assert.ok(PostControllerLookupResult instanceof PostController);\n });\n\n QUnit.test('#factoryFor class is registered class', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n\n var factoryManager = container.factoryFor('component:foo-bar');\n assert.deepEqual(factoryManager.class, Component, 'No double extend');\n });\n\n QUnit.test('#factoryFor must supply a fullname', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n expectAssertion(function () {\n container.factoryFor('chad-bar');\n }, /fullName must be a proper full name/);\n });\n\n QUnit.test('#factoryFor returns a factory manager', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n\n var factoryManager = container.factoryFor('component:foo-bar');\n assert.ok(factoryManager.create);\n assert.ok(factoryManager.class);\n });\n\n QUnit.test('#factoryFor returns a cached factory manager for the same type', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n registry.register('component:baz-bar', Component);\n\n var factoryManager1 = container.factoryFor('component:foo-bar');\n var factoryManager2 = container.factoryFor('component:foo-bar');\n var factoryManager3 = container.factoryFor('component:baz-bar');\n\n assert.equal(factoryManager1, factoryManager2, 'cache hit');\n assert.notEqual(factoryManager1, factoryManager3, 'cache miss');\n });\n\n QUnit.test('#factoryFor class returns the factory function', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n\n var factoryManager = container.factoryFor('component:foo-bar');\n assert.deepEqual(factoryManager.class, Component, 'No double extend');\n });\n\n QUnit.test('#factoryFor instance have a common parent', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n\n var factoryManager1 = container.factoryFor('component:foo-bar');\n var factoryManager2 = container.factoryFor('component:foo-bar');\n var instance1 = factoryManager1.create({ foo: 'foo' });\n var instance2 = factoryManager2.create({ bar: 'bar' });\n\n assert.deepEqual(instance1.constructor, instance2.constructor);\n });\n\n QUnit.test('can properly reset cache', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n\n var factory1 = container.factoryFor('component:foo-bar');\n var factory2 = container.factoryFor('component:foo-bar');\n\n var instance1 = container.lookup('component:foo-bar');\n var instance2 = container.lookup('component:foo-bar');\n\n assert.equal(instance1, instance2);\n assert.equal(factory1, factory2);\n\n container.reset();\n\n var factory3 = container.factoryFor('component:foo-bar');\n var instance3 = container.lookup('component:foo-bar');\n\n assert.notEqual(instance1, instance3);\n assert.notEqual(factory1, factory3);\n });\n\n QUnit.test('#factoryFor created instances come with instance injections', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n var Ajax = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n registry.register('util:ajax', Ajax);\n registry.injection('component:foo-bar', 'ajax', 'util:ajax');\n\n var componentFactory = container.factoryFor('component:foo-bar');\n var component = componentFactory.create();\n\n assert.ok(component.ajax);\n assert.ok(component.ajax instanceof Ajax);\n });\n\n QUnit.test('#factoryFor options passed to create clobber injections', function (assert) {\n var registry = new _container.Registry();\n var container = registry.container();\n\n var Component = (0, _internalTestHelpers.factory)();\n var Ajax = (0, _internalTestHelpers.factory)();\n registry.register('component:foo-bar', Component);\n registry.register('util:ajax', Ajax);\n registry.injection('component:foo-bar', 'ajax', 'util:ajax');\n\n var componentFactory = container.factoryFor('component:foo-bar');\n\n var instrance = componentFactory.create({ ajax: 'fetch' });\n\n assert.equal(instrance.ajax, 'fetch');\n });\n\n QUnit.test('#factoryFor does not add properties to the object being instantiated when _initFactory is present', function (assert) {\n var owner = {};\n var registry = new _container.Registry();\n var container = registry.container();\n\n var factory = void 0;\n\n var Component = function () {\n function Component() {\n (0, _emberBabel.classCallCheck)(this, Component);\n }\n\n Component._initFactory = function _initFactory(_factory) {\n factory = _factory;\n };\n\n Component.create = function create(options) {\n var instance = new this();\n (0, _emberUtils.assign)(instance, options);\n return instance;\n };\n\n return Component;\n }();\n\n registry.register('component:foo-bar', Component);\n\n var componentFactory = container.factoryFor('component:foo-bar');\n var instance = componentFactory.create();\n\n // note: _guid and isDestroyed are being set in the `factory` constructor\n // not via registry/container shenanigans\n assert.deepEqual(Object.keys(instance), []);\n });\n\n // this is skipped until templates and the glimmer environment do not require `OWNER` to be\n // passed in as constructor args\n QUnit.skip('#factoryFor does not add properties to the object being instantiated', function (assert) {\n var owner = {};\n var registry = new _container.Registry();\n var container = registry.container();\n\n var factory = void 0;\n\n var Component = function () {\n function Component() {\n (0, _emberBabel.classCallCheck)(this, Component);\n }\n\n Component.create = function create(options) {\n var instance = new this();\n (0, _emberUtils.assign)(instance, options);\n return instance;\n };\n\n return Component;\n }();\n\n registry.register('component:foo-bar', Component);\n\n var componentFactory = container.factoryFor('component:foo-bar');\n var instance = componentFactory.create();\n\n // note: _guid and isDestroyed are being set in the `factory` constructor\n // not via registry/container shenanigans\n assert.deepEqual(Object.keys(instance), []);\n });\n\n if (_features.EMBER_MODULE_UNIFICATION) {\n QUnit.module('Container module unification');\n\n QUnit.test('The container can pass a source to factoryFor', function (assert) {\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var expectedSource = 'template:routes/application';\n var registry = new _container.Registry();\n var resolveCount = 0;\n registry.resolve = function (fullName, _ref) {\n var source = _ref.source;\n\n resolveCount++;\n if (fullName === lookup && source === expectedSource) {\n return PrivateComponent;\n }\n };\n\n var container = registry.container();\n\n assert.strictEqual(container.factoryFor(lookup, { source: expectedSource }).class, PrivateComponent, 'The correct factory was provided');\n assert.strictEqual(container.factoryFor(lookup, { source: expectedSource }).class, PrivateComponent, 'The correct factory was provided again');\n assert.equal(resolveCount, 1, 'resolve called only once and a cached factory was returned the second time');\n });\n\n QUnit.test('The container can pass a source to lookup', function (assert) {\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var expectedSource = 'template:routes/application';\n var registry = new _container.Registry();\n registry.resolve = function (fullName, _ref2) {\n var source = _ref2.source;\n\n if (fullName === lookup && source === expectedSource) {\n return PrivateComponent;\n }\n };\n\n var container = registry.container();\n\n var result = container.lookup(lookup, { source: expectedSource });\n assert.ok(result instanceof PrivateComponent, 'The correct factory was provided');\n\n assert.ok(container.cache['template:routes/application:component:my-input'] instanceof PrivateComponent, 'The correct factory was stored in the cache with the correct key which includes the source.');\n });\n }\n});","QUnit.module('ESLint | container/tests/container_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container/tests/container_test.js should pass ESLint\\n\\n');\n});\n","enifed('container/tests/owner_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n QUnit.module('Owner', {});\n\n QUnit.test('An owner can be set with `setOwner` and retrieved with `getOwner`', function () {\n var owner = {};\n var obj = {};\n\n strictEqual((0, _emberUtils.getOwner)(obj), undefined, 'owner has not been set');\n\n (0, _emberUtils.setOwner)(obj, owner);\n\n strictEqual((0, _emberUtils.getOwner)(obj), owner, 'owner has been set');\n\n strictEqual(obj[_emberUtils.OWNER], owner, 'owner has been set to the OWNER symbol');\n });\n});","QUnit.module('ESLint | container/tests/owner_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container/tests/owner_test.js should pass ESLint\\n\\n');\n});\n","enifed('container/tests/registry_test', ['container', 'internal-test-helpers', 'ember/features'], function (_container, _internalTestHelpers, _features) {\n 'use strict';\n\n QUnit.module('Registry');\n\n QUnit.test('A registered factory is returned from resolve', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n\n var PostControllerFactory = registry.resolve('controller:post');\n\n ok(PostControllerFactory, 'factory is returned');\n ok(PostControllerFactory.create() instanceof PostController, 'The return of factory.create is an instance of PostController');\n });\n\n QUnit.test('The registered factory returned from resolve is the same factory each time', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n\n deepEqual(registry.resolve('controller:post'), registry.resolve('controller:post'), 'The return of resolve is always the same');\n });\n\n QUnit.test('The registered value returned from resolve is the same value each time even if the value is falsy', function () {\n var registry = new _container.Registry();\n\n registry.register('falsy:value', null, { instantiate: false });\n\n strictEqual(registry.resolve('falsy:value'), registry.resolve('falsy:value'), 'The return of resolve is always the same');\n });\n\n QUnit.test('The value returned from resolver is the same value as the original value even if the value is falsy', function () {\n var resolver = {\n resolve: function (fullName) {\n if (fullName === 'falsy:value') {\n return null;\n }\n }\n };\n var registry = new _container.Registry({ resolver: resolver });\n\n strictEqual(registry.resolve('falsy:value'), null);\n });\n\n QUnit.test('A registered factory returns true for `has` if an item is registered', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n\n equal(registry.has('controller:post'), true, 'The `has` method returned true for registered factories');\n equal(registry.has('controller:posts'), false, 'The `has` method returned false for unregistered factories');\n });\n\n QUnit.test('Throw exception when trying to inject `type:thing` on all type(s)', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.register('controller:post', PostController);\n\n expectAssertion(function () {\n registry.typeInjection('controller', 'injected', 'controller:post');\n }, /Cannot inject a 'controller:post' on other controller\\(s\\)\\./);\n });\n\n QUnit.test('The registry can take a hook to resolve factories lazily', function () {\n var PostController = (0, _internalTestHelpers.factory)();\n var resolver = {\n resolve: function (fullName) {\n if (fullName === 'controller:post') {\n return PostController;\n }\n }\n };\n var registry = new _container.Registry({ resolver: resolver });\n\n strictEqual(registry.resolve('controller:post'), PostController, 'The correct factory was provided');\n });\n\n QUnit.test('The registry respects the resolver hook for `has`', function () {\n var PostController = (0, _internalTestHelpers.factory)();\n var resolver = {\n resolve: function (fullName) {\n if (fullName === 'controller:post') {\n return PostController;\n }\n }\n };\n var registry = new _container.Registry({ resolver: resolver });\n\n ok(registry.has('controller:post'), 'the `has` method uses the resolver hook');\n });\n\n QUnit.test('The registry normalizes names when resolving', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function (fullName) {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n var type = registry.resolve('controller:normalized');\n\n strictEqual(type, PostController, 'Normalizes the name when resolving');\n });\n\n QUnit.test('The registry normalizes names when checking if the factory is registered', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n\n registry.normalizeFullName = function (fullName) {\n return fullName === 'controller:normalized' ? 'controller:post' : fullName;\n };\n\n registry.register('controller:post', PostController);\n var isPresent = registry.has('controller:normalized');\n\n equal(isPresent, true, 'Normalizes the name when checking if the factory or instance is present');\n });\n\n QUnit.test('The registry normalizes names when injecting', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n var user = { name: 'Stef' };\n\n registry.normalize = function (fullName) {\n return 'controller:post';\n };\n\n registry.register('controller:post', PostController);\n registry.register('user:post', user, { instantiate: false });\n registry.injection('controller:post', 'user', 'controller:normalized');\n\n deepEqual(registry.resolve('controller:post'), user, 'Normalizes the name when injecting');\n });\n\n QUnit.test('cannot register an `undefined` factory', function () {\n var registry = new _container.Registry();\n\n throws(function () {\n registry.register('controller:apple', undefined);\n }, '');\n });\n\n QUnit.test('can re-register a factory', function () {\n var registry = new _container.Registry();\n var FirstApple = (0, _internalTestHelpers.factory)('first');\n var SecondApple = (0, _internalTestHelpers.factory)('second');\n\n registry.register('controller:apple', FirstApple);\n registry.register('controller:apple', SecondApple);\n\n ok(registry.resolve('controller:apple').create() instanceof SecondApple);\n });\n\n QUnit.test('cannot re-register a factory if it has been resolved', function () {\n var registry = new _container.Registry();\n var FirstApple = (0, _internalTestHelpers.factory)('first');\n var SecondApple = (0, _internalTestHelpers.factory)('second');\n\n registry.register('controller:apple', FirstApple);\n strictEqual(registry.resolve('controller:apple'), FirstApple);\n\n expectAssertion(function () {\n registry.register('controller:apple', SecondApple);\n }, /Cannot re-register: 'controller:apple', as it has already been resolved\\./);\n\n strictEqual(registry.resolve('controller:apple'), FirstApple);\n });\n\n QUnit.test('registry.has should not accidentally cause injections on that factory to be run. (Mitigate merely on observing)', function () {\n expect(1);\n\n var registry = new _container.Registry();\n var FirstApple = (0, _internalTestHelpers.factory)('first');\n var SecondApple = (0, _internalTestHelpers.factory)('second');\n\n SecondApple.extend = function (a, b, c) {\n ok(false, 'should not extend or touch the injected model, merely to inspect existence of another');\n };\n\n registry.register('controller:apple', FirstApple);\n registry.register('controller:second-apple', SecondApple);\n registry.injection('controller:apple', 'badApple', 'controller:second-apple');\n\n ok(registry.has('controller:apple'));\n });\n\n QUnit.test('registry.has should not error for invalid fullNames)', function () {\n expect(1);\n\n var registry = new _container.Registry();\n\n ok(!registry.has('foo:bar:baz'));\n });\n\n QUnit.test('once resolved, always return the same result', function () {\n expect(1);\n\n var registry = new _container.Registry();\n\n registry.resolver = {\n resolve: function () {\n return 'bar';\n }\n };\n\n var Bar = registry.resolve('models:bar');\n\n registry.resolver = {\n resolve: function () {\n return 'not bar';\n }\n };\n\n equal(registry.resolve('models:bar'), Bar);\n });\n\n QUnit.test('factory resolves are cached', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n\n registry.resolver = {\n resolve: function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n }\n };\n\n deepEqual(resolveWasCalled, []);\n registry.resolve('controller:post');\n deepEqual(resolveWasCalled, ['controller:post']);\n\n registry.resolve('controller:post');\n deepEqual(resolveWasCalled, ['controller:post']);\n });\n\n QUnit.test('factory for non extendables (MODEL) resolves are cached', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n var resolveWasCalled = [];\n\n registry.resolver = {\n resolve: function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n }\n };\n\n deepEqual(resolveWasCalled, []);\n registry.resolve('model:post');\n deepEqual(resolveWasCalled, ['model:post']);\n\n registry.resolve('model:post');\n deepEqual(resolveWasCalled, ['model:post']);\n });\n\n QUnit.test('factory for non extendables resolves are cached', function () {\n var registry = new _container.Registry();\n var PostController = {};\n var resolveWasCalled = [];\n\n registry.resolver = {\n resolve: function (fullName) {\n resolveWasCalled.push(fullName);\n return PostController;\n }\n };\n\n deepEqual(resolveWasCalled, []);\n registry.resolve('foo:post');\n deepEqual(resolveWasCalled, ['foo:post']);\n\n registry.resolve('foo:post');\n deepEqual(resolveWasCalled, ['foo:post']);\n });\n\n QUnit.test('registry.container creates a container', function () {\n var registry = new _container.Registry();\n var PostController = (0, _internalTestHelpers.factory)();\n registry.register('controller:post', PostController);\n\n var container = registry.container();\n var postController = container.lookup('controller:post');\n\n ok(postController instanceof PostController, 'The lookup is an instance of the registered factory');\n });\n\n QUnit.test('`describe` will be handled by the resolver, then by the fallback registry, if available', function () {\n var fallback = {\n describe: function (fullName) {\n return fullName + '-fallback';\n }\n };\n\n var resolver = {\n lookupDescription: function (fullName) {\n return fullName + '-resolver';\n }\n };\n\n var registry = new _container.Registry({ fallback: fallback, resolver: resolver });\n\n equal(registry.describe('controller:post'), 'controller:post-resolver', '`describe` handled by the resolver first.');\n\n registry.resolver = null;\n\n equal(registry.describe('controller:post'), 'controller:post-fallback', '`describe` handled by fallback registry next.');\n\n registry.fallback = null;\n\n equal(registry.describe('controller:post'), 'controller:post', '`describe` by default returns argument.');\n });\n\n QUnit.test('`normalizeFullName` will be handled by the resolver, then by the fallback registry, if available', function () {\n var fallback = {\n normalizeFullName: function (fullName) {\n return fullName + '-fallback';\n }\n };\n\n var resolver = {\n normalize: function (fullName) {\n return fullName + '-resolver';\n }\n };\n\n var registry = new _container.Registry({ fallback: fallback, resolver: resolver });\n\n equal(registry.normalizeFullName('controller:post'), 'controller:post-resolver', '`normalizeFullName` handled by the resolver first.');\n\n registry.resolver = null;\n\n equal(registry.normalizeFullName('controller:post'), 'controller:post-fallback', '`normalizeFullName` handled by fallback registry next.');\n\n registry.fallback = null;\n\n equal(registry.normalizeFullName('controller:post'), 'controller:post', '`normalizeFullName` by default returns argument.');\n });\n\n QUnit.test('`makeToString` will be handled by the resolver, then by the fallback registry, if available', function () {\n var fallback = {\n makeToString: function (fullName) {\n return fullName + '-fallback';\n }\n };\n\n var resolver = {\n makeToString: function (fullName) {\n return fullName + '-resolver';\n }\n };\n\n var registry = new _container.Registry({ fallback: fallback, resolver: resolver });\n\n equal(registry.makeToString('controller:post'), 'controller:post-resolver', '`makeToString` handled by the resolver first.');\n\n registry.resolver = null;\n\n equal(registry.makeToString('controller:post'), 'controller:post-fallback', '`makeToString` handled by fallback registry next.');\n\n registry.fallback = null;\n\n equal(registry.makeToString('controller:post'), 'controller:post', '`makeToString` by default returns argument.');\n });\n\n QUnit.test('`resolve` can be handled by a fallback registry', function () {\n var fallback = new _container.Registry();\n\n var registry = new _container.Registry({ fallback: fallback });\n var PostController = (0, _internalTestHelpers.factory)();\n\n fallback.register('controller:post', PostController);\n\n var PostControllerFactory = registry.resolve('controller:post');\n\n ok(PostControllerFactory, 'factory is returned');\n ok(PostControllerFactory.create() instanceof PostController, 'The return of factory.create is an instance of PostController');\n });\n\n QUnit.test('`has` can be handled by a fallback registry', function () {\n var fallback = new _container.Registry();\n\n var registry = new _container.Registry({ fallback: fallback });\n var PostController = (0, _internalTestHelpers.factory)();\n\n fallback.register('controller:post', PostController);\n\n equal(registry.has('controller:post'), true, 'Fallback registry is checked for registration');\n });\n\n QUnit.test('`getInjections` includes injections from a fallback registry', function () {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({ fallback: fallback });\n\n equal(registry.getInjections('model:user').length, 0, 'No injections in the primary registry');\n\n fallback.injection('model:user', 'post', 'model:post');\n\n equal(registry.getInjections('model:user').length, 1, 'Injections from the fallback registry are merged');\n });\n\n QUnit.test('`getTypeInjections` includes type injections from a fallback registry', function () {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({ fallback: fallback });\n\n equal(registry.getTypeInjections('model').length, 0, 'No injections in the primary registry');\n\n fallback.injection('model', 'source', 'source:main');\n\n equal(registry.getTypeInjections('model').length, 1, 'Injections from the fallback registry are merged');\n });\n\n QUnit.test('`knownForType` contains keys for each item of a given type', function () {\n var registry = new _container.Registry();\n\n registry.register('foo:bar-baz', 'baz');\n registry.register('foo:qux-fez', 'fez');\n\n var found = registry.knownForType('foo');\n\n deepEqual(found, {\n 'foo:bar-baz': true,\n 'foo:qux-fez': true\n });\n });\n\n QUnit.test('`knownForType` includes fallback registry results', function () {\n var fallback = new _container.Registry();\n var registry = new _container.Registry({ fallback: fallback });\n\n registry.register('foo:bar-baz', 'baz');\n registry.register('foo:qux-fez', 'fez');\n fallback.register('foo:zurp-zorp', 'zorp');\n\n var found = registry.knownForType('foo');\n\n deepEqual(found, {\n 'foo:bar-baz': true,\n 'foo:qux-fez': true,\n 'foo:zurp-zorp': true\n });\n });\n\n QUnit.test('`knownForType` is called on the resolver if present', function () {\n expect(3);\n\n var resolver = {\n knownForType: function (type) {\n ok(true, 'knownForType called on the resolver');\n equal(type, 'foo', 'the type was passed through');\n\n return { 'foo:yorp': true };\n }\n };\n\n var registry = new _container.Registry({\n resolver: resolver\n });\n registry.register('foo:bar-baz', 'baz');\n\n var found = registry.knownForType('foo');\n\n deepEqual(found, {\n 'foo:yorp': true,\n 'foo:bar-baz': true\n });\n });\n\n QUnit.test('A registry can be created with a deprecated `resolver` function instead of an object', function () {\n expect(2);\n\n var registry = void 0;\n\n expectDeprecation(function () {\n registry = new _container.Registry({\n resolver: function (fullName) {\n return fullName + '-resolved';\n }\n });\n }, 'Passing a `resolver` function into a Registry is deprecated. Please pass in a Resolver object with a `resolve` method.');\n\n equal(registry.resolve('foo:bar'), 'foo:bar-resolved', '`resolve` still calls the deprecated function');\n });\n\n QUnit.test('resolver.expandLocalLookup is not required', function (assert) {\n assert.expect(1);\n\n var registry = new _container.Registry({\n resolver: {}\n });\n\n var result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, null);\n });\n\n QUnit.test('expandLocalLookup is called on the resolver if present', function (assert) {\n assert.expect(4);\n\n var resolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n\n return 'foo:qux/bar';\n }\n };\n\n var registry = new _container.Registry({\n resolver: resolver\n });\n\n var result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar');\n });\n\n QUnit.test('`expandLocalLookup` is handled by the resolver, then by the fallback registry, if available', function (assert) {\n assert.expect(9);\n\n var fallbackResolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the fallback resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n\n return 'foo:qux/bar-fallback';\n }\n };\n\n var resolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n\n return 'foo:qux/bar-resolver';\n }\n };\n\n var fallbackRegistry = new _container.Registry({\n resolver: fallbackResolver\n });\n\n var registry = new _container.Registry({\n fallback: fallbackRegistry,\n resolver: resolver\n });\n\n var result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar-resolver', 'handled by the resolver');\n\n registry.resolver = null;\n\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar-fallback', 'handled by the fallback registry');\n\n registry.fallback = null;\n\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, null, 'null is returned by default when no resolver or fallback registry is present');\n });\n\n QUnit.test('resolver.expandLocalLookup result is cached', function (assert) {\n assert.expect(3);\n var result = void 0;\n\n var resolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n\n return 'foo:qux/bar';\n }\n };\n\n var registry = new _container.Registry({\n resolver: resolver\n });\n\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar');\n\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar');\n });\n\n QUnit.test('resolver.expandLocalLookup cache is busted when any unregister is called', function (assert) {\n assert.expect(4);\n var result = void 0;\n\n var resolver = {\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n\n return 'foo:qux/bar';\n }\n };\n\n var registry = new _container.Registry({\n resolver: resolver\n });\n\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar');\n\n registry.unregister('foo:bar');\n\n result = registry.expandLocalLookup('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.equal(result, 'foo:qux/bar');\n });\n\n QUnit.test('resolve calls expandLocallookup when it receives options.source', function (assert) {\n assert.expect(3);\n\n var resolver = {\n resolve: function () {},\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n assert.equal(targetFullName, 'foo:bar', 'the targetFullName was passed through');\n assert.equal(sourceFullName, 'baz:qux', 'the sourceFullName was passed through');\n\n return 'foo:qux/bar';\n }\n };\n\n var registry = new _container.Registry({\n resolver: resolver\n });\n\n registry.resolve('foo:bar', {\n source: 'baz:qux'\n });\n });\n\n QUnit.test('has uses expandLocalLookup', function (assert) {\n assert.expect(5);\n var resolvedFullNames = [];\n var result = void 0;\n\n var resolver = {\n resolve: function (name) {\n if (_features.EMBER_MODULE_UNIFICATION && name === 'foo:baz') {\n return;\n }\n resolvedFullNames.push(name);\n\n return 'yippie!';\n },\n expandLocalLookup: function (targetFullName, sourceFullName) {\n assert.ok(true, 'expandLocalLookup is called on the resolver');\n\n if (targetFullName === 'foo:bar') {\n return 'foo:qux/bar';\n } else {\n return null;\n }\n }\n };\n\n var registry = new _container.Registry({\n resolver: resolver\n });\n\n result = registry.has('foo:bar', {\n source: 'baz:qux'\n });\n\n assert.ok(result, 'found foo:bar/qux');\n\n result = registry.has('foo:baz', {\n source: 'baz:qux'\n });\n\n assert.ok(!result, 'foo:baz/qux not found');\n\n assert.deepEqual(['foo:qux/bar'], resolvedFullNames);\n });\n\n QUnit.module('Registry privatize');\n\n QUnit.test('valid format', function (assert) {\n var privatized = (0, _container.privatize)(['secret:factory']);\n var matched = privatized.match(/^([^:]+):([^:]+)-(\\d+)$/);\n\n assert.ok(matched, 'privatized format was recognized');\n assert.equal(matched[1], 'secret');\n assert.equal(matched[2], 'factory');\n assert.ok(/^\\d+$/.test(matched[3]));\n });\n\n if (_features.EMBER_MODULE_UNIFICATION) {\n QUnit.module('Registry module unification');\n\n QUnit.test('The registry can pass a source to the resolver', function (assert) {\n var PrivateComponent = (0, _internalTestHelpers.factory)();\n var lookup = 'component:my-input';\n var source = 'template:routes/application';\n var resolveCount = 0;\n var resolver = {\n resolve: function (fullName, src) {\n resolveCount++;\n if (fullName === lookup && src === source) {\n return PrivateComponent;\n }\n }\n };\n var registry = new _container.Registry({ resolver: resolver });\n registry.normalize = function (name) {\n return name;\n };\n\n assert.strictEqual(registry.resolve(lookup, { source: source }), PrivateComponent, 'The correct factory was provided');\n assert.strictEqual(registry.resolve(lookup, { source: source }), PrivateComponent, 'The correct factory was provided again');\n assert.equal(resolveCount, 1, 'resolve called only once and a cached factory was returned the second time');\n });\n }\n});","QUnit.module('ESLint | container/tests/registry_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'container/tests/registry_test.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | core.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'core.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | dependent_keys.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'dependent_keys.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | deprecate_property.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'deprecate_property.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | descriptor.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'descriptor.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/index.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/index.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/initializers/dom-templates.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/initializers/dom-templates.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/system/application-instance.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/system/application-instance.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/system/application.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/system/application.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/system/engine-instance.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/system/engine-instance.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/system/engine-parent.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/system/engine-parent.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/system/engine.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/system/engine.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/system/resolver.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/system/resolver.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-application/lib/utils/validate-type.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/lib/utils/validate-type.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/application_instance_test', ['ember-babel', 'ember-application/system/engine', 'ember-application/system/application', 'ember-application/system/application-instance', 'ember-metal', 'ember-views', 'container', 'internal-test-helpers', 'ember-runtime'], function (_emberBabel, _engine, _application, _applicationInstance, _emberMetal, _emberViews, _container, _internalTestHelpers, _emberRuntime) {\n 'use strict';\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['-bucket-cache:main'], ['-bucket-cache:main']);\n\n var application = void 0,\n appInstance = void 0;\n\n QUnit.module('Ember.ApplicationInstance', {\n setup: function () {\n (0, _emberViews.jQuery)('#qunit-fixture').html('
HI
HI
');\n application = (0, _emberMetal.run)(function () {\n return _application.default.create({ rootElement: '#one', router: null });\n });\n },\n teardown: function () {\n (0, _emberViews.jQuery)('#qunit-fixture').empty();\n\n if (appInstance) {\n (0, _emberMetal.run)(appInstance, 'destroy');\n }\n\n if (application) {\n (0, _emberMetal.run)(application, 'destroy');\n }\n }\n });\n\n QUnit.test('an application instance can be created based upon an application', function () {\n appInstance = (0, _emberMetal.run)(function () {\n return appInstance = _applicationInstance.default.create({ application: application });\n });\n\n ok(appInstance, 'instance should be created');\n equal(appInstance.application, application, 'application should be set to parent');\n });\n\n QUnit.test('properties (and aliases) are correctly assigned for accessing the container and registry', function () {\n expect(6);\n\n appInstance = (0, _emberMetal.run)(function () {\n return _applicationInstance.default.create({ application: application });\n });\n\n ok(appInstance, 'instance should be created');\n ok(appInstance.__container__, '#__container__ is accessible');\n ok(appInstance.__registry__, '#__registry__ is accessible');\n\n // stub with a no-op to keep deprecation test simple\n appInstance.__container__.lookup = function () {\n ok(true, '#loookup alias is called correctly');\n };\n\n ok(typeof appInstance.registry.register === 'function', '#registry.register is available as a function');\n appInstance.__registry__.register = function () {\n ok(true, '#register alias is called correctly');\n };\n\n expectDeprecation(function () {\n appInstance.registry.register();\n }, /Using `ApplicationInstance.registry.register` is deprecated. Please use `ApplicationInstance.register` instead./);\n });\n\n QUnit.test('customEvents added to the application before setupEventDispatcher', function (assert) {\n assert.expect(1);\n\n appInstance = (0, _emberMetal.run)(function () {\n return _applicationInstance.default.create({ application: application });\n });\n appInstance.setupRegistry();\n\n application.customEvents = {\n awesome: 'sauce'\n };\n\n var eventDispatcher = appInstance.lookup('event_dispatcher:main');\n eventDispatcher.setup = function (events) {\n assert.equal(events.awesome, 'sauce');\n };\n\n appInstance.setupEventDispatcher();\n });\n\n QUnit.test('customEvents added to the application before setupEventDispatcher', function (assert) {\n assert.expect(1);\n\n (0, _emberMetal.run)(function () {\n return appInstance = _applicationInstance.default.create({ application: application });\n });\n appInstance.setupRegistry();\n\n application.customEvents = {\n awesome: 'sauce'\n };\n\n var eventDispatcher = appInstance.lookup('event_dispatcher:main');\n eventDispatcher.setup = function (events) {\n assert.equal(events.awesome, 'sauce');\n };\n\n appInstance.setupEventDispatcher();\n });\n\n QUnit.test('customEvents added to the application instance before setupEventDispatcher', function (assert) {\n assert.expect(1);\n\n appInstance = (0, _emberMetal.run)(function () {\n return _applicationInstance.default.create({ application: application });\n });\n appInstance.setupRegistry();\n\n appInstance.customEvents = {\n awesome: 'sauce'\n };\n\n var eventDispatcher = appInstance.lookup('event_dispatcher:main');\n eventDispatcher.setup = function (events) {\n assert.equal(events.awesome, 'sauce');\n };\n\n appInstance.setupEventDispatcher();\n });\n\n QUnit.test('unregistering a factory clears all cached instances of that factory', function (assert) {\n assert.expect(5);\n\n appInstance = (0, _emberMetal.run)(function () {\n return _applicationInstance.default.create({ application: application });\n });\n\n var PostController1 = (0, _internalTestHelpers.factory)();\n var PostController2 = (0, _internalTestHelpers.factory)();\n\n appInstance.register('controller:post', PostController1);\n\n var postController1 = appInstance.lookup('controller:post');\n var postController1Factory = appInstance.factoryFor('controller:post');\n assert.ok(postController1 instanceof PostController1, 'precond - lookup creates instance');\n assert.equal(PostController1, postController1Factory.class, 'precond - factoryFor().class matches');\n\n appInstance.unregister('controller:post');\n appInstance.register('controller:post', PostController2);\n\n var postController2 = appInstance.lookup('controller:post');\n var postController2Factory = appInstance.factoryFor('controller:post');\n assert.ok(postController2 instanceof PostController2, 'lookup creates instance');\n assert.equal(PostController2, postController2Factory.class, 'factoryFor().class matches');\n\n assert.notStrictEqual(postController1, postController2, 'lookup creates a brand new instance, because the previous one was reset');\n });\n\n QUnit.test('can build and boot a registered engine', function (assert) {\n assert.expect(11);\n\n var ChatEngine = _engine.default.extend();\n var chatEngineInstance = void 0;\n\n application.register('engine:chat', ChatEngine);\n\n (0, _emberMetal.run)(function () {\n appInstance = _applicationInstance.default.create({ application: application });\n appInstance.setupRegistry();\n chatEngineInstance = appInstance.buildChildEngineInstance('chat');\n });\n\n return chatEngineInstance.boot().then(function () {\n assert.ok(true, 'boot successful');\n\n var registrations = ['route:basic', 'service:-routing', 'service:-glimmer-environment'];\n\n registrations.forEach(function (key) {\n assert.strictEqual(chatEngineInstance.resolveRegistration(key), appInstance.resolveRegistration(key), 'Engine and parent app share registrations for \\'' + key + '\\'');\n });\n\n var singletons = ['router:main', (0, _container.privatize)(_templateObject), '-view-registry:main', '-environment:main', 'service:-document', 'event_dispatcher:main'];\n\n var env = appInstance.lookup('-environment:main');\n singletons.push(env.isInteractive ? 'renderer:-dom' : 'renderer:-inert');\n\n singletons.forEach(function (key) {\n assert.strictEqual(chatEngineInstance.lookup(key), appInstance.lookup(key), 'Engine and parent app share singleton \\'' + key + '\\'');\n });\n });\n });\n\n QUnit.test('can build a registry via Ember.ApplicationInstance.setupRegistry() -- simulates ember-test-helpers', function (assert) {\n var namespace = _emberRuntime.Object.create({\n Resolver: { create: function () {} }\n });\n\n var registry = _application.default.buildRegistry(namespace);\n\n _applicationInstance.default.setupRegistry(registry);\n\n assert.equal(registry.resolve('service:-document'), document);\n });\n});","QUnit.module('ESLint | ember-application/tests/system/application_instance_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/application_instance_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/application_test', ['ember-babel', 'ember', 'ember-environment', 'ember-metal', 'ember-debug', 'ember-application/system/application', 'ember-routing', 'ember-views', 'ember-runtime', 'ember-template-compiler', 'ember-glimmer', 'container', 'ember-application/tests/test-helpers/registry-check', 'ember-utils', 'internal-test-helpers'], function (_emberBabel, _ember, _emberEnvironment, _emberMetal, _emberDebug, _application, _emberRouting, _emberViews, _emberRuntime, _emberTemplateCompiler, _emberGlimmer, _container, _registryCheck, _emberUtils, _internalTestHelpers) {\n 'use strict';\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['-bucket-cache:main'], ['-bucket-cache:main']),\n _templateObject2 = (0, _emberBabel.taggedTemplateLiteralLoose)(['template:components/-default'], ['template:components/-default']);\n\n var secondApp = void 0;\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application, autobooting multiple apps', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n (0, _emberViews.jQuery)('#qunit-fixture').html('\\n
\\n
HI
\\n
\\n
HI
\\n ');\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n }\n\n _class.prototype.createSecondApplication = function createSecondApplication(options) {\n var myOptions = (0, _emberUtils.assign)(this.applicationOptions, options);\n return this.secondApp = _application.default.create(myOptions);\n };\n\n _class.prototype.teardown = function teardown() {\n var _this2 = this;\n\n _ApplicationTestCase.prototype.teardown.call(this);\n\n if (this.secondApp) {\n this.runTask(function () {\n return _this2.secondApp.destroy();\n });\n }\n };\n\n _class.prototype['@test you can make a new application in a non-overlapping element'] = function (assert) {\n var _this3 = this;\n\n var app = this.runTask(function () {\n return _this3.createSecondApplication({\n rootElement: '#two'\n });\n });\n\n this.runTask(function () {\n return app.destroy();\n });\n assert.ok(true, 'should not raise');\n };\n\n _class.prototype['@test you cannot make a new application that is a parent of an existing application'] = function () {\n var _this4 = this;\n\n expectAssertion(function () {\n _this4.runTask(function () {\n return _this4.createSecondApplication({\n rootElement: _this4.applicationOptions.rootElement\n });\n });\n });\n };\n\n _class.prototype['@test you cannot make a new application that is a descendant of an existing application'] = function () {\n var _this5 = this;\n\n expectAssertion(function () {\n _this5.runTask(function () {\n return _this5.createSecondApplication({\n rootElement: '#one-child'\n });\n });\n });\n };\n\n _class.prototype['@test you cannot make a new application that is a duplicate of an existing application'] = function () {\n var _this6 = this;\n\n expectAssertion(function () {\n _this6.runTask(function () {\n return _this6.createSecondApplication({\n rootElement: '#one'\n });\n });\n });\n };\n\n _class.prototype['@test you cannot make two default applications without a rootElement error'] = function () {\n var _this7 = this;\n\n expectAssertion(function () {\n _this7.runTask(function () {\n return _this7.createSecondApplication();\n });\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_ApplicationTestCase.prototype.applicationOptions, {\n rootElement: '#one',\n router: null,\n autoboot: true\n });\n }\n }]);\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application', function (_ApplicationTestCase2) {\n (0, _emberBabel.inherits)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase2.apply(this, arguments));\n }\n\n _class2.prototype['@test includes deprecated access to `application.registry`'] = function testIncludesDeprecatedAccessToApplicationRegistry(assert) {\n var _this9 = this;\n\n assert.expect(3);\n\n assert.ok(typeof this.application.registry.register === 'function', '#registry.register is available as a function');\n\n this.application.__registry__.register = function () {\n assert.ok(true, '#register alias is called correctly');\n };\n\n expectDeprecation(function () {\n _this9.application.registry.register();\n }, /Using `Application.registry.register` is deprecated. Please use `Application.register` instead./);\n };\n\n _class2.prototype['@test builds a registry'] = function (assert) {\n var application = this.application;\n\n assert.strictEqual(application.resolveRegistration('application:main'), application, 'application:main is registered');\n assert.deepEqual(application.registeredOptionsForType('component'), { singleton: false }, 'optionsForType \\'component\\'');\n assert.deepEqual(application.registeredOptionsForType('view'), { singleton: false }, 'optionsForType \\'view\\'');\n (0, _registryCheck.verifyRegistration)(application, 'controller:basic');\n (0, _registryCheck.verifyRegistration)(application, '-view-registry:main');\n (0, _registryCheck.verifyInjection)(application, 'view', '_viewRegistry', '-view-registry:main');\n (0, _registryCheck.verifyInjection)(application, 'route', '_topLevelViewTemplate', 'template:-outlet');\n (0, _registryCheck.verifyRegistration)(application, 'route:basic');\n (0, _registryCheck.verifyRegistration)(application, 'event_dispatcher:main');\n (0, _registryCheck.verifyInjection)(application, 'router:main', 'namespace', 'application:main');\n (0, _registryCheck.verifyInjection)(application, 'view:-outlet', 'namespace', 'application:main');\n\n (0, _registryCheck.verifyRegistration)(application, 'location:auto');\n (0, _registryCheck.verifyRegistration)(application, 'location:hash');\n (0, _registryCheck.verifyRegistration)(application, 'location:history');\n (0, _registryCheck.verifyRegistration)(application, 'location:none');\n\n (0, _registryCheck.verifyInjection)(application, 'controller', 'target', 'router:main');\n (0, _registryCheck.verifyInjection)(application, 'controller', 'namespace', 'application:main');\n\n (0, _registryCheck.verifyRegistration)(application, (0, _container.privatize)(_templateObject));\n (0, _registryCheck.verifyInjection)(application, 'router', '_bucketCache', (0, _container.privatize)(_templateObject));\n (0, _registryCheck.verifyInjection)(application, 'route', '_bucketCache', (0, _container.privatize)(_templateObject));\n\n (0, _registryCheck.verifyInjection)(application, 'route', 'router', 'router:main');\n\n (0, _registryCheck.verifyRegistration)(application, 'component:-text-field');\n (0, _registryCheck.verifyRegistration)(application, 'component:-text-area');\n (0, _registryCheck.verifyRegistration)(application, 'component:-checkbox');\n (0, _registryCheck.verifyRegistration)(application, 'component:link-to');\n\n (0, _registryCheck.verifyRegistration)(application, 'service:-routing');\n (0, _registryCheck.verifyInjection)(application, 'service:-routing', 'router', 'router:main');\n\n // DEBUGGING\n (0, _registryCheck.verifyRegistration)(application, 'resolver-for-debugging:main');\n (0, _registryCheck.verifyInjection)(application, 'container-debug-adapter:main', 'resolver', 'resolver-for-debugging:main');\n (0, _registryCheck.verifyInjection)(application, 'data-adapter:main', 'containerDebugAdapter', 'container-debug-adapter:main');\n (0, _registryCheck.verifyRegistration)(application, 'container-debug-adapter:main');\n (0, _registryCheck.verifyRegistration)(application, 'component-lookup:main');\n\n (0, _registryCheck.verifyRegistration)(application, 'service:-glimmer-environment');\n (0, _registryCheck.verifyRegistration)(application, 'service:-dom-changes');\n (0, _registryCheck.verifyRegistration)(application, 'service:-dom-tree-construction');\n (0, _registryCheck.verifyInjection)(application, 'service:-glimmer-environment', 'appendOperations', 'service:-dom-tree-construction');\n (0, _registryCheck.verifyInjection)(application, 'service:-glimmer-environment', 'updateOperations', 'service:-dom-changes');\n (0, _registryCheck.verifyInjection)(application, 'renderer', 'env', 'service:-glimmer-environment');\n (0, _registryCheck.verifyRegistration)(application, 'view:-outlet');\n (0, _registryCheck.verifyRegistration)(application, 'renderer:-dom');\n (0, _registryCheck.verifyRegistration)(application, 'renderer:-inert');\n (0, _registryCheck.verifyRegistration)(application, (0, _container.privatize)(_templateObject2));\n (0, _registryCheck.verifyRegistration)(application, 'template:-outlet');\n (0, _registryCheck.verifyInjection)(application, 'view:-outlet', 'template', 'template:-outlet');\n (0, _registryCheck.verifyInjection)(application, 'template', 'env', 'service:-glimmer-environment');\n assert.deepEqual(application.registeredOptionsForType('helper'), { instantiate: false }, 'optionsForType \\'helper\\'');\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application, default resolver with autoboot', function (_DefaultResolverAppli) {\n (0, _emberBabel.inherits)(_class3, _DefaultResolverAppli);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n\n var _this10 = (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli.call(this));\n\n _this10.originalLookup = _emberEnvironment.context.lookup;\n return _this10;\n }\n\n _class3.prototype.teardown = function teardown() {\n _emberEnvironment.context.lookup = this.originalLookup;\n _DefaultResolverAppli.prototype.teardown.call(this);\n (0, _emberGlimmer.setTemplates)({});\n };\n\n _class3.prototype['@test acts like a namespace'] = function (assert) {\n var _this11 = this;\n\n var lookup = _emberEnvironment.context.lookup = {};\n\n lookup.TestApp = this.runTask(function () {\n return _this11.createApplication();\n });\n\n (0, _emberRuntime.setNamespaceSearchDisabled)(false);\n var Foo = this.application.Foo = _emberRuntime.Object.extend();\n assert.equal(Foo.toString(), 'TestApp.Foo', 'Classes pick up their parent namespace');\n };\n\n _class3.prototype['@test can specify custom router'] = function (assert) {\n var _this12 = this;\n\n var MyRouter = _emberRouting.Router.extend();\n this.runTask(function () {\n _this12.createApplication();\n _this12.application.Router = MyRouter;\n });\n\n assert.ok(this.application.__deprecatedInstance__.lookup('router:main') instanceof MyRouter, 'application resolved the correct router');\n };\n\n _class3.prototype['@test Minimal Application initialized with just an application template'] = function (assert) {\n var _this13 = this;\n\n this.$().html('');\n this.runTask(function () {\n return _this13.createApplication();\n });\n\n assert.equal(this.$().text().trim(), 'Hello World');\n };\n\n (0, _emberBabel.createClass)(_class3, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_DefaultResolverAppli.prototype.applicationOptions, {\n autoboot: true\n });\n }\n }]);\n return _class3;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application, autobooting', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class4, _AutobootApplicationT);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n\n var _this14 = (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.call(this));\n\n _this14.originalLogVersion = _emberEnvironment.ENV.LOG_VERSION;\n _this14.originalDebug = (0, _emberDebug.getDebugFunction)('debug');\n _this14.originalWarn = (0, _emberDebug.getDebugFunction)('warn');\n return _this14;\n }\n\n _class4.prototype.teardown = function teardown() {\n (0, _emberDebug.setDebugFunction)('warn', this.originalWarn);\n (0, _emberDebug.setDebugFunction)('debug', this.originalDebug);\n _emberEnvironment.ENV.LOG_VERSION = this.originalLogVersion;\n _AutobootApplicationT.prototype.teardown.call(this);\n };\n\n _class4.prototype['@test initialized application goes to initial route'] = function (assert) {\n var _this15 = this;\n\n this.runTask(function () {\n _this15.createApplication();\n _this15.addTemplate('application', '{{outlet}}');\n _this15.addTemplate('index', '
Hi from index
');\n });\n\n assert.equal(this.$('h1').text(), 'Hi from index');\n };\n\n _class4.prototype['@test ready hook is called before routing begins'] = function (assert) {\n var _this16 = this;\n\n assert.expect(2);\n\n this.runTask(function () {\n function registerRoute(application, name, callback) {\n var route = _emberRouting.Route.extend({\n activate: callback\n });\n\n application.register('route:' + name, route);\n }\n\n var MyApplication = _application.default.extend({\n ready: function () {\n registerRoute(this, 'index', function () {\n assert.ok(true, 'last-minute route is activated');\n });\n }\n });\n\n var app = _this16.createApplication({}, MyApplication);\n\n registerRoute(app, 'application', function () {\n return ok(true, 'normal route is activated');\n });\n });\n };\n\n _class4.prototype['@test initialize application via initialize call'] = function (assert) {\n var _this17 = this;\n\n this.runTask(function () {\n return _this17.createApplication();\n });\n // This is not a public way to access the container; we just\n // need to make some assertions about the created router\n var router = this.applicationInstance.lookup('router:main');\n assert.equal(router instanceof _emberRouting.Router, true, 'Router was set from initialize call');\n assert.equal(router.location instanceof _emberRouting.NoneLocation, true, 'Location was set from location implementation name');\n };\n\n _class4.prototype['@test initialize application with stateManager via initialize call from Router class'] = function (assert) {\n var _this18 = this;\n\n this.runTask(function () {\n _this18.createApplication();\n _this18.addTemplate('application', '
Hello!
');\n });\n // This is not a public way to access the container; we just\n // need to make some assertions about the created router\n var router = this.application.__deprecatedInstance__.lookup('router:main');\n assert.equal(router instanceof _emberRouting.Router, true, 'Router was set from initialize call');\n assert.equal(this.$('h1').text(), 'Hello!');\n };\n\n _class4.prototype['@test Application Controller backs the appplication template'] = function (assert) {\n var _this19 = this;\n\n this.runTask(function () {\n _this19.createApplication();\n _this19.addTemplate('application', '
{{greeting}}
');\n _this19.add('controller:application', _emberRuntime.Controller.extend({\n greeting: 'Hello!'\n }));\n });\n assert.equal(this.$('h1').text(), 'Hello!');\n };\n\n _class4.prototype['@test enable log of libraries with an ENV var'] = function (assert) {\n var _this20 = this;\n\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n var messages = [];\n\n _emberEnvironment.ENV.LOG_VERSION = true;\n\n (0, _emberDebug.setDebugFunction)('debug', function (message) {\n return messages.push(message);\n });\n\n _emberMetal.libraries.register('my-lib', '2.0.0a');\n\n this.runTask(function () {\n return _this20.createApplication();\n });\n\n assert.equal(messages[1], 'Ember : ' + _ember.VERSION);\n assert.equal(messages[2], 'jQuery : ' + (0, _emberViews.jQuery)().jquery);\n assert.equal(messages[3], 'my-lib : ' + '2.0.0a');\n\n _emberMetal.libraries.deRegister('my-lib');\n };\n\n _class4.prototype['@test disable log of version of libraries with an ENV var'] = function (assert) {\n var _this21 = this;\n\n var logged = false;\n\n _emberEnvironment.ENV.LOG_VERSION = false;\n\n (0, _emberDebug.setDebugFunction)('debug', function () {\n return logged = true;\n });\n\n this.runTask(function () {\n return _this21.createApplication();\n });\n\n assert.ok(!logged, 'library version logging skipped');\n };\n\n _class4.prototype['@test can resolve custom router'] = function (assert) {\n var _this22 = this;\n\n var CustomRouter = _emberRouting.Router.extend();\n\n this.runTask(function () {\n _this22.createApplication();\n _this22.add('router:main', CustomRouter);\n });\n\n assert.ok(this.application.__deprecatedInstance__.lookup('router:main') instanceof CustomRouter, 'application resolved the correct router');\n };\n\n _class4.prototype['@test does not leak itself in onLoad._loaded'] = function (assert) {\n var _this23 = this;\n\n assert.equal(_emberRuntime._loaded.application, undefined);\n this.runTask(function () {\n return _this23.createApplication();\n });\n assert.equal(_emberRuntime._loaded.application, this.application);\n this.runTask(function () {\n return _this23.application.destroy();\n });\n assert.equal(_emberRuntime._loaded.application, undefined);\n };\n\n _class4.prototype['@test can build a registry via Ember.Application.buildRegistry() --- simulates ember-test-helpers'] = function (assert) {\n var namespace = _emberRuntime.Object.create({\n Resolver: { create: function () {} }\n });\n\n var registry = _application.default.buildRegistry(namespace);\n\n assert.equal(registry.resolve('application:main'), namespace);\n };\n\n return _class4;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application#buildRegistry', function (_AbstractTestCase) {\n (0, _emberBabel.inherits)(_class5, _AbstractTestCase);\n\n function _class5() {\n (0, _emberBabel.classCallCheck)(this, _class5);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractTestCase.apply(this, arguments));\n }\n\n _class5.prototype['@test can build a registry via Ember.Application.buildRegistry() --- simulates ember-test-helpers'] = function (assert) {\n var namespace = _emberRuntime.Object.create({\n Resolver: {\n create: function () {}\n }\n });\n\n var registry = _application.default.buildRegistry(namespace);\n\n assert.equal(registry.resolve('application:main'), namespace);\n };\n\n return _class5;\n }(_internalTestHelpers.AbstractTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/application_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/application_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/bootstrap-test', ['ember-babel', 'ember-utils', 'ember-views', 'internal-test-helpers'], function (_emberBabel, _emberUtils, _emberViews, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application with default resolver and autoboot', function (_DefaultResolverAppli) {\n (0, _emberBabel.inherits)(_class, _DefaultResolverAppli);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n (0, _emberViews.jQuery)('#qunit-fixture').html('\\n \\n\\n \\n \\n ');\n return (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli.call(this));\n }\n\n _class.prototype['@test templates in script tags are extracted at application creation'] = function testTemplatesInScriptTagsAreExtractedAtApplicationCreation(assert) {\n var _this2 = this;\n\n this.runTask(function () {\n return _this2.createApplication();\n });\n assert.equal(this.$('#app').text(), 'Hello World!');\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_DefaultResolverAppli.prototype.applicationOptions, {\n autoboot: true,\n rootElement: '#app'\n });\n }\n }]);\n return _class;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/bootstrap-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/bootstrap-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/dependency_injection/custom_resolver_test', ['ember-babel', 'ember-application/system/resolver', 'ember-utils', 'internal-test-helpers'], function (_emberBabel, _resolver, _emberUtils, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application with extended default resolver and autoboot', function (_DefaultResolverAppli) {\n (0, _emberBabel.inherits)(_class, _DefaultResolverAppli);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli.apply(this, arguments));\n }\n\n _class.prototype['@test a resolver can be supplied to application'] = function (assert) {\n var _this2 = this;\n\n this.runTask(function () {\n return _this2.createApplication();\n });\n assert.equal(this.$('h1').text(), 'Fallback');\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'applicationOptions',\n get: function () {\n var applicationTemplate = this.compile('
Fallback
');\n\n var Resolver = _resolver.default.extend({\n resolveTemplate: function (resolvable) {\n if (resolvable.fullNameWithoutType === 'application') {\n return applicationTemplate;\n } else {\n return this._super(resolvable);\n }\n }\n });\n\n return (0, _emberUtils.assign)(_DefaultResolverAppli.prototype.applicationOptions, {\n Resolver: Resolver,\n autoboot: true\n });\n }\n }]);\n return _class;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/dependency_injection/custom_resolver_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/dependency_injection/custom_resolver_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/dependency_injection/default_resolver_test', ['ember-babel', 'internal-test-helpers', 'ember-environment', 'ember-runtime', 'ember-routing', 'ember-glimmer', 'ember-debug'], function (_emberBabel, _internalTestHelpers, _emberEnvironment, _emberRuntime, _emberRouting, _emberGlimmer, _emberDebug) {\n 'use strict';\n\n /* globals EmberDev */\n (0, _internalTestHelpers.moduleFor)('Ember.Application Dependency Injection - Integration - default resolver', function (_DefaultResolverAppli) {\n (0, _emberBabel.inherits)(_class, _DefaultResolverAppli);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli.apply(this, arguments));\n }\n\n _class.prototype.beforeEach = function beforeEach() {\n var _this2 = this;\n\n this.runTask(function () {\n return _this2.createApplication();\n });\n return this.visit('/');\n };\n\n _class.prototype['@test the default resolver looks up templates in Ember.TEMPLATES'] = function (assert) {\n var fooTemplate = this.addTemplate('foo', 'foo template');\n var fooBarTemplate = this.addTemplate('fooBar', 'fooBar template');\n var fooBarBazTemplate = this.addTemplate('fooBar/baz', 'fooBar/baz template');\n\n assert.equal(this.applicationInstance.factoryFor('template:foo').class, fooTemplate, 'resolves template:foo');\n assert.equal(this.applicationInstance.factoryFor('template:fooBar').class, fooBarTemplate, 'resolves template:foo_bar');\n assert.equal(this.applicationInstance.factoryFor('template:fooBar.baz').class, fooBarBazTemplate, 'resolves template:foo_bar.baz');\n };\n\n _class.prototype['@test the default resolver looks up basic name as no prefix'] = function (assert) {\n var instance = this.applicationInstance.lookup('controller:basic');\n assert.ok(_emberRuntime.Controller.detect(instance), 'locator looks up correct controller');\n };\n\n _class.prototype['@test the default resolver looks up arbitrary types on the namespace'] = function (assert) {\n var Class = this.application.FooManager = _emberRuntime.Object.extend();\n var resolvedClass = this.application.resolveRegistration('manager:foo');\n assert.equal(Class, resolvedClass, 'looks up FooManager on application');\n };\n\n _class.prototype['@test the default resolver resolves models on the namespace'] = function (assert) {\n var Class = this.application.Post = _emberRuntime.Object.extend();\n var factoryClass = this.applicationInstance.factoryFor('model:post').class;\n assert.equal(Class, factoryClass, 'looks up Post model on application');\n };\n\n _class.prototype['@test the default resolver resolves *:main on the namespace'] = function (assert) {\n var Class = this.application.FooBar = _emberRuntime.Object.extend();\n var factoryClass = this.applicationInstance.factoryFor('foo-bar:main').class;\n assert.equal(Class, factoryClass, 'looks up FooBar type without name on application');\n };\n\n _class.prototype['@test the default resolver resolves container-registered helpers'] = function (assert) {\n var shorthandHelper = (0, _emberGlimmer.helper)(function () {});\n var helper = _emberGlimmer.Helper.extend();\n\n this.application.register('helper:shorthand', shorthandHelper);\n this.application.register('helper:complete', helper);\n\n var lookedUpShorthandHelper = this.applicationInstance.factoryFor('helper:shorthand').class;\n\n assert.ok(lookedUpShorthandHelper.isHelperFactory, 'shorthand helper isHelper');\n\n var lookedUpHelper = this.applicationInstance.factoryFor('helper:complete').class;\n\n assert.ok(lookedUpHelper.isHelperFactory, 'complete helper is factory');\n assert.ok(helper.detect(lookedUpHelper), 'looked up complete helper');\n };\n\n _class.prototype['@test the default resolver resolves container-registered helpers via lookupFor'] = function (assert) {\n var shorthandHelper = (0, _emberGlimmer.helper)(function () {});\n var helper = _emberGlimmer.Helper.extend();\n\n this.application.register('helper:shorthand', shorthandHelper);\n this.application.register('helper:complete', helper);\n\n var lookedUpShorthandHelper = this.applicationInstance.factoryFor('helper:shorthand').class;\n\n assert.ok(lookedUpShorthandHelper.isHelperFactory, 'shorthand helper isHelper');\n\n var lookedUpHelper = this.applicationInstance.factoryFor('helper:complete').class;\n\n assert.ok(lookedUpHelper.isHelperFactory, 'complete helper is factory');\n assert.ok(helper.detect(lookedUpHelper), 'looked up complete helper');\n };\n\n _class.prototype['@test the default resolver resolves helpers on the namespace'] = function (assert) {\n var ShorthandHelper = (0, _emberGlimmer.helper)(function () {});\n var CompleteHelper = _emberGlimmer.Helper.extend();\n\n this.application.ShorthandHelper = ShorthandHelper;\n this.application.CompleteHelper = CompleteHelper;\n\n var resolvedShorthand = this.application.resolveRegistration('helper:shorthand');\n var resolvedComplete = this.application.resolveRegistration('helper:complete');\n\n assert.equal(resolvedShorthand, ShorthandHelper, 'resolve fetches the shorthand helper factory');\n assert.equal(resolvedComplete, CompleteHelper, 'resolve fetches the complete helper factory');\n };\n\n _class.prototype['@test the default resolver resolves to the same instance, no matter the notation '] = function (assert) {\n this.application.NestedPostController = _emberRuntime.Controller.extend({});\n\n assert.equal(this.applicationInstance.lookup('controller:nested-post'), this.applicationInstance.lookup('controller:nested_post'), 'looks up NestedPost controller on application');\n };\n\n _class.prototype['@test the default resolver throws an error if the fullName to resolve is invalid'] = function (assert) {\n var _this3 = this;\n\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration(undefined);\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration(null);\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration('');\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration('');\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration(':');\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration('model');\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration('model:');\n }, /fullName must be a proper full name/);\n expectAssertion(function () {\n _this3.applicationInstance.resolveRegistration(':type');\n }, /fullName must be a proper full name/);\n };\n\n _class.prototype['@test lookup description'] = function (assert) {\n this.application.toString = function () {\n return 'App';\n };\n\n assert.equal(this.privateRegistry.describe('controller:foo'), 'App.FooController', 'Type gets appended at the end');\n assert.equal(this.privateRegistry.describe('controller:foo.bar'), 'App.FooBarController', 'dots are removed');\n assert.equal(this.privateRegistry.describe('model:foo'), 'App.Foo', 'models don\\'t get appended at the end');\n };\n\n _class.prototype['@test assertion for routes without isRouteFactory property'] = function (assert) {\n var _this4 = this;\n\n this.application.FooRoute = _emberGlimmer.Component.extend();\n\n expectAssertion(function () {\n _this4.privateRegistry.resolve('route:foo');\n }, /to resolve to an Ember.Route/, 'Should assert');\n };\n\n _class.prototype['@test no assertion for routes that extend from Ember.Route'] = function (assert) {\n assert.expect(0);\n this.application.FooRoute = _emberRouting.Route.extend();\n this.privateRegistry.resolve('route:foo');\n };\n\n _class.prototype['@test deprecation warning for service factories without isServiceFactory property'] = function (assert) {\n var _this5 = this;\n\n expectAssertion(function () {\n _this5.application.FooService = _emberRuntime.Object.extend();\n _this5.privateRegistry.resolve('service:foo');\n }, /Expected service:foo to resolve to an Ember.Service but instead it was \\.FooService\\./);\n };\n\n _class.prototype['@test no deprecation warning for service factories that extend from Ember.Service'] = function (assert) {\n assert.expect(0);\n this.application.FooService = _emberRuntime.Service.extend();\n this.privateRegistry.resolve('service:foo');\n };\n\n _class.prototype['@test deprecation warning for component factories without isComponentFactory property'] = function (assert) {\n var _this6 = this;\n\n expectAssertion(function () {\n _this6.application.FooComponent = _emberRuntime.Object.extend();\n _this6.privateRegistry.resolve('component:foo');\n }, /Expected component:foo to resolve to an Ember\\.Component but instead it was \\.FooComponent\\./);\n };\n\n _class.prototype['@test no deprecation warning for component factories that extend from Ember.Component'] = function (assert) {\n expectNoDeprecation();\n this.application.FooView = _emberGlimmer.Component.extend();\n this.privateRegistry.resolve('component:foo');\n };\n\n _class.prototype['@test knownForType returns each item for a given type found'] = function (assert) {\n this.application.FooBarHelper = 'foo';\n this.application.BazQuxHelper = 'bar';\n\n var found = this.privateRegistry.resolver.knownForType('helper');\n\n assert.deepEqual(found, {\n 'helper:foo-bar': true,\n 'helper:baz-qux': true\n });\n };\n\n _class.prototype['@test knownForType is not required to be present on the resolver'] = function (assert) {\n delete this.privateRegistry.resolver.knownForType;\n\n this.privateRegistry.resolver.knownForType('helper', function () {});\n\n assert.ok(true, 'does not error');\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'privateRegistry',\n get: function () {\n return this.application.__registry__;\n }\n }]);\n return _class;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application Dependency Injection - Integration - default resolver w/ other namespace', function (_DefaultResolverAppli2) {\n (0, _emberBabel.inherits)(_class2, _DefaultResolverAppli2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli2.apply(this, arguments));\n }\n\n _class2.prototype.beforeEach = function beforeEach() {\n var _this8 = this;\n\n this.UserInterface = _emberEnvironment.context.lookup.UserInterface = _emberRuntime.Namespace.create();\n this.runTask(function () {\n return _this8.createApplication();\n });\n return this.visit('/');\n };\n\n _class2.prototype.teardown = function teardown() {\n var UserInterfaceNamespace = _emberRuntime.Namespace.NAMESPACES_BY_ID['UserInterface'];\n if (UserInterfaceNamespace) {\n this.runTask(function () {\n UserInterfaceNamespace.destroy();\n });\n }\n _DefaultResolverAppli2.prototype.teardown.call(this);\n };\n\n _class2.prototype['@test the default resolver can look things up in other namespaces'] = function (assert) {\n this.UserInterface.NavigationController = _emberRuntime.Controller.extend();\n\n var nav = this.applicationInstance.lookup('controller:userInterface/navigation');\n\n assert.ok(nav instanceof this.UserInterface.NavigationController, 'the result should be an instance of the specified class');\n };\n\n return _class2;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application Dependency Injection - Integration - default resolver', function (_DefaultResolverAppli3) {\n (0, _emberBabel.inherits)(_class3, _DefaultResolverAppli3);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n\n var _this9 = (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli3.call(this));\n\n _this9._originalLookup = _emberEnvironment.context.lookup;\n _this9._originalInfo = (0, _emberDebug.getDebugFunction)('info');\n return _this9;\n }\n\n _class3.prototype.beforeEach = function beforeEach() {\n var _this10 = this;\n\n this.runTask(function () {\n return _this10.createApplication();\n });\n return this.visit('/');\n };\n\n _class3.prototype.teardown = function teardown() {\n (0, _emberDebug.setDebugFunction)('info', this._originalInfo);\n _emberEnvironment.context.lookup = this._originalLookup;\n _DefaultResolverAppli3.prototype.teardown.call(this);\n };\n\n _class3.prototype['@test the default resolver logs hits if \\'LOG_RESOLVER\\' is set'] = function (assert) {\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n assert.expect(3);\n\n this.application.LOG_RESOLVER = true;\n this.application.ScoobyDoo = _emberRuntime.Object.extend();\n this.application.toString = function () {\n return 'App';\n };\n\n (0, _emberDebug.setDebugFunction)('info', function (symbol, name, padding, lookupDescription) {\n assert.equal(symbol, '[✓]', 'proper symbol is printed when a module is found');\n assert.equal(name, 'doo:scooby', 'proper lookup value is logged');\n assert.equal(lookupDescription, 'App.ScoobyDoo');\n });\n\n this.applicationInstance.resolveRegistration('doo:scooby');\n };\n\n _class3.prototype['@test the default resolver logs misses if \\'LOG_RESOLVER\\' is set'] = function (assert) {\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n assert.expect(3);\n\n this.application.LOG_RESOLVER = true;\n this.application.toString = function () {\n return 'App';\n };\n\n (0, _emberDebug.setDebugFunction)('info', function (symbol, name, padding, lookupDescription) {\n assert.equal(symbol, '[ ]', 'proper symbol is printed when a module is not found');\n assert.equal(name, 'doo:scooby', 'proper lookup value is logged');\n assert.equal(lookupDescription, 'App.ScoobyDoo');\n });\n\n this.applicationInstance.resolveRegistration('doo:scooby');\n };\n\n _class3.prototype['@test doesn\\'t log without LOG_RESOLVER'] = function (assert) {\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n var infoCount = 0;\n\n this.application.ScoobyDoo = _emberRuntime.Object.extend();\n\n (0, _emberDebug.setDebugFunction)('info', function (symbol, name) {\n return infoCount = infoCount + 1;\n });\n\n this.applicationInstance.resolveRegistration('doo:scooby');\n this.applicationInstance.resolveRegistration('doo:scrappy');\n assert.equal(infoCount, 0, 'Logger.info should not be called if LOG_RESOLVER is not set');\n };\n\n return _class3;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/dependency_injection/default_resolver_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/dependency_injection/default_resolver_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/dependency_injection/normalization_test', ['ember-metal', 'ember-application/system/application'], function (_emberMetal, _application) {\n 'use strict';\n\n var application = void 0,\n registry = void 0;\n\n QUnit.module('Ember.Application Dependency Injection – normalization', {\n setup: function () {\n application = (0, _emberMetal.run)(_application.default, 'create');\n registry = application.__registry__;\n },\n teardown: function () {\n (0, _emberMetal.run)(application, 'destroy');\n }\n });\n\n QUnit.test('normalization', function () {\n ok(registry.normalize, 'registry#normalize is present');\n\n equal(registry.normalize('foo:bar'), 'foo:bar');\n\n equal(registry.normalize('controller:posts'), 'controller:posts');\n equal(registry.normalize('controller:posts_index'), 'controller:postsIndex');\n equal(registry.normalize('controller:posts.index'), 'controller:postsIndex');\n equal(registry.normalize('controller:posts-index'), 'controller:postsIndex');\n equal(registry.normalize('controller:posts.post.index'), 'controller:postsPostIndex');\n equal(registry.normalize('controller:posts_post.index'), 'controller:postsPostIndex');\n equal(registry.normalize('controller:posts.post_index'), 'controller:postsPostIndex');\n equal(registry.normalize('controller:posts.post-index'), 'controller:postsPostIndex');\n equal(registry.normalize('controller:postsIndex'), 'controller:postsIndex');\n equal(registry.normalize('controller:blogPosts.index'), 'controller:blogPostsIndex');\n equal(registry.normalize('controller:blog/posts.index'), 'controller:blog/postsIndex');\n equal(registry.normalize('controller:blog/posts-index'), 'controller:blog/postsIndex');\n equal(registry.normalize('controller:blog/posts.post.index'), 'controller:blog/postsPostIndex');\n equal(registry.normalize('controller:blog/posts_post.index'), 'controller:blog/postsPostIndex');\n equal(registry.normalize('controller:blog/posts_post-index'), 'controller:blog/postsPostIndex');\n\n equal(registry.normalize('template:blog/posts_index'), 'template:blog/posts_index');\n });\n\n QUnit.test('normalization is indempotent', function () {\n var examples = ['controller:posts', 'controller:posts.post.index', 'controller:blog/posts.post_index', 'template:foo_bar'];\n\n examples.forEach(function (example) {\n equal(registry.normalize(registry.normalize(example)), registry.normalize(example));\n });\n });\n});","QUnit.module('ESLint | ember-application/tests/system/dependency_injection/normalization_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/dependency_injection/normalization_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/dependency_injection/to_string_test', ['ember-babel', 'ember-utils', 'ember-runtime', 'ember-application', 'internal-test-helpers'], function (_emberBabel, _emberUtils, _emberRuntime, _emberApplication, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application Dependency Injection - DefaultResolver#toString', function (_DefaultResolverAppli) {\n (0, _emberBabel.inherits)(_class, _DefaultResolverAppli);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _DefaultResolverAppli.call(this));\n\n _this.runTask(function () {\n return _this.createApplication();\n });\n _this.application.Post = _emberRuntime.Object.extend();\n return _this;\n }\n\n _class.prototype.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _class.prototype['@test factories'] = function testFactories(assert) {\n var PostFactory = this.applicationInstance.factoryFor('model:post').class;\n assert.equal(PostFactory.toString(), '.Post', 'expecting the model to be post');\n };\n\n _class.prototype['@test instances'] = function testInstances(assert) {\n var post = this.applicationInstance.lookup('model:post');\n var guid = (0, _emberUtils.guidFor)(post);\n\n assert.equal(post.toString(), '<.Post:' + guid + '>', 'expecting the model to be post');\n };\n\n return _class;\n }(_internalTestHelpers.DefaultResolverApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application Dependency Injection - Resolver#toString', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class2, _ApplicationTestCase);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class2.prototype.beforeEach = function beforeEach() {\n return this.visit('/');\n };\n\n _class2.prototype['@test toString called on a resolver'] = function testToStringCalledOnAResolver(assert) {\n this.add('model:peter', _emberRuntime.Object.extend());\n\n var peter = this.applicationInstance.lookup('model:peter');\n var guid = (0, _emberUtils.guidFor)(peter);\n assert.equal(peter.toString(), '', 'expecting the supermodel to be peter');\n };\n\n (0, _emberBabel.createClass)(_class2, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_ApplicationTestCase.prototype.applicationOptions, {\n Resolver: function (_ModuleBasedTestResol) {\n (0, _emberBabel.inherits)(Resolver, _ModuleBasedTestResol);\n\n function Resolver() {\n (0, _emberBabel.classCallCheck)(this, Resolver);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ModuleBasedTestResol.apply(this, arguments));\n }\n\n Resolver.prototype.makeToString = function makeToString(_, fullName) {\n return fullName;\n };\n\n return Resolver;\n }(_internalTestHelpers.ModuleBasedTestResolver)\n });\n }\n }]);\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/dependency_injection/to_string_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/dependency_injection/to_string_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/dependency_injection_test', ['ember-environment', 'ember-metal', 'ember-runtime', 'ember-application/system/application'], function (_emberEnvironment, _emberMetal, _emberRuntime, _application) {\n 'use strict';\n\n var EmberApplication = _application.default;\n\n var originalLookup = _emberEnvironment.context.lookup;\n var registry = void 0,\n locator = void 0,\n application = void 0;\n\n QUnit.module('Ember.Application Dependency Injection', {\n setup: function () {\n application = (0, _emberMetal.run)(EmberApplication, 'create');\n\n application.Person = _emberRuntime.Object.extend({});\n application.Orange = _emberRuntime.Object.extend({});\n application.Email = _emberRuntime.Object.extend({});\n application.User = _emberRuntime.Object.extend({});\n application.PostIndexController = _emberRuntime.Object.extend({});\n\n application.register('model:person', application.Person, { singleton: false });\n application.register('model:user', application.User, { singleton: false });\n application.register('fruit:favorite', application.Orange);\n application.register('communication:main', application.Email, { singleton: false });\n application.register('controller:postIndex', application.PostIndexController, { singleton: true });\n\n registry = application.__registry__;\n locator = application.__container__;\n\n _emberEnvironment.context.lookup = {};\n },\n teardown: function () {\n (0, _emberMetal.run)(application, 'destroy');\n application = locator = null;\n _emberEnvironment.context.lookup = originalLookup;\n }\n });\n\n QUnit.test('container lookup is normalized', function () {\n var dotNotationController = locator.lookup('controller:post.index');\n var camelCaseController = locator.lookup('controller:postIndex');\n\n ok(dotNotationController instanceof application.PostIndexController);\n ok(camelCaseController instanceof application.PostIndexController);\n\n equal(dotNotationController, camelCaseController);\n });\n\n QUnit.test('registered entities can be looked up later', function () {\n equal(registry.resolve('model:person'), application.Person);\n equal(registry.resolve('model:user'), application.User);\n equal(registry.resolve('fruit:favorite'), application.Orange);\n equal(registry.resolve('communication:main'), application.Email);\n equal(registry.resolve('controller:postIndex'), application.PostIndexController);\n\n equal(locator.lookup('fruit:favorite'), locator.lookup('fruit:favorite'), 'singleton lookup worked');\n ok(locator.lookup('model:user') !== locator.lookup('model:user'), 'non-singleton lookup worked');\n });\n\n QUnit.test('injections', function () {\n application.inject('model', 'fruit', 'fruit:favorite');\n application.inject('model:user', 'communication', 'communication:main');\n\n var user = locator.lookup('model:user');\n var person = locator.lookup('model:person');\n var fruit = locator.lookup('fruit:favorite');\n\n equal(user.get('fruit'), fruit);\n equal(person.get('fruit'), fruit);\n\n ok(application.Email.detectInstance(user.get('communication')));\n });\n});","QUnit.module('ESLint | ember-application/tests/system/dependency_injection_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/dependency_injection_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/engine_initializers_test', ['ember-metal', 'ember-application/system/engine'], function (_emberMetal, _engine) {\n 'use strict';\n\n var MyEngine = void 0,\n myEngine = void 0,\n myEngineInstance = void 0;\n\n QUnit.module('Ember.Engine initializers', {\n setup: function () {},\n teardown: function () {\n (0, _emberMetal.run)(function () {\n if (myEngineInstance) {\n myEngineInstance.destroy();\n }\n\n if (myEngine) {\n myEngine.destroy();\n }\n });\n }\n });\n\n QUnit.test('initializers require proper \\'name\\' and \\'initialize\\' properties', function () {\n MyEngine = _engine.default.extend();\n\n expectAssertion(function () {\n (0, _emberMetal.run)(function () {\n MyEngine.initializer({ name: 'initializer' });\n });\n });\n\n expectAssertion(function () {\n (0, _emberMetal.run)(function () {\n MyEngine.initializer({\n initialize: function () {}\n });\n });\n });\n });\n\n QUnit.test('initializers are passed an Engine', function () {\n MyEngine = _engine.default.extend();\n\n MyEngine.initializer({\n name: 'initializer',\n initialize: function (engine) {\n ok(engine instanceof _engine.default, 'initialize is passed an Engine');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = myEngine.buildInstance();\n });\n\n QUnit.test('initializers can be registered in a specified order', function () {\n var order = [];\n\n MyEngine = _engine.default.extend();\n MyEngine.initializer({\n name: 'fourth',\n after: 'third',\n initialize: function (engine) {\n order.push('fourth');\n }\n });\n\n MyEngine.initializer({\n name: 'second',\n after: 'first',\n before: 'third',\n initialize: function (engine) {\n order.push('second');\n }\n });\n\n MyEngine.initializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (engine) {\n order.push('fifth');\n }\n });\n\n MyEngine.initializer({\n name: 'first',\n before: 'second',\n initialize: function (engine) {\n order.push('first');\n }\n });\n\n MyEngine.initializer({\n name: 'third',\n initialize: function (engine) {\n order.push('third');\n }\n });\n\n MyEngine.initializer({\n name: 'sixth',\n initialize: function (engine) {\n order.push('sixth');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = myEngine.buildInstance();\n\n deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n });\n\n QUnit.test('initializers can be registered in a specified order as an array', function () {\n var order = [];\n\n MyEngine = _engine.default.extend();\n\n MyEngine.initializer({\n name: 'third',\n initialize: function (engine) {\n order.push('third');\n }\n });\n\n MyEngine.initializer({\n name: 'second',\n after: 'first',\n before: ['third', 'fourth'],\n initialize: function (engine) {\n order.push('second');\n }\n });\n\n MyEngine.initializer({\n name: 'fourth',\n after: ['second', 'third'],\n initialize: function (engine) {\n order.push('fourth');\n }\n });\n\n MyEngine.initializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (engine) {\n order.push('fifth');\n }\n });\n\n MyEngine.initializer({\n name: 'first',\n before: ['second'],\n initialize: function (engine) {\n order.push('first');\n }\n });\n\n MyEngine.initializer({\n name: 'sixth',\n initialize: function (engine) {\n order.push('sixth');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = myEngine.buildInstance();\n\n deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n });\n\n QUnit.test('initializers can have multiple dependencies', function () {\n var order = [];\n\n MyEngine = _engine.default.extend();\n\n var a = {\n name: 'a',\n before: 'b',\n initialize: function (engine) {\n order.push('a');\n }\n };\n var b = {\n name: 'b',\n initialize: function (engine) {\n order.push('b');\n }\n };\n var c = {\n name: 'c',\n after: 'b',\n initialize: function (engine) {\n order.push('c');\n }\n };\n var afterB = {\n name: 'after b',\n after: 'b',\n initialize: function (engine) {\n order.push('after b');\n }\n };\n var afterC = {\n name: 'after c',\n after: 'c',\n initialize: function (engine) {\n order.push('after c');\n }\n };\n\n MyEngine.initializer(b);\n MyEngine.initializer(a);\n MyEngine.initializer(afterC);\n MyEngine.initializer(afterB);\n MyEngine.initializer(c);\n\n myEngine = MyEngine.create();\n myEngineInstance = myEngine.buildInstance();\n\n ok(order.indexOf(a.name) < order.indexOf(b.name), 'a < b');\n ok(order.indexOf(b.name) < order.indexOf(c.name), 'b < c');\n ok(order.indexOf(b.name) < order.indexOf(afterB.name), 'b < afterB');\n ok(order.indexOf(c.name) < order.indexOf(afterC.name), 'c < afterC');\n });\n\n QUnit.test('initializers set on Engine subclasses are not shared between engines', function () {\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstEngine = _engine.default.extend();\n\n FirstEngine.initializer({\n name: 'first',\n initialize: function (engine) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondEngine = _engine.default.extend();\n\n SecondEngine.initializer({\n name: 'second',\n initialize: function (engine) {\n secondInitializerRunCount++;\n }\n });\n\n var firstEngine = FirstEngine.create();\n var firstEngineInstance = firstEngine.buildInstance();\n\n equal(firstInitializerRunCount, 1, 'first initializer only was run');\n equal(secondInitializerRunCount, 0, 'first initializer only was run');\n\n var secondEngine = SecondEngine.create();\n var secondEngineInstance = secondEngine.buildInstance();\n\n equal(firstInitializerRunCount, 1, 'second initializer only was run');\n equal(secondInitializerRunCount, 1, 'second initializer only was run');\n\n (0, _emberMetal.run)(function () {\n firstEngineInstance.destroy();\n secondEngineInstance.destroy();\n\n firstEngine.destroy();\n secondEngine.destroy();\n });\n });\n\n QUnit.test('initializers are concatenated', function () {\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstEngine = _engine.default.extend();\n\n FirstEngine.initializer({\n name: 'first',\n initialize: function (engine) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondEngine = FirstEngine.extend();\n\n SecondEngine.initializer({\n name: 'second',\n initialize: function (engine) {\n secondInitializerRunCount++;\n }\n });\n\n var firstEngine = FirstEngine.create();\n var firstEngineInstance = firstEngine.buildInstance();\n\n equal(firstInitializerRunCount, 1, 'first initializer only was run when base class created');\n equal(secondInitializerRunCount, 0, 'second initializer was not run when first base class created');\n firstInitializerRunCount = 0;\n\n var secondEngine = SecondEngine.create();\n var secondEngineInstance = secondEngine.buildInstance();\n\n equal(firstInitializerRunCount, 1, 'first initializer was run when subclass created');\n equal(secondInitializerRunCount, 1, 'second initializers was run when subclass created');\n\n (0, _emberMetal.run)(function () {\n firstEngineInstance.destroy();\n secondEngineInstance.destroy();\n\n firstEngine.destroy();\n secondEngine.destroy();\n });\n });\n\n QUnit.test('initializers are per-engine', function () {\n expect(2);\n\n var FirstEngine = _engine.default.extend();\n\n FirstEngine.initializer({\n name: 'abc',\n initialize: function (engine) {}\n });\n\n expectAssertion(function () {\n FirstEngine.initializer({\n name: 'abc',\n initialize: function (engine) {}\n });\n });\n\n var SecondEngine = _engine.default.extend();\n SecondEngine.instanceInitializer({\n name: 'abc',\n initialize: function (engine) {}\n });\n\n ok(true, 'Two engines can have initializers named the same.');\n });\n\n QUnit.test('initializers are executed in their own context', function () {\n expect(1);\n\n MyEngine = _engine.default.extend();\n\n MyEngine.initializer({\n name: 'coolInitializer',\n myProperty: 'cool',\n initialize: function (engine) {\n equal(this.myProperty, 'cool', 'should have access to its own context');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = myEngine.buildInstance();\n });\n});","QUnit.module('ESLint | ember-application/tests/system/engine_initializers_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/engine_initializers_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/engine_instance_initializers_test', ['ember-metal', 'ember-application/system/engine', 'ember-application/system/engine-instance', 'ember-application/system/engine-parent'], function (_emberMetal, _engine, _engineInstance, _engineParent) {\n 'use strict';\n\n var MyEngine = void 0,\n myEngine = void 0,\n myEngineInstance = void 0;\n\n function buildEngineInstance(EngineClass) {\n var engineInstance = EngineClass.buildInstance();\n (0, _engineParent.setEngineParent)(engineInstance, {\n lookup: function () {\n return {};\n },\n resolveRegistration: function () {\n return {};\n }\n });\n return engineInstance;\n }\n\n QUnit.module('Ember.Engine instance initializers', {\n setup: function () {},\n teardown: function () {\n (0, _emberMetal.run)(function () {\n if (myEngineInstance) {\n myEngineInstance.destroy();\n }\n\n if (myEngine) {\n myEngine.destroy();\n }\n });\n }\n });\n\n QUnit.test('initializers require proper \\'name\\' and \\'initialize\\' properties', function () {\n MyEngine = _engine.default.extend();\n\n expectAssertion(function () {\n (0, _emberMetal.run)(function () {\n MyEngine.instanceInitializer({ name: 'initializer' });\n });\n });\n\n expectAssertion(function () {\n (0, _emberMetal.run)(function () {\n MyEngine.instanceInitializer({\n initialize: function () {}\n });\n });\n });\n });\n\n QUnit.test('initializers are passed an engine instance', function () {\n MyEngine = _engine.default.extend();\n\n MyEngine.instanceInitializer({\n name: 'initializer',\n initialize: function (instance) {\n ok(instance instanceof _engineInstance.default, 'initialize is passed an engine instance');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = buildEngineInstance(myEngine);\n return myEngineInstance.boot();\n });\n\n QUnit.test('initializers can be registered in a specified order', function () {\n var order = [];\n\n MyEngine = _engine.default.extend();\n\n MyEngine.instanceInitializer({\n name: 'fourth',\n after: 'third',\n initialize: function (engine) {\n order.push('fourth');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'second',\n after: 'first',\n before: 'third',\n initialize: function (engine) {\n order.push('second');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (engine) {\n order.push('fifth');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'first',\n before: 'second',\n initialize: function (engine) {\n order.push('first');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'third',\n initialize: function (engine) {\n order.push('third');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'sixth',\n initialize: function (engine) {\n order.push('sixth');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = buildEngineInstance(myEngine);\n\n return myEngineInstance.boot().then(function () {\n deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n });\n });\n\n QUnit.test('initializers can be registered in a specified order as an array', function () {\n var order = [];\n MyEngine = _engine.default.extend();\n\n MyEngine.instanceInitializer({\n name: 'third',\n initialize: function (engine) {\n order.push('third');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'second',\n after: 'first',\n before: ['third', 'fourth'],\n initialize: function (engine) {\n order.push('second');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'fourth',\n after: ['second', 'third'],\n initialize: function (engine) {\n order.push('fourth');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (engine) {\n order.push('fifth');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'first',\n before: ['second'],\n initialize: function (engine) {\n order.push('first');\n }\n });\n\n MyEngine.instanceInitializer({\n name: 'sixth',\n initialize: function (engine) {\n order.push('sixth');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = buildEngineInstance(myEngine);\n\n return myEngineInstance.boot().then(function () {\n deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n });\n });\n\n QUnit.test('initializers can have multiple dependencies', function () {\n var order = [];\n\n MyEngine = _engine.default.extend();\n\n var a = {\n name: 'a',\n before: 'b',\n initialize: function (engine) {\n order.push('a');\n }\n };\n var b = {\n name: 'b',\n initialize: function (engine) {\n order.push('b');\n }\n };\n var c = {\n name: 'c',\n after: 'b',\n initialize: function (engine) {\n order.push('c');\n }\n };\n var afterB = {\n name: 'after b',\n after: 'b',\n initialize: function (engine) {\n order.push('after b');\n }\n };\n var afterC = {\n name: 'after c',\n after: 'c',\n initialize: function (engine) {\n order.push('after c');\n }\n };\n\n MyEngine.instanceInitializer(b);\n MyEngine.instanceInitializer(a);\n MyEngine.instanceInitializer(afterC);\n MyEngine.instanceInitializer(afterB);\n MyEngine.instanceInitializer(c);\n\n myEngine = MyEngine.create();\n myEngineInstance = buildEngineInstance(myEngine);\n\n return myEngineInstance.boot().then(function () {\n ok(order.indexOf(a.name) < order.indexOf(b.name), 'a < b');\n ok(order.indexOf(b.name) < order.indexOf(c.name), 'b < c');\n ok(order.indexOf(b.name) < order.indexOf(afterB.name), 'b < afterB');\n ok(order.indexOf(c.name) < order.indexOf(afterC.name), 'c < afterC');\n });\n });\n\n QUnit.test('initializers set on Engine subclasses should not be shared between engines', function () {\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstEngine = _engine.default.extend();\n var firstEngine = void 0,\n firstEngineInstance = void 0;\n\n FirstEngine.instanceInitializer({\n name: 'first',\n initialize: function (engine) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondEngine = _engine.default.extend();\n var secondEngine = void 0,\n secondEngineInstance = void 0;\n\n SecondEngine.instanceInitializer({\n name: 'second',\n initialize: function (engine) {\n secondInitializerRunCount++;\n }\n });\n\n firstEngine = FirstEngine.create();\n firstEngineInstance = buildEngineInstance(firstEngine);\n\n return firstEngineInstance.boot().then(function () {\n equal(firstInitializerRunCount, 1, 'first initializer only was run');\n equal(secondInitializerRunCount, 0, 'first initializer only was run');\n\n secondEngine = SecondEngine.create();\n secondEngineInstance = buildEngineInstance(secondEngine);\n return secondEngineInstance.boot();\n }).then(function () {\n equal(firstInitializerRunCount, 1, 'second initializer only was run');\n equal(secondInitializerRunCount, 1, 'second initializer only was run');\n\n (0, _emberMetal.run)(function () {\n firstEngineInstance.destroy();\n secondEngineInstance.destroy();\n\n firstEngine.destroy();\n secondEngine.destroy();\n });\n });\n });\n\n QUnit.test('initializers are concatenated', function () {\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstEngine = _engine.default.extend();\n\n FirstEngine.instanceInitializer({\n name: 'first',\n initialize: function (engine) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondEngine = FirstEngine.extend();\n\n SecondEngine.instanceInitializer({\n name: 'second',\n initialize: function (engine) {\n secondInitializerRunCount++;\n }\n });\n\n var firstEngine = FirstEngine.create();\n var firstEngineInstance = buildEngineInstance(firstEngine);\n\n var secondEngine = void 0,\n secondEngineInstance = void 0;\n\n return firstEngineInstance.boot().then(function () {\n equal(firstInitializerRunCount, 1, 'first initializer only was run when base class created');\n equal(secondInitializerRunCount, 0, 'second initializer was not run when first base class created');\n firstInitializerRunCount = 0;\n\n secondEngine = SecondEngine.create();\n secondEngineInstance = buildEngineInstance(secondEngine);\n return secondEngineInstance.boot();\n }).then(function () {\n equal(firstInitializerRunCount, 1, 'first initializer was run when subclass created');\n equal(secondInitializerRunCount, 1, 'second initializers was run when subclass created');\n\n (0, _emberMetal.run)(function () {\n firstEngineInstance.destroy();\n secondEngineInstance.destroy();\n\n firstEngine.destroy();\n secondEngine.destroy();\n });\n });\n });\n\n QUnit.test('initializers are per-engine', function () {\n expect(2);\n\n var FirstEngine = _engine.default.extend();\n\n FirstEngine.instanceInitializer({\n name: 'abc',\n initialize: function (engine) {}\n });\n\n expectAssertion(function () {\n FirstEngine.instanceInitializer({\n name: 'abc',\n initialize: function (engine) {}\n });\n });\n\n var SecondEngine = _engine.default.extend();\n SecondEngine.instanceInitializer({\n name: 'abc',\n initialize: function (engine) {}\n });\n\n ok(true, 'Two engines can have initializers named the same.');\n });\n\n QUnit.test('initializers are executed in their own context', function () {\n expect(1);\n\n var MyEngine = _engine.default.extend();\n\n MyEngine.instanceInitializer({\n name: 'coolInitializer',\n myProperty: 'cool',\n initialize: function (engine) {\n equal(this.myProperty, 'cool', 'should have access to its own context');\n }\n });\n\n myEngine = MyEngine.create();\n myEngineInstance = buildEngineInstance(myEngine);\n\n return myEngineInstance.boot();\n });\n});","QUnit.module('ESLint | ember-application/tests/system/engine_instance_initializers_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/engine_instance_initializers_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/engine_instance_test', ['ember-application/system/engine', 'ember-application/system/engine-instance', 'ember-application/system/engine-parent', 'ember-metal', 'internal-test-helpers'], function (_engine, _engineInstance, _engineParent, _emberMetal, _internalTestHelpers) {\n 'use strict';\n\n var engine = void 0,\n engineInstance = void 0;\n\n QUnit.module('Ember.EngineInstance', {\n setup: function () {\n (0, _emberMetal.run)(function () {\n engine = _engine.default.create({ router: null });\n });\n },\n teardown: function () {\n if (engineInstance) {\n (0, _emberMetal.run)(engineInstance, 'destroy');\n }\n\n if (engine) {\n (0, _emberMetal.run)(engine, 'destroy');\n }\n }\n });\n\n QUnit.test('an engine instance can be created based upon a base engine', function () {\n (0, _emberMetal.run)(function () {\n engineInstance = _engineInstance.default.create({ base: engine });\n });\n\n ok(engineInstance, 'instance should be created');\n equal(engineInstance.base, engine, 'base should be set to engine');\n });\n\n QUnit.test('unregistering a factory clears all cached instances of that factory', function (assert) {\n assert.expect(3);\n\n engineInstance = (0, _emberMetal.run)(function () {\n return _engineInstance.default.create({ base: engine });\n });\n\n var PostComponent = (0, _internalTestHelpers.factory)();\n\n engineInstance.register('component:post', PostComponent);\n\n var postComponent1 = engineInstance.lookup('component:post');\n assert.ok(postComponent1, 'lookup creates instance');\n\n engineInstance.unregister('component:post');\n engineInstance.register('component:post', PostComponent);\n\n var postComponent2 = engineInstance.lookup('component:post');\n assert.ok(postComponent2, 'lookup creates instance');\n\n assert.notStrictEqual(postComponent1, postComponent2, 'lookup creates a brand new instance because previous one was reset');\n });\n\n QUnit.test('can be booted when its parent has been set', function (assert) {\n assert.expect(3);\n\n engineInstance = (0, _emberMetal.run)(function () {\n return _engineInstance.default.create({ base: engine });\n });\n\n expectAssertion(function () {\n engineInstance._bootSync();\n }, 'An engine instance\\'s parent must be set via `setEngineParent(engine, parent)` prior to calling `engine.boot()`.');\n\n (0, _engineParent.setEngineParent)(engineInstance, {});\n\n // Stub `cloneParentDependencies`, the internals of which are tested along\n // with application instances.\n engineInstance.cloneParentDependencies = function () {\n assert.ok(true, 'parent dependencies are cloned');\n };\n\n return engineInstance.boot().then(function () {\n assert.ok(true, 'boot successful');\n });\n });\n\n QUnit.test('can build a child instance of a registered engine', function (assert) {\n var ChatEngine = _engine.default.extend();\n var chatEngineInstance = void 0;\n\n engine.register('engine:chat', ChatEngine);\n\n (0, _emberMetal.run)(function () {\n engineInstance = _engineInstance.default.create({ base: engine });\n\n // Try to build an unregistered engine.\n throws(function () {\n engineInstance.buildChildEngineInstance('fake');\n }, 'You attempted to mount the engine \\'fake\\', but it is not registered with its parent.');\n\n // Build the `chat` engine, registered above.\n chatEngineInstance = engineInstance.buildChildEngineInstance('chat');\n });\n\n assert.ok(chatEngineInstance, 'child engine instance successfully created');\n\n assert.strictEqual((0, _engineParent.getEngineParent)(chatEngineInstance), engineInstance, 'child engine instance is assigned the correct parent');\n });\n});","QUnit.module('ESLint | ember-application/tests/system/engine_instance_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/engine_instance_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/engine_parent_test', ['ember-application/system/engine-parent'], function (_engineParent) {\n 'use strict';\n\n QUnit.module('EngineParent', {});\n\n QUnit.test('An engine\\'s parent can be set with `setEngineParent` and retrieved with `getEngineParent`', function () {\n var engine = {};\n var parent = {};\n\n strictEqual((0, _engineParent.getEngineParent)(engine), undefined, 'parent has not been set');\n\n (0, _engineParent.setEngineParent)(engine, parent);\n\n strictEqual((0, _engineParent.getEngineParent)(engine), parent, 'parent has been set');\n\n strictEqual(engine[_engineParent.ENGINE_PARENT], parent, 'parent has been set to the ENGINE_PARENT symbol');\n });\n});","QUnit.module('ESLint | ember-application/tests/system/engine_parent_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/engine_parent_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/engine_test', ['ember-babel', 'ember-environment', 'ember-metal', 'ember-application/system/engine', 'ember-runtime', 'container', 'ember-application/tests/test-helpers/registry-check'], function (_emberBabel, _emberEnvironment, _emberMetal, _engine, _emberRuntime, _container, _registryCheck) {\n 'use strict';\n\n var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['-bucket-cache:main'], ['-bucket-cache:main']),\n _templateObject2 = (0, _emberBabel.taggedTemplateLiteralLoose)(['template:components/-default'], ['template:components/-default']);\n\n var engine = void 0;\n var originalLookup = _emberEnvironment.context.lookup;\n var lookup = void 0;\n\n QUnit.module('Ember.Engine', {\n setup: function () {\n lookup = _emberEnvironment.context.lookup = {};\n engine = (0, _emberMetal.run)(function () {\n return _engine.default.create();\n });\n },\n teardown: function () {\n _emberEnvironment.context.lookup = originalLookup;\n if (engine) {\n (0, _emberMetal.run)(engine, 'destroy');\n }\n }\n });\n\n QUnit.test('acts like a namespace', function () {\n engine = (0, _emberMetal.run)(function () {\n return lookup.TestEngine = _engine.default.create();\n });\n\n engine.Foo = _emberRuntime.Object.extend();\n equal(engine.Foo.toString(), 'TestEngine.Foo', 'Classes pick up their parent namespace');\n });\n\n QUnit.test('builds a registry', function () {\n strictEqual(engine.resolveRegistration('application:main'), engine, 'application:main is registered');\n deepEqual(engine.registeredOptionsForType('component'), { singleton: false }, 'optionsForType \\'component\\'');\n deepEqual(engine.registeredOptionsForType('view'), { singleton: false }, 'optionsForType \\'view\\'');\n (0, _registryCheck.verifyRegistration)(engine, 'controller:basic');\n (0, _registryCheck.verifyInjection)(engine, 'view', '_viewRegistry', '-view-registry:main');\n (0, _registryCheck.verifyInjection)(engine, 'route', '_topLevelViewTemplate', 'template:-outlet');\n (0, _registryCheck.verifyInjection)(engine, 'view:-outlet', 'namespace', 'application:main');\n\n (0, _registryCheck.verifyInjection)(engine, 'controller', 'target', 'router:main');\n (0, _registryCheck.verifyInjection)(engine, 'controller', 'namespace', 'application:main');\n\n (0, _registryCheck.verifyInjection)(engine, 'router', '_bucketCache', (0, _container.privatize)(_templateObject));\n (0, _registryCheck.verifyInjection)(engine, 'route', '_bucketCache', (0, _container.privatize)(_templateObject));\n\n (0, _registryCheck.verifyInjection)(engine, 'route', 'router', 'router:main');\n\n (0, _registryCheck.verifyRegistration)(engine, 'component:-text-field');\n (0, _registryCheck.verifyRegistration)(engine, 'component:-text-area');\n (0, _registryCheck.verifyRegistration)(engine, 'component:-checkbox');\n (0, _registryCheck.verifyRegistration)(engine, 'component:link-to');\n\n (0, _registryCheck.verifyRegistration)(engine, 'service:-routing');\n (0, _registryCheck.verifyInjection)(engine, 'service:-routing', 'router', 'router:main');\n\n // DEBUGGING\n (0, _registryCheck.verifyRegistration)(engine, 'resolver-for-debugging:main');\n (0, _registryCheck.verifyInjection)(engine, 'container-debug-adapter:main', 'resolver', 'resolver-for-debugging:main');\n (0, _registryCheck.verifyInjection)(engine, 'data-adapter:main', 'containerDebugAdapter', 'container-debug-adapter:main');\n (0, _registryCheck.verifyRegistration)(engine, 'container-debug-adapter:main');\n (0, _registryCheck.verifyRegistration)(engine, 'component-lookup:main');\n\n (0, _registryCheck.verifyInjection)(engine, 'service:-dom-changes', 'document', 'service:-document');\n (0, _registryCheck.verifyInjection)(engine, 'service:-dom-tree-construction', 'document', 'service:-document');\n (0, _registryCheck.verifyRegistration)(engine, 'view:-outlet');\n (0, _registryCheck.verifyRegistration)(engine, (0, _container.privatize)(_templateObject2));\n (0, _registryCheck.verifyRegistration)(engine, 'template:-outlet');\n (0, _registryCheck.verifyInjection)(engine, 'view:-outlet', 'template', 'template:-outlet');\n (0, _registryCheck.verifyInjection)(engine, 'template', 'env', 'service:-glimmer-environment');\n deepEqual(engine.registeredOptionsForType('helper'), { instantiate: false }, 'optionsForType \\'helper\\'');\n });\n});","QUnit.module('ESLint | ember-application/tests/system/engine_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/engine_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/initializers_test', ['ember-babel', 'ember-utils', 'internal-test-helpers', 'ember-application', 'ember-views'], function (_emberBabel, _emberUtils, _internalTestHelpers, _emberApplication, _emberViews) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application initializers', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class, _AutobootApplicationT);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n (0, _emberViews.jQuery)('#qunit-fixture').html('\\n
ONE
\\n
TWO
\\n ');\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.call(this));\n }\n\n _class.prototype.createSecondApplication = function createSecondApplication(options) {\n var MyApplication = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emberApplication.Application;\n\n var myOptions = (0, _emberUtils.assign)(this.applicationOptions, {\n rootElement: '#two'\n }, options);\n var secondApp = this.secondApp = MyApplication.create(myOptions);\n return secondApp;\n };\n\n _class.prototype.teardown = function teardown() {\n var _this2 = this;\n\n _AutobootApplicationT.prototype.teardown.call(this);\n\n if (this.secondApp) {\n this.runTask(function () {\n return _this2.secondApp.destroy();\n });\n }\n };\n\n _class.prototype['@test initializers require proper \\'name\\' and \\'initialize\\' properties'] = function () {\n var MyApplication = _emberApplication.Application.extend();\n\n expectAssertion(function () {\n MyApplication.initializer({ name: 'initializer' });\n });\n\n expectAssertion(function () {\n MyApplication.initializer({\n initialize: function () {}\n });\n });\n };\n\n _class.prototype['@test initializers that throw errors cause the boot promise to reject with the error'] = function (assert) {\n var _this3 = this;\n\n assert.expect(2);\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'initializer',\n initialize: function () {\n throw new Error('boot failure');\n }\n });\n\n this.runTask(function () {\n _this3.createApplication({\n autoboot: false\n }, MyApplication);\n });\n\n var app = this.application;\n\n try {\n this.runTask(function () {\n app.boot().then(function (app) {\n assert.ok(false, 'The boot promise should not resolve when there is a boot error');\n }, function (error) {\n assert.ok(error instanceof Error, 'The boot promise should reject with an error');\n assert.equal(error.message, 'boot failure');\n });\n });\n } catch (error) {\n assert.ok(false, 'The boot method should not throw');\n throw error;\n }\n };\n\n _class.prototype['@test initializers are passed an App'] = function (assert) {\n var _this4 = this;\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'initializer',\n initialize: function (App) {\n assert.ok(App instanceof _emberApplication.Application, 'initialize is passed an Application');\n }\n });\n\n this.runTask(function () {\n return _this4.createApplication({}, MyApplication);\n });\n };\n\n _class.prototype['@test initializers can be registered in a specified order'] = function (assert) {\n var _this5 = this;\n\n var order = [];\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'fourth',\n after: 'third',\n initialize: function (registry) {\n order.push('fourth');\n }\n });\n\n MyApplication.initializer({\n name: 'second',\n after: 'first',\n before: 'third',\n initialize: function (registry) {\n order.push('second');\n }\n });\n\n MyApplication.initializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (registry) {\n order.push('fifth');\n }\n });\n\n MyApplication.initializer({\n name: 'first',\n before: 'second',\n initialize: function (registry) {\n order.push('first');\n }\n });\n\n MyApplication.initializer({\n name: 'third',\n initialize: function (registry) {\n order.push('third');\n }\n });\n\n MyApplication.initializer({\n name: 'sixth',\n initialize: function (registry) {\n order.push('sixth');\n }\n });\n\n this.runTask(function () {\n return _this5.createApplication({}, MyApplication);\n });\n\n assert.deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n };\n\n _class.prototype['@test initializers can be registered in a specified order as an array'] = function (assert) {\n var _this6 = this;\n\n var order = [];\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'third',\n initialize: function (registry) {\n order.push('third');\n }\n });\n\n MyApplication.initializer({\n name: 'second',\n after: 'first',\n before: ['third', 'fourth'],\n initialize: function (registry) {\n order.push('second');\n }\n });\n\n MyApplication.initializer({\n name: 'fourth',\n after: ['second', 'third'],\n initialize: function (registry) {\n order.push('fourth');\n }\n });\n\n MyApplication.initializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (registry) {\n order.push('fifth');\n }\n });\n\n MyApplication.initializer({\n name: 'first',\n before: ['second'],\n initialize: function (registry) {\n order.push('first');\n }\n });\n\n MyApplication.initializer({\n name: 'sixth',\n initialize: function (registry) {\n order.push('sixth');\n }\n });\n\n this.runTask(function () {\n return _this6.createApplication({}, MyApplication);\n });\n\n assert.deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n };\n\n _class.prototype['@test initializers can have multiple dependencies'] = function (assert) {\n var _this7 = this;\n\n var order = [];\n var MyApplication = _emberApplication.Application.extend();\n var a = {\n name: 'a',\n before: 'b',\n initialize: function (registry) {\n order.push('a');\n }\n };\n var b = {\n name: 'b',\n initialize: function (registry) {\n order.push('b');\n }\n };\n var c = {\n name: 'c',\n after: 'b',\n initialize: function (registry) {\n order.push('c');\n }\n };\n var afterB = {\n name: 'after b',\n after: 'b',\n initialize: function (registry) {\n order.push('after b');\n }\n };\n var afterC = {\n name: 'after c',\n after: 'c',\n initialize: function (registry) {\n order.push('after c');\n }\n };\n\n MyApplication.initializer(b);\n MyApplication.initializer(a);\n MyApplication.initializer(afterC);\n MyApplication.initializer(afterB);\n MyApplication.initializer(c);\n\n this.runTask(function () {\n return _this7.createApplication({}, MyApplication);\n });\n\n assert.ok(order.indexOf(a.name) < order.indexOf(b.name), 'a < b');\n assert.ok(order.indexOf(b.name) < order.indexOf(c.name), 'b < c');\n assert.ok(order.indexOf(b.name) < order.indexOf(afterB.name), 'b < afterB');\n assert.ok(order.indexOf(c.name) < order.indexOf(afterC.name), 'c < afterC');\n };\n\n _class.prototype['@test initializers set on Application subclasses are not shared between apps'] = function (assert) {\n var _this8 = this;\n\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstApp = _emberApplication.Application.extend();\n\n FirstApp.initializer({\n name: 'first',\n initialize: function (registry) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondApp = _emberApplication.Application.extend();\n\n SecondApp.initializer({\n name: 'second',\n initialize: function (registry) {\n secondInitializerRunCount++;\n }\n });\n\n this.runTask(function () {\n return _this8.createApplication({}, FirstApp);\n });\n\n assert.equal(firstInitializerRunCount, 1, 'first initializer only was run');\n assert.equal(secondInitializerRunCount, 0, 'first initializer only was run');\n\n this.runTask(function () {\n return _this8.createSecondApplication({}, SecondApp);\n });\n\n assert.equal(firstInitializerRunCount, 1, 'second initializer only was run');\n assert.equal(secondInitializerRunCount, 1, 'second initializer only was run');\n };\n\n _class.prototype['@test initializers are concatenated'] = function (assert) {\n var _this9 = this;\n\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstApp = _emberApplication.Application.extend();\n\n FirstApp.initializer({\n name: 'first',\n initialize: function (registry) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondApp = FirstApp.extend();\n SecondApp.initializer({\n name: 'second',\n initialize: function (registry) {\n secondInitializerRunCount++;\n }\n });\n\n this.runTask(function () {\n return _this9.createApplication({}, FirstApp);\n });\n\n assert.equal(firstInitializerRunCount, 1, 'first initializer only was run when base class created');\n assert.equal(secondInitializerRunCount, 0, 'first initializer only was run when base class created');\n\n firstInitializerRunCount = 0;\n this.runTask(function () {\n return _this9.createSecondApplication({}, SecondApp);\n });\n\n assert.equal(firstInitializerRunCount, 1, 'first initializer was run when subclass created');\n assert.equal(secondInitializerRunCount, 1, 'second initializers was run when subclass created');\n };\n\n _class.prototype['@test initializers are per-app'] = function (assert) {\n assert.expect(2);\n\n var FirstApp = _emberApplication.Application.extend();\n\n FirstApp.initializer({\n name: 'abc',\n initialize: function (app) {}\n });\n\n expectAssertion(function () {\n FirstApp.initializer({\n name: 'abc',\n initialize: function (app) {}\n });\n });\n\n var SecondApp = _emberApplication.Application.extend();\n SecondApp.instanceInitializer({\n name: 'abc',\n initialize: function (app) {}\n });\n\n assert.ok(true, 'Two apps can have initializers named the same.');\n };\n\n _class.prototype['@test initializers are executed in their own context'] = function (assert) {\n var _this10 = this;\n\n assert.expect(1);\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'coolInitializer',\n myProperty: 'cool',\n initialize: function (application) {\n assert.equal(this.myProperty, 'cool', 'should have access to its own context');\n }\n });\n\n this.runTask(function () {\n return _this10.createApplication({}, MyApplication);\n });\n };\n\n _class.prototype['@test initializers throw a deprecation warning when receiving a second argument'] = function (assert) {\n var _this11 = this;\n\n assert.expect(1);\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'deprecated',\n initialize: function (registry, application) {}\n });\n\n expectDeprecation(function () {\n _this11.runTask(function () {\n return _this11.createApplication({}, MyApplication);\n });\n }, /The `initialize` method for Application initializer 'deprecated' should take only one argument - `App`, an instance of an `Application`./);\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_AutobootApplicationT.prototype.applicationOptions, {\n rootElement: '#one'\n });\n }\n }]);\n return _class;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/initializers_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/initializers_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/instance_initializers_test', ['ember-babel', 'ember-utils', 'internal-test-helpers', 'ember-application', 'ember-views'], function (_emberBabel, _emberUtils, _internalTestHelpers, _emberApplication, _emberViews) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application instance initializers', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class, _AutobootApplicationT);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n (0, _emberViews.jQuery)('#qunit-fixture').html('\\n
ONE
\\n
TWO
\\n ');\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.call(this));\n }\n\n _class.prototype.createSecondApplication = function createSecondApplication(options) {\n var MyApplication = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _emberApplication.Application;\n\n var myOptions = (0, _emberUtils.assign)(this.applicationOptions, {\n rootElement: '#two'\n }, options);\n var secondApp = this.secondApp = MyApplication.create(myOptions);\n return secondApp;\n };\n\n _class.prototype.teardown = function teardown() {\n var _this2 = this;\n\n _AutobootApplicationT.prototype.teardown.call(this);\n\n if (this.secondApp) {\n this.runTask(function () {\n return _this2.secondApp.destroy();\n });\n }\n };\n\n _class.prototype['@test initializers require proper \\'name\\' and \\'initialize\\' properties'] = function () {\n var _this3 = this;\n\n var MyApplication = _emberApplication.Application.extend();\n\n expectAssertion(function () {\n MyApplication.instanceInitializer({ name: 'initializer' });\n });\n\n expectAssertion(function () {\n MyApplication.instanceInitializer({\n initialize: function () {}\n });\n });\n\n this.runTask(function () {\n return _this3.createApplication({}, MyApplication);\n });\n };\n\n _class.prototype['@test initializers are passed an app instance'] = function (assert) {\n var _this4 = this;\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.instanceInitializer({\n name: 'initializer',\n initialize: function (instance) {\n assert.ok(instance instanceof _emberApplication.ApplicationInstance, 'initialize is passed an application instance');\n }\n });\n\n this.runTask(function () {\n return _this4.createApplication({}, MyApplication);\n });\n };\n\n _class.prototype['@test initializers can be registered in a specified order'] = function (assert) {\n var _this5 = this;\n\n var order = [];\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.instanceInitializer({\n name: 'fourth',\n after: 'third',\n initialize: function (registry) {\n order.push('fourth');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'second',\n after: 'first',\n before: 'third',\n initialize: function (registry) {\n order.push('second');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (registry) {\n order.push('fifth');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'first',\n before: 'second',\n initialize: function (registry) {\n order.push('first');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'third',\n initialize: function (registry) {\n order.push('third');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'sixth',\n initialize: function (registry) {\n order.push('sixth');\n }\n });\n\n this.runTask(function () {\n return _this5.createApplication({}, MyApplication);\n });\n\n assert.deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n };\n\n _class.prototype['@test initializers can be registered in a specified order as an array'] = function (assert) {\n var _this6 = this;\n\n var order = [];\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.instanceInitializer({\n name: 'third',\n initialize: function (registry) {\n order.push('third');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'second',\n after: 'first',\n before: ['third', 'fourth'],\n initialize: function (registry) {\n order.push('second');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'fourth',\n after: ['second', 'third'],\n initialize: function (registry) {\n order.push('fourth');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'fifth',\n after: 'fourth',\n before: 'sixth',\n initialize: function (registry) {\n order.push('fifth');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'first',\n before: ['second'],\n initialize: function (registry) {\n order.push('first');\n }\n });\n\n MyApplication.instanceInitializer({\n name: 'sixth',\n initialize: function (registry) {\n order.push('sixth');\n }\n });\n\n this.runTask(function () {\n return _this6.createApplication({}, MyApplication);\n });\n\n assert.deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);\n };\n\n _class.prototype['@test initializers can have multiple dependencies'] = function (assert) {\n var _this7 = this;\n\n var order = [];\n var MyApplication = _emberApplication.Application.extend();\n var a = {\n name: 'a',\n before: 'b',\n initialize: function (registry) {\n order.push('a');\n }\n };\n var b = {\n name: 'b',\n initialize: function (registry) {\n order.push('b');\n }\n };\n var c = {\n name: 'c',\n after: 'b',\n initialize: function (registry) {\n order.push('c');\n }\n };\n var afterB = {\n name: 'after b',\n after: 'b',\n initialize: function (registry) {\n order.push('after b');\n }\n };\n var afterC = {\n name: 'after c',\n after: 'c',\n initialize: function (registry) {\n order.push('after c');\n }\n };\n\n MyApplication.instanceInitializer(b);\n MyApplication.instanceInitializer(a);\n MyApplication.instanceInitializer(afterC);\n MyApplication.instanceInitializer(afterB);\n MyApplication.instanceInitializer(c);\n\n this.runTask(function () {\n return _this7.createApplication({}, MyApplication);\n });\n\n assert.ok(order.indexOf(a.name) < order.indexOf(b.name), 'a < b');\n assert.ok(order.indexOf(b.name) < order.indexOf(c.name), 'b < c');\n assert.ok(order.indexOf(b.name) < order.indexOf(afterB.name), 'b < afterB');\n assert.ok(order.indexOf(c.name) < order.indexOf(afterC.name), 'c < afterC');\n };\n\n _class.prototype['@test initializers set on Application subclasses should not be shared between apps'] = function (assert) {\n var _this8 = this;\n\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstApp = _emberApplication.Application.extend();\n\n FirstApp.instanceInitializer({\n name: 'first',\n initialize: function (registry) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondApp = _emberApplication.Application.extend();\n SecondApp.instanceInitializer({\n name: 'second',\n initialize: function (registry) {\n secondInitializerRunCount++;\n }\n });\n\n this.runTask(function () {\n return _this8.createApplication({}, FirstApp);\n });\n\n assert.equal(firstInitializerRunCount, 1, 'first initializer only was run');\n assert.equal(secondInitializerRunCount, 0, 'first initializer only was run');\n\n this.runTask(function () {\n return _this8.createSecondApplication({}, SecondApp);\n });\n\n assert.equal(firstInitializerRunCount, 1, 'second initializer only was run');\n assert.equal(secondInitializerRunCount, 1, 'second initializer only was run');\n };\n\n _class.prototype['@test initializers are concatenated'] = function (assert) {\n var _this9 = this;\n\n var firstInitializerRunCount = 0;\n var secondInitializerRunCount = 0;\n var FirstApp = _emberApplication.Application.extend();\n\n FirstApp.instanceInitializer({\n name: 'first',\n initialize: function (registry) {\n firstInitializerRunCount++;\n }\n });\n\n var SecondApp = FirstApp.extend();\n SecondApp.instanceInitializer({\n name: 'second',\n initialize: function (registry) {\n secondInitializerRunCount++;\n }\n });\n\n this.runTask(function () {\n return _this9.createApplication({}, FirstApp);\n });\n\n equal(firstInitializerRunCount, 1, 'first initializer only was run when base class created');\n equal(secondInitializerRunCount, 0, 'first initializer only was run when base class created');\n\n firstInitializerRunCount = 0;\n this.runTask(function () {\n return _this9.createSecondApplication({}, SecondApp);\n });\n\n equal(firstInitializerRunCount, 1, 'first initializer was run when subclass created');\n equal(secondInitializerRunCount, 1, 'second initializers was run when subclass created');\n };\n\n _class.prototype['@test initializers are per-app'] = function (assert) {\n var _this10 = this;\n\n assert.expect(2);\n\n var FirstApp = _emberApplication.Application.extend();\n FirstApp.instanceInitializer({\n name: 'abc',\n initialize: function (app) {}\n });\n\n expectAssertion(function () {\n FirstApp.instanceInitializer({\n name: 'abc',\n initialize: function (app) {}\n });\n });\n\n this.runTask(function () {\n return _this10.createApplication({}, FirstApp);\n });\n\n var SecondApp = _emberApplication.Application.extend();\n SecondApp.instanceInitializer({\n name: 'abc',\n initialize: function (app) {}\n });\n\n this.runTask(function () {\n return _this10.createSecondApplication({}, SecondApp);\n });\n\n assert.ok(true, 'Two apps can have initializers named the same.');\n };\n\n _class.prototype['@test initializers are run before ready hook'] = function (assert) {\n var _this11 = this;\n\n assert.expect(2);\n\n var MyApplication = _emberApplication.Application.extend({\n ready: function () {\n assert.ok(true, 'ready is called');\n readyWasCalled = false;\n }\n });\n var readyWasCalled = false;\n\n MyApplication.instanceInitializer({\n name: 'initializer',\n initialize: function () {\n assert.ok(!readyWasCalled, 'ready is not yet called');\n }\n });\n\n this.runTask(function () {\n return _this11.createApplication({}, MyApplication);\n });\n };\n\n _class.prototype['@test initializers are executed in their own context'] = function (assert) {\n var _this12 = this;\n\n assert.expect(1);\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.instanceInitializer({\n name: 'coolInitializer',\n myProperty: 'cool',\n initialize: function (registry, application) {\n assert.equal(this.myProperty, 'cool', 'should have access to its own context');\n }\n });\n\n this.runTask(function () {\n return _this12.createApplication({}, MyApplication);\n });\n };\n\n _class.prototype['@test initializers get an instance on app reset'] = function (assert) {\n var _this13 = this;\n\n assert.expect(2);\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.instanceInitializer({\n name: 'giveMeAnInstance',\n initialize: function (instance) {\n assert.ok(!!instance, 'Initializer got an instance');\n }\n });\n\n this.runTask(function () {\n return _this13.createApplication({}, MyApplication);\n });\n\n this.runTask(function () {\n return _this13.application.reset();\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_AutobootApplicationT.prototype.applicationOptions, {\n rootElement: '#one'\n });\n }\n }]);\n return _class;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/instance_initializers_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/instance_initializers_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/logging_test', ['ember-babel', 'internal-test-helpers', 'ember-console', 'ember-runtime', 'ember-routing', 'ember-utils'], function (_emberBabel, _internalTestHelpers, _emberConsole, _emberRuntime, _emberRouting, _emberUtils) {\n 'use strict';\n\n var LoggingApplicationTestCase = function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(LoggingApplicationTestCase, _ApplicationTestCase);\n\n function LoggingApplicationTestCase() {\n (0, _emberBabel.classCallCheck)(this, LoggingApplicationTestCase);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n\n _this.logs = {};\n\n _this._originalLogger = _emberConsole.default.info;\n\n _emberConsole.default.info = function (_, _ref) {\n var fullName = _ref.fullName;\n\n if (!_this.logs.hasOwnProperty(fullName)) {\n _this.logs[fullName] = 0;\n }\n _this.logs[fullName]++;\n };\n\n _this.router.map(function () {\n this.route('posts', { resetNamespace: true });\n });\n return _this;\n }\n\n LoggingApplicationTestCase.prototype.teardown = function teardown() {\n _emberConsole.default.info = this._originalLogger;\n _ApplicationTestCase.prototype.teardown.call(this);\n };\n\n return LoggingApplicationTestCase;\n }(_internalTestHelpers.ApplicationTestCase);\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application with LOG_ACTIVE_GENERATION=true', function (_LoggingApplicationTe) {\n (0, _emberBabel.inherits)(_class, _LoggingApplicationTe);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _LoggingApplicationTe.apply(this, arguments));\n }\n\n _class.prototype['@test log class generation if logging enabled'] = function testLogClassGenerationIfLoggingEnabled(assert) {\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n this.visit('/posts');\n assert.equal(Object.keys(this.logs).length, 4, 'expected logs');\n };\n\n _class.prototype['@test actively generated classes get logged'] = function testActivelyGeneratedClassesGetLogged(assert) {\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n this.visit('/posts');\n assert.equal(this.logs['controller:application'], 1, 'expected: ApplicationController was generated');\n assert.equal(this.logs['controller:posts'], 1, 'expected: PostsController was generated');\n\n assert.equal(this.logs['route:application'], 1, 'expected: ApplicationRoute was generated');\n assert.equal(this.logs['route:posts'], 1, 'expected: PostsRoute was generated');\n };\n\n _class.prototype['@test predefined classes do not get logged'] = function testPredefinedClassesDoNotGetLogged(assert) {\n this.add('controller:application', _emberRuntime.Controller.extend());\n this.add('controller:posts', _emberRuntime.Controller.extend());\n this.add('route:application', _emberRouting.Route.extend());\n this.add('route:posts', _emberRouting.Route.extend());\n\n this.visit('/posts');\n\n assert.ok(!this.logs['controller:application'], 'did not expect: ApplicationController was generated');\n assert.ok(!this.logs['controller:posts'], 'did not expect: PostsController was generated');\n\n assert.ok(!this.logs['route:application'], 'did not expect: ApplicationRoute was generated');\n assert.ok(!this.logs['route:posts'], 'did not expect: PostsRoute was generated');\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_LoggingApplicationTe.prototype.applicationOptions, {\n LOG_ACTIVE_GENERATION: true\n });\n }\n }]);\n return _class;\n }(LoggingApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application when LOG_ACTIVE_GENERATION=false', function (_LoggingApplicationTe2) {\n (0, _emberBabel.inherits)(_class2, _LoggingApplicationTe2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _LoggingApplicationTe2.apply(this, arguments));\n }\n\n _class2.prototype['@test do NOT log class generation if logging disabled'] = function (assert) {\n this.visit('/posts');\n assert.equal(Object.keys(this.logs).length, 0, 'expected logs');\n };\n\n (0, _emberBabel.createClass)(_class2, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_LoggingApplicationTe2.prototype.applicationOptions, {\n LOG_ACTIVE_GENERATION: false\n });\n }\n }]);\n return _class2;\n }(LoggingApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application with LOG_VIEW_LOOKUPS=true', function (_LoggingApplicationTe3) {\n (0, _emberBabel.inherits)(_class3, _LoggingApplicationTe3);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n return (0, _emberBabel.possibleConstructorReturn)(this, _LoggingApplicationTe3.apply(this, arguments));\n }\n\n _class3.prototype['@test log when template and view are missing when flag is active'] = function (assert) {\n if (EmberDev && EmberDev.runningProdBuild) {\n assert.ok(true, 'Logging does not occur in production builds');\n return;\n }\n\n this.addTemplate('application', '{{outlet}}');\n\n this.visit('/');\n this.visit('/posts');\n\n assert.equal(this.logs['template:application'], undefined, 'expected: Should not log template:application since it exists.');\n assert.equal(this.logs['template:index'], 1, 'expected: Could not find \"index\" template or view.');\n assert.equal(this.logs['template:posts'], 1, 'expected: Could not find \"posts\" template or view.');\n };\n\n (0, _emberBabel.createClass)(_class3, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_LoggingApplicationTe3.prototype.applicationOptions, {\n LOG_VIEW_LOOKUPS: true\n });\n }\n }]);\n return _class3;\n }(LoggingApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application with LOG_VIEW_LOOKUPS=false', function (_LoggingApplicationTe4) {\n (0, _emberBabel.inherits)(_class4, _LoggingApplicationTe4);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n return (0, _emberBabel.possibleConstructorReturn)(this, _LoggingApplicationTe4.apply(this, arguments));\n }\n\n _class4.prototype['@test do not log when template and view are missing when flag is not true'] = function (assert) {\n this.visit('/posts');\n assert.equal(Object.keys(this.logs).length, 0, 'expected no logs');\n };\n\n _class4.prototype['@test do not log which views are used with templates when flag is not true'] = function (assert) {\n this.visit('/posts');\n assert.equal(Object.keys(this.logs).length, 0, 'expected no logs');\n };\n\n (0, _emberBabel.createClass)(_class4, [{\n key: 'applicationOptions',\n get: function () {\n return (0, _emberUtils.assign)(_LoggingApplicationTe4.prototype.applicationOptions, {\n LOG_VIEW_LOOKUPS: false\n });\n }\n }]);\n return _class4;\n }(LoggingApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/logging_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/logging_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/readiness_test', ['ember-metal', 'ember-application/system/application'], function (_emberMetal, _application) {\n 'use strict';\n\n var jQuery = void 0,\n application = void 0,\n Application = void 0;\n var readyWasCalled = void 0,\n domReady = void 0,\n readyCallbacks = void 0;\n\n // We are using a small mock of jQuery because jQuery is third-party code with\n // very well-defined semantics, and we want to confirm that a jQuery stub run\n // in a more minimal server environment that implements this behavior will be\n // sufficient for Ember's requirements.\n\n QUnit.module('Application readiness', {\n setup: function () {\n readyWasCalled = 0;\n readyCallbacks = [];\n\n var jQueryInstance = {\n ready: function (callback) {\n readyCallbacks.push(callback);\n if (jQuery.isReady) {\n domReady();\n }\n }\n };\n\n jQuery = function () {\n return jQueryInstance;\n };\n jQuery.isReady = false;\n\n var domReadyCalled = 0;\n domReady = function () {\n if (domReadyCalled !== 0) {\n return;\n }\n domReadyCalled++;\n for (var i = 0; i < readyCallbacks.length; i++) {\n readyCallbacks[i]();\n }\n };\n\n Application = _application.default.extend({\n $: jQuery,\n\n ready: function () {\n readyWasCalled++;\n }\n });\n },\n teardown: function () {\n if (application) {\n (0, _emberMetal.run)(function () {\n return application.destroy();\n });\n }\n }\n });\n\n // These tests are confirming that if the callbacks passed into jQuery's ready hook is called\n // synchronously during the application's initialization, we get the same behavior as if\n // it was triggered after initialization.\n\n QUnit.test('Ember.Application\\'s ready event is called right away if jQuery is already ready', function () {\n jQuery.isReady = true;\n\n (0, _emberMetal.run)(function () {\n application = Application.create({ router: false });\n\n equal(readyWasCalled, 0, 'ready is not called until later');\n });\n\n equal(readyWasCalled, 1, 'ready was called');\n\n domReady();\n\n equal(readyWasCalled, 1, 'application\\'s ready was not called again');\n });\n\n QUnit.test('Ember.Application\\'s ready event is called after the document becomes ready', function () {\n (0, _emberMetal.run)(function () {\n application = Application.create({ router: false });\n });\n\n equal(readyWasCalled, 0, 'ready wasn\\'t called yet');\n\n domReady();\n\n equal(readyWasCalled, 1, 'ready was called now that DOM is ready');\n });\n\n QUnit.test('Ember.Application\\'s ready event can be deferred by other components', function () {\n (0, _emberMetal.run)(function () {\n application = Application.create({ router: false });\n application.deferReadiness();\n });\n\n equal(readyWasCalled, 0, 'ready wasn\\'t called yet');\n\n domReady();\n\n equal(readyWasCalled, 0, 'ready wasn\\'t called yet');\n\n (0, _emberMetal.run)(function () {\n application.advanceReadiness();\n equal(readyWasCalled, 0);\n });\n\n equal(readyWasCalled, 1, 'ready was called now all readiness deferrals are advanced');\n });\n\n QUnit.test('Ember.Application\\'s ready event can be deferred by other components', function () {\n jQuery.isReady = false;\n\n (0, _emberMetal.run)(function () {\n application = Application.create({ router: false });\n application.deferReadiness();\n equal(readyWasCalled, 0, 'ready wasn\\'t called yet');\n });\n\n domReady();\n\n equal(readyWasCalled, 0, 'ready wasn\\'t called yet');\n\n (0, _emberMetal.run)(function () {\n application.advanceReadiness();\n });\n\n equal(readyWasCalled, 1, 'ready was called now all readiness deferrals are advanced');\n\n expectAssertion(function () {\n application.deferReadiness();\n });\n });\n});","QUnit.module('ESLint | ember-application/tests/system/readiness_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/readiness_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/reset_test', ['ember-babel', 'ember-metal', 'ember-runtime', 'ember-routing', 'internal-test-helpers'], function (_emberBabel, _emberMetal, _emberRuntime, _emberRouting, _internalTestHelpers) {\n 'use strict';\n\n var application = void 0,\n Application = void 0;\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application - resetting', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class, _AutobootApplicationT);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.apply(this, arguments));\n }\n\n _class.prototype['@test Brings its own run-loop if not provided'] = function testBringsItsOwnRunLoopIfNotProvided(assert) {\n var _this2 = this;\n\n assert.expect(0);\n (0, _emberMetal.run)(function () {\n return _this2.createApplication();\n });\n this.application.reset();\n };\n\n _class.prototype['@test Does not bring its own run loop if one is already provided'] = function testDoesNotBringItsOwnRunLoopIfOneIsAlreadyProvided(assert) {\n var _this3 = this;\n\n assert.expect(3);\n\n var didBecomeReady = false;\n\n (0, _emberMetal.run)(function () {\n return _this3.createApplication();\n });\n\n (0, _emberMetal.run)(function () {\n _this3.application.ready = function () {\n didBecomeReady = true;\n };\n\n _this3.application.reset();\n\n _this3.application.deferReadiness();\n assert.ok(!didBecomeReady, 'app is not ready');\n });\n\n assert.ok(!didBecomeReady, 'app is not ready');\n (0, _emberMetal.run)(this.application, 'advanceReadiness');\n assert.ok(didBecomeReady, 'app is ready');\n };\n\n _class.prototype['@test When an application is reset, new instances of controllers are generated'] = function testWhenAnApplicationIsResetNewInstancesOfControllersAreGenerated(assert) {\n var _this4 = this;\n\n (0, _emberMetal.run)(function () {\n _this4.createApplication();\n _this4.add('controller:academic', _emberRuntime.Controller.extend());\n });\n\n var firstController = this.applicationInstance.lookup('controller:academic');\n var secondController = this.applicationInstance.lookup('controller:academic');\n\n this.application.reset();\n\n var thirdController = this.applicationInstance.lookup('controller:academic');\n\n assert.strictEqual(firstController, secondController, 'controllers looked up in succession should be the same instance');\n\n ok(firstController.isDestroying, 'controllers are destroyed when their application is reset');\n\n assert.notStrictEqual(firstController, thirdController, 'controllers looked up after the application is reset should not be the same instance');\n };\n\n _class.prototype['@test When an application is reset, the eventDispatcher is destroyed and recreated'] = function testWhenAnApplicationIsResetTheEventDispatcherIsDestroyedAndRecreated(assert) {\n var _this5 = this;\n\n var eventDispatcherWasSetup = 0;\n var eventDispatcherWasDestroyed = 0;\n\n var mockEventDispatcher = {\n setup: function () {\n eventDispatcherWasSetup++;\n },\n destroy: function () {\n eventDispatcherWasDestroyed++;\n }\n };\n\n (0, _emberMetal.run)(function () {\n _this5.createApplication();\n _this5.add('event_dispatcher:main', { create: function () {\n return mockEventDispatcher;\n } });\n\n assert.equal(eventDispatcherWasSetup, 0);\n assert.equal(eventDispatcherWasDestroyed, 0);\n });\n\n assert.equal(eventDispatcherWasSetup, 1);\n assert.equal(eventDispatcherWasDestroyed, 0);\n\n this.application.reset();\n\n assert.equal(eventDispatcherWasDestroyed, 1);\n assert.equal(eventDispatcherWasSetup, 2, 'setup called after reset');\n };\n\n _class.prototype['@test When an application is reset, the router URL is reset to `/`'] = function testWhenAnApplicationIsResetTheRouterURLIsResetTo(assert) {\n var _this6 = this;\n\n (0, _emberMetal.run)(function () {\n _this6.createApplication();\n\n _this6.add('router:main', _emberRouting.Router.extend({\n location: 'none'\n }));\n\n _this6.router.map(function () {\n this.route('one');\n this.route('two');\n });\n });\n\n this.visit('/one');\n\n this.application.reset();\n\n var applicationController = this.applicationInstance.lookup('controller:application');\n var router = this.applicationInstance.lookup('router:main');\n var location = router.get('location');\n\n assert.equal(location.getURL(), '');\n assert.equal((0, _emberMetal.get)(applicationController, 'currentPath'), 'index');\n\n this.visit('/one');\n\n assert.equal((0, _emberMetal.get)(applicationController, 'currentPath'), 'one');\n };\n\n _class.prototype['@test When an application with advance/deferReadiness is reset, the app does correctly become ready after reset'] = function testWhenAnApplicationWithAdvanceDeferReadinessIsResetTheAppDoesCorrectlyBecomeReadyAfterReset(assert) {\n var _this7 = this;\n\n var readyCallCount = 0;\n\n (0, _emberMetal.run)(function () {\n _this7.createApplication({\n ready: function () {\n readyCallCount++;\n }\n });\n\n _this7.application.deferReadiness();\n assert.equal(readyCallCount, 0, 'ready has not yet been called');\n });\n\n (0, _emberMetal.run)(this.application, 'advanceReadiness');\n\n assert.equal(readyCallCount, 1, 'ready was called once');\n\n this.application.reset();\n\n assert.equal(readyCallCount, 2, 'ready was called twice');\n };\n\n return _class;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember-application/tests/system/reset_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-application/tests/system/reset_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-application/tests/system/visit_test', ['ember-babel', 'internal-test-helpers', 'ember-runtime', 'ember-metal', 'ember-application/system/application', 'ember-application/system/application-instance', 'ember-application/system/engine', 'ember-routing', 'ember-glimmer', 'ember-template-compiler', 'ember-views'], function (_emberBabel, _internalTestHelpers, _emberRuntime, _emberMetal, _application, _applicationInstance, _engine, _emberRouting, _emberGlimmer, _emberTemplateCompiler, _emberViews) {\n 'use strict';\n\n function expectAsyncError() {\n _emberRuntime.RSVP.off('error');\n }\n\n (0, _internalTestHelpers.moduleFor)('Ember.Application - visit()', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class.prototype.teardown = function teardown() {\n _emberRuntime.RSVP.on('error', _emberRuntime.onerrorDefault);\n _ApplicationTestCase.prototype.teardown.call(this);\n };\n\n _class.prototype.createApplication = function createApplication(options) {\n return _ApplicationTestCase.prototype.createApplication.call(this, options, _application.default.extend());\n };\n\n _class.prototype['@test Applications with autoboot set to false do not autoboot'] = function (assert) {\n var _this2 = this;\n\n function delay(time) {\n return new _emberRuntime.RSVP.Promise(function (resolve) {\n return _emberMetal.run.later(resolve, time);\n });\n }\n\n var appBooted = 0;\n var instanceBooted = 0;\n\n this.application.initializer({\n name: 'assert-no-autoboot',\n initialize: function () {\n appBooted++;\n }\n });\n\n this.application.instanceInitializer({\n name: 'assert-no-autoboot',\n initialize: function () {\n instanceBooted++;\n }\n });\n\n assert.ok(!this.applicationInstance, 'precond - no instance');\n assert.ok(appBooted === 0, 'precond - not booted');\n assert.ok(instanceBooted === 0, 'precond - not booted');\n\n // Continue after 500ms\n return delay(500).then(function () {\n assert.ok(appBooted === 0, '500ms elapsed without app being booted');\n assert.ok(instanceBooted === 0, '500ms elapsed without instances being booted');\n\n return _this2.runTask(function () {\n return _this2.application.boot();\n });\n }).then(function () {\n assert.ok(appBooted === 1, 'app should boot when manually calling `app.boot()`');\n assert.ok(instanceBooted === 0, 'no instances should be booted automatically when manually calling `app.boot()');\n });\n };\n\n _class.prototype['@test calling visit() on an app without first calling boot() should boot the app'] = function (assert) {\n var appBooted = 0;\n var instanceBooted = 0;\n\n this.application.initializer({\n name: 'assert-no-autoboot',\n initialize: function () {\n appBooted++;\n }\n });\n\n this.application.instanceInitializer({\n name: 'assert-no-autoboot',\n initialize: function () {\n instanceBooted++;\n }\n });\n\n return this.visit('/').then(function () {\n assert.ok(appBooted === 1, 'the app should be booted`');\n assert.ok(instanceBooted === 1, 'an instances should be booted');\n });\n };\n\n _class.prototype['@test calling visit() on an already booted app should not boot it again'] = function (assert) {\n var _this3 = this;\n\n var appBooted = 0;\n var instanceBooted = 0;\n\n this.application.initializer({\n name: 'assert-no-autoboot',\n initialize: function () {\n appBooted++;\n }\n });\n\n this.application.instanceInitializer({\n name: 'assert-no-autoboot',\n initialize: function () {\n instanceBooted++;\n }\n });\n\n return this.runTask(function () {\n return _this3.application.boot();\n }).then(function () {\n assert.ok(appBooted === 1, 'the app should be booted');\n assert.ok(instanceBooted === 0, 'no instances should be booted');\n\n return _this3.visit('/');\n }).then(function () {\n assert.ok(appBooted === 1, 'the app should not be booted again');\n assert.ok(instanceBooted === 1, 'an instance should be booted');\n\n /*\n * Destroy the instance.\n */\n return _this3.runTask(function () {\n _this3.applicationInstance.destroy();\n _this3.applicationInstance = null;\n });\n }).then(function () {\n /*\n * Visit on the application a second time. The application should remain\n * booted, but a new instance will be created.\n */\n return _this3.visit('/');\n }).then(function () {\n assert.ok(appBooted === 1, 'the app should not be booted again');\n assert.ok(instanceBooted === 2, 'another instance should be booted');\n });\n };\n\n _class.prototype['@test visit() rejects on application boot failure'] = function (assert) {\n this.application.initializer({\n name: 'error',\n initialize: function () {\n throw new Error('boot failure');\n }\n });\n\n expectAsyncError();\n\n return this.visit('/').then(function () {\n assert.ok(false, 'It should not resolve the promise');\n }, function (error) {\n assert.ok(error instanceof Error, 'It should reject the promise with the boot error');\n assert.equal(error.message, 'boot failure');\n });\n };\n\n _class.prototype['@test visit() rejects on instance boot failure'] = function (assert) {\n this.application.instanceInitializer({\n name: 'error',\n initialize: function () {\n throw new Error('boot failure');\n }\n });\n\n expectAsyncError();\n\n return this.visit('/').then(function () {\n assert.ok(false, 'It should not resolve the promise');\n }, function (error) {\n assert.ok(error instanceof Error, 'It should reject the promise with the boot error');\n assert.equal(error.message, 'boot failure');\n });\n };\n\n _class.prototype['@test visit() follows redirects'] = function (assert) {\n this.router.map(function () {\n this.route('a');\n this.route('b', { path: '/b/:b' });\n this.route('c', { path: '/c/:c' });\n });\n\n this.add('route:a', _emberRouting.Route.extend({\n afterModel: function () {\n this.replaceWith('b', 'zomg');\n }\n }));\n\n this.add('route:b', _emberRouting.Route.extend({\n afterModel: function (params) {\n this.transitionTo('c', params.b);\n }\n }));\n\n /*\n * First call to `visit` is `this.application.visit` and returns the\n * applicationInstance.\n */\n return this.visit('/a').then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.equal(instance.getURL(), '/c/zomg', 'It should follow all redirects');\n });\n };\n\n _class.prototype['@test visit() rejects if an error occurred during a transition'] = function (assert) {\n this.router.map(function () {\n this.route('a');\n this.route('b', { path: '/b/:b' });\n this.route('c', { path: '/c/:c' });\n });\n\n this.add('route:a', _emberRouting.Route.extend({\n afterModel: function () {\n this.replaceWith('b', 'zomg');\n }\n }));\n\n this.add('route:b', _emberRouting.Route.extend({\n afterModel: function (params) {\n this.transitionTo('c', params.b);\n }\n }));\n\n this.add('route:c', _emberRouting.Route.extend({\n afterModel: function (params) {\n throw new Error('transition failure');\n }\n }));\n\n expectAsyncError();\n\n return this.visit('/a').then(function () {\n assert.ok(false, 'It should not resolve the promise');\n }, function (error) {\n assert.ok(error instanceof Error, 'It should reject the promise with the boot error');\n assert.equal(error.message, 'transition failure');\n });\n };\n\n _class.prototype['@test visit() chain'] = function (assert) {\n this.router.map(function () {\n this.route('a');\n this.route('b');\n this.route('c');\n });\n\n return this.visit('/').then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.equal(instance.getURL(), '/');\n\n return instance.visit('/a');\n }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.equal(instance.getURL(), '/a');\n\n return instance.visit('/b');\n }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.equal(instance.getURL(), '/b');\n\n return instance.visit('/c');\n }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.equal(instance.getURL(), '/c');\n });\n };\n\n _class.prototype['@test visit() returns a promise that resolves when the view has rendered'] = function (assert) {\n var _this4 = this;\n\n this.addTemplate('application', '
Hello world
');\n\n assert.strictEqual(this.$().children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/').then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.equal(_this4.$('.ember-view h1').text(), 'Hello world', 'the application was rendered once the promise resolves');\n });\n };\n\n _class.prototype['@test visit() returns a promise that resolves without rendering when shouldRender is set to false'] = function (assert) {\n var _this5 = this;\n\n assert.expect(3);\n\n this.addTemplate('application', '
Hello world
');\n\n assert.strictEqual(this.$().children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/', { shouldRender: false }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.strictEqual(_this5.$().children().length, 0, 'there are still no elements in the fixture element after visit');\n });\n };\n\n _class.prototype['@test visit() renders a template when shouldRender is set to true'] = function (assert) {\n var _this6 = this;\n\n assert.expect(3);\n\n this.addTemplate('application', '
Hello world
');\n\n assert.strictEqual(this.$('#qunit-fixture').children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/', { shouldRender: true }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.strictEqual(_this6.$().children().length, 1, 'there is 1 element in the fixture element after visit');\n });\n };\n\n _class.prototype['@test visit() returns a promise that resolves without rendering when shouldRender is set to false with Engines'] = function (assert) {\n var _this7 = this;\n\n assert.expect(3);\n\n this.router.map(function () {\n this.mount('blog');\n });\n\n this.addTemplate('application', '
Hello world
');\n\n // Register engine\n var BlogEngine = _engine.default.extend();\n this.add('engine:blog', BlogEngine);\n\n // Register engine route map\n var BlogMap = function () {};\n this.add('route-map:blog', BlogMap);\n\n assert.strictEqual(this.$('#qunit-fixture').children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/blog', { shouldRender: false }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.strictEqual(_this7.$().children().length, 0, 'there are still no elements in the fixture element after visit');\n });\n };\n\n _class.prototype['@test visit() does not setup the event_dispatcher:main if isInteractive is false (with Engines) GH#15615'] = function (assert) {\n var _this8 = this;\n\n assert.expect(3);\n\n this.router.map(function () {\n this.mount('blog');\n });\n\n this.addTemplate('application', '
Hello world
{{outlet}}');\n this.add('event_dispatcher:main', {\n create: function () {\n throw new Error('should not happen!');\n }\n });\n\n // Register engine\n var BlogEngine = _engine.default.extend({\n init: function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n this._super.apply(this, args);\n this.register('template:application', (0, _emberTemplateCompiler.compile)('{{cache-money}}'));\n this.register('template:components/cache-money', (0, _emberTemplateCompiler.compile)('\\n
Dis cache money
\\n '));\n this.register('component:cache-money', _emberGlimmer.Component.extend({}));\n }\n });\n this.add('engine:blog', BlogEngine);\n\n // Register engine route map\n var BlogMap = function () {};\n this.add('route-map:blog', BlogMap);\n\n assert.strictEqual(this.$('#qunit-fixture').children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/blog', { isInteractive: false }).then(function (instance) {\n assert.ok(instance instanceof _applicationInstance.default, 'promise is resolved with an ApplicationInstance');\n assert.strictEqual(_this8.$().find('p').text(), 'Dis cache money', 'Engine component is resolved');\n });\n };\n\n _class.prototype['@test visit() on engine resolves engine component'] = function (assert) {\n var _this9 = this;\n\n assert.expect(2);\n\n this.router.map(function () {\n this.mount('blog');\n });\n\n // Register engine\n var BlogEngine = _engine.default.extend({\n init: function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n this._super.apply(this, args);\n this.register('template:application', (0, _emberTemplateCompiler.compile)('{{cache-money}}'));\n this.register('template:components/cache-money', (0, _emberTemplateCompiler.compile)('\\n
Dis cache money
\\n '));\n this.register('component:cache-money', _emberGlimmer.Component.extend({}));\n }\n });\n this.add('engine:blog', BlogEngine);\n\n // Register engine route map\n var BlogMap = function () {};\n this.add('route-map:blog', BlogMap);\n\n assert.strictEqual(this.$().children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/blog', { shouldRender: true }).then(function (instance) {\n assert.strictEqual(_this9.$().find('p').text(), 'Dis cache money', 'Engine component is resolved');\n });\n };\n\n _class.prototype['@test visit() on engine resolves engine helper'] = function (assert) {\n var _this10 = this;\n\n assert.expect(2);\n\n this.router.map(function () {\n this.mount('blog');\n });\n\n // Register engine\n var BlogEngine = _engine.default.extend({\n init: function () {\n for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n this._super.apply(this, args);\n this.register('template:application', (0, _emberTemplateCompiler.compile)('{{swag}}'));\n this.register('helper:swag', (0, _emberGlimmer.helper)(function () {\n return 'turnt up';\n }));\n }\n });\n this.add('engine:blog', BlogEngine);\n\n // Register engine route map\n var BlogMap = function () {};\n this.add('route-map:blog', BlogMap);\n\n assert.strictEqual(this.$().children().length, 0, 'there are no elements in the fixture element');\n\n return this.visit('/blog', { shouldRender: true }).then(function () {\n assert.strictEqual(_this10.$().text(), 'turnt up', 'Engine component is resolved');\n });\n };\n\n _class.prototype['@test Ember Islands-style setup'] = function (assert) {\n var _this11 = this;\n\n var xFooInitCalled = false;\n var xFooDidInsertElementCalled = false;\n\n var xBarInitCalled = false;\n var xBarDidInsertElementCalled = false;\n\n this.router.map(function () {\n this.route('show', { path: '/:component_name' });\n });\n\n this.add('route:show', _emberRouting.Route.extend({\n queryParams: {\n data: { refreshModel: true }\n },\n\n model: function (params) {\n return {\n componentName: params.component_name,\n componentData: params.data ? JSON.parse(params.data) : undefined\n };\n }\n }));\n\n var Counter = _emberRuntime.Object.extend({\n value: 0,\n\n increment: function () {\n this.incrementProperty('value');\n }\n });\n\n this.add('service:isolatedCounter', Counter);\n this.add('service:sharedCounter', Counter.create());\n this.application.registerOptions('service:sharedCounter', { instantiate: false });\n\n this.addTemplate('show', '{{component model.componentName model=model.componentData}}');\n\n this.addTemplate('components/x-foo', '\\n
X-Foo
\\n
Hello {{model.name}}, I have been clicked {{isolatedCounter.value}} times ({{sharedCounter.value}} times combined)!
'\n });\n\n this.render('{{hi-mom}}');\n\n var _getViewBounds = (0, _emberViews.getViewBounds)(component),\n parentElement = _getViewBounds.parentElement,\n firstNode = _getViewBounds.firstNode,\n lastNode = _getViewBounds.lastNode;\n\n assert.equal(parentElement, this.element, 'a regular component should have the right parentElement');\n assert.equal(firstNode, component.element, 'a regular component should have a single node that is its element');\n assert.equal(lastNode, component.element, 'a regular component should have a single node that is its element');\n };\n\n _class2.prototype['@test getViewBounds on a tagless component'] = function testGetViewBoundsOnATaglessComponent(assert) {\n var component = void 0;\n this.registerComponent('hi-mom', {\n ComponentClass: _helpers.Component.extend({\n tagName: '',\n init: function () {\n this._super.apply(this, arguments);\n component = this;\n }\n }),\n template: 'Hi,mom!'\n });\n\n this.render('{{hi-mom}}');\n\n var _getViewBounds2 = (0, _emberViews.getViewBounds)(component),\n parentElement = _getViewBounds2.parentElement,\n firstNode = _getViewBounds2.firstNode,\n lastNode = _getViewBounds2.lastNode;\n\n assert.equal(parentElement, this.element, 'a tagless component should have the right parentElement');\n assert.equal(firstNode, this.$('#start-node')[0], 'a tagless component should have a range enclosing all of its nodes');\n assert.equal(lastNode, this.$('#before-end-node')[0].nextSibling, 'a tagless component should have a range enclosing all of its nodes');\n };\n\n _class2.prototype['@test getViewClientRects'] = function testGetViewClientRects(assert) {\n if (!hasGetClientRects || !ClientRectListCtor) {\n assert.ok(true, 'The test environment does not support the DOM API required to run this test.');\n return;\n }\n\n var component = void 0;\n this.registerComponent('hi-mom', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n component = this;\n }\n }),\n template: '
Hi, mom!
'\n });\n\n this.render('{{hi-mom}}');\n\n assert.ok((0, _emberViews.getViewClientRects)(component) instanceof ClientRectListCtor);\n };\n\n _class2.prototype['@test getViewBoundingClientRect'] = function testGetViewBoundingClientRect(assert) {\n if (!hasGetBoundingClientRect || !ClientRectCtor) {\n assert.ok(true, 'The test environment does not support the DOM API required to run this test.');\n return;\n }\n\n var component = void 0;\n this.registerComponent('hi-mom', {\n ComponentClass: _helpers.Component.extend({\n init: function () {\n this._super.apply(this, arguments);\n component = this;\n }\n }),\n template: '
Hi, mom!
'\n });\n\n this.render('{{hi-mom}}');\n\n assert.ok((0, _emberViews.getViewBoundingClientRect)(component) instanceof ClientRectCtor);\n };\n\n return _class2;\n }(_testCase.RenderingTest));\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/components/utils-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/components/utils-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/components/web-component-fallback-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-metal'], function (_emberBabel, _testCase, _emberMetal) {\n 'use strict';\n\n (0, _testCase.moduleFor)('Components test: web component fallback', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype['@test custom elements are rendered'] = function testCustomElementsAreRendered() {\n var template = 'hello';\n\n this.render(template);\n\n this.assertHTML(template);\n\n this.assertStableRerender();\n };\n\n _class.prototype['@test custom elements can have bound attributes'] = function testCustomElementsCanHaveBoundAttributes() {\n var _this2 = this;\n\n var template = 'hello';\n\n this.render(template, { name: 'Robert' });\n\n this.assertHTML('hello');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this2.context, 'name', 'Kris');\n });\n\n this.assertHTML('hello');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this2.context, 'name', 'Robert');\n });\n\n this.assertHTML('hello');\n };\n\n return _class;\n }(_testCase.RenderingTest));\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/components/web-component-fallback-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/components/web-component-fallback-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/components/will-destroy-element-hook-test', ['ember-babel', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/test-case'], function (_emberBabel, _emberMetal, _helpers, _testCase) {\n 'use strict';\n\n (0, _testCase.moduleFor)('Component willDestroyElement hook', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype['@test it calls willDestroyElement when removed by if'] = function testItCallsWillDestroyElementWhenRemovedByIf(assert) {\n var _this2 = this;\n\n var didInsertElementCount = 0;\n var willDestroyElementCount = 0;\n var FooBarComponent = _helpers.Component.extend({\n didInsertElement: function () {\n didInsertElementCount++;\n assert.notEqual(this.element.parentNode, null, 'precond component is in DOM');\n },\n willDestroyElement: function () {\n willDestroyElementCount++;\n assert.notEqual(this.element.parentNode, null, 'has not been removed from DOM yet');\n }\n });\n\n this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });\n\n this.render('{{#if switch}}{{foo-bar}}{{/if}}', { switch: true });\n\n assert.equal(didInsertElementCount, 1, 'didInsertElement was called once');\n\n this.assertComponentElement(this.firstChild, { content: 'hello' });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this2.context, 'switch', false);\n });\n\n assert.equal(willDestroyElementCount, 1, 'willDestroyElement was called once');\n\n this.assertText('');\n };\n\n return _class;\n }(_testCase.RenderingTest));\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/components/will-destroy-element-hook-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/components/will-destroy-element-hook-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/content-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-metal', 'ember-debug', 'ember-runtime', 'ember-glimmer/tests/utils/test-helpers', 'ember-views', 'ember-glimmer/tests/utils/helpers'], function (_emberBabel, _testCase, _abstractTestCase, _emberMetal, _emberDebug, _emberRuntime, _testHelpers, _emberViews, _helpers) {\n 'use strict';\n\n /* globals EmberDev */\n (0, _testCase.moduleFor)('Static content tests', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype['@test it can render a static text node'] = function testItCanRenderAStaticTextNode() {\n var _this2 = this;\n\n this.render('hello');\n var text1 = this.assertTextNode(this.firstChild, 'hello');\n\n this.runTask(function () {\n return _this2.rerender();\n });\n\n var text2 = this.assertTextNode(this.firstChild, 'hello');\n\n this.assertSameNode(text1, text2);\n };\n\n _class.prototype['@test it can render a static element'] = function testItCanRenderAStaticElement() {\n var _this3 = this;\n\n this.render('
hello
');\n var p1 = this.assertElement(this.firstChild, { tagName: 'p' });\n var text1 = this.assertTextNode(this.firstChild.firstChild, 'hello');\n\n this.runTask(function () {\n return _this3.rerender();\n });\n\n var p2 = this.assertElement(this.firstChild, { tagName: 'p' });\n var text2 = this.assertTextNode(this.firstChild.firstChild, 'hello');\n\n this.assertSameNode(p1, p2);\n this.assertSameNode(text1, text2);\n };\n\n _class.prototype['@test it can render a static template'] = function testItCanRenderAStaticTemplate() {\n var _this4 = this;\n\n var template = '\\n
\\n
Welcome to Ember.js
\\n
\\n
\\n
Why you should use Ember.js?
\\n \\n
It\\'s great
\\n
It\\'s awesome
\\n
It\\'s Ember.js
\\n \\n
\\n \\n ';\n\n this.render(template);\n this.assertHTML(template);\n\n this.runTask(function () {\n return _this4.rerender();\n });\n\n this.assertHTML(template);\n };\n\n return _class;\n }(_testCase.RenderingTest));\n\n var DynamicContentTest = function (_RenderingTest2) {\n (0, _emberBabel.inherits)(DynamicContentTest, _RenderingTest2);\n\n function DynamicContentTest() {\n (0, _emberBabel.classCallCheck)(this, DynamicContentTest);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest2.apply(this, arguments));\n }\n\n DynamicContentTest.prototype.renderPath = function renderPath(path) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n throw new Error('Not implemented: `renderValues`');\n };\n\n DynamicContentTest.prototype.assertIsEmpty = function assertIsEmpty() {\n this.assert.strictEqual(this.firstChild, null);\n };\n\n DynamicContentTest.prototype.assertContent = function assertContent(content) {\n throw new Error('Not implemented: `assertContent`');\n };\n\n DynamicContentTest.prototype['@test it can render a dynamic path'] = function testItCanRenderADynamicPath() {\n var _this6 = this;\n\n this.renderPath('message', { message: 'hello' });\n\n this.assertContent('hello');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this6.context, 'message', 'goodbye');\n });\n\n this.assertContent('goodbye');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this6.context, 'message', 'hello');\n });\n\n this.assertContent('hello');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test resolves the string length properly'] = function testResolvesTheStringLengthProperly() {\n var _this7 = this;\n\n this.render('
');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this8.context, 'foo', undefined);\n });\n\n this.assertHTML('');\n };\n\n DynamicContentTest.prototype['@test it can render a capitalized path with no deprecation'] = function testItCanRenderACapitalizedPathWithNoDeprecation() {\n var _this9 = this;\n\n expectNoDeprecation();\n\n this.renderPath('CaptializedPath', { CaptializedPath: 'no deprecation' });\n\n this.assertContent('no deprecation');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this9.context, 'CaptializedPath', 'still no deprecation');\n });\n\n this.assertContent('still no deprecation');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this9.context, 'CaptializedPath', 'no deprecation');\n });\n\n this.assertContent('no deprecation');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can render undefined dynamic paths'] = function testItCanRenderUndefinedDynamicPaths() {\n var _this10 = this;\n\n this.renderPath('name', {});\n\n this.assertIsEmpty();\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this10.context, 'name', 'foo-bar');\n });\n\n this.assertContent('foo-bar');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this10.context, 'name', undefined);\n });\n\n this.assertIsEmpty();\n };\n\n DynamicContentTest.prototype['@test it can render a deeply nested dynamic path'] = function testItCanRenderADeeplyNestedDynamicPath() {\n var _this11 = this;\n\n this.renderPath('a.b.c.d.e.f', {\n a: { b: { c: { d: { e: { f: 'hello' } } } } }\n });\n\n this.assertContent('hello');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'a.b.c.d.e.f', 'goodbye');\n });\n\n this.assertContent('goodbye');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'a.b.c.d', { e: { f: 'aloha' } });\n });\n\n this.assertContent('aloha');\n this.assertInvariants();\n\n this.runTask(function () {\n (0, _emberMetal.set)(_this11.context, 'a', { b: { c: { d: { e: { f: 'hello' } } } } });\n });\n\n this.assertContent('hello');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can render a computed property'] = function testItCanRenderAComputedProperty() {\n var _this12 = this;\n\n var Formatter = _emberRuntime.Object.extend({\n formattedMessage: (0, _emberMetal.computed)('message', function () {\n return this.get('message').toUpperCase();\n })\n });\n\n var m = Formatter.create({ message: 'hello' });\n\n this.renderPath('m.formattedMessage', { m: m });\n\n this.assertContent('HELLO');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(m, 'message', 'goodbye');\n });\n\n this.assertContent('GOODBYE');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this12.context, 'm', Formatter.create({ message: 'hello' }));\n });\n\n this.assertContent('HELLO');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can render a computed property with nested dependency'] = function testItCanRenderAComputedPropertyWithNestedDependency() {\n var _this13 = this;\n\n var Formatter = _emberRuntime.Object.extend({\n formattedMessage: (0, _emberMetal.computed)('messenger.message', function () {\n return this.get('messenger.message').toUpperCase();\n })\n });\n\n var m = Formatter.create({ messenger: { message: 'hello' } });\n\n this.renderPath('m.formattedMessage', { m: m });\n\n this.assertContent('HELLO');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(m, 'messenger.message', 'goodbye');\n });\n\n this.assertContent('GOODBYE');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this13.context, 'm', Formatter.create({ messenger: { message: 'hello' } }));\n });\n\n this.assertContent('HELLO');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can read from a proxy object'] = function testItCanReadFromAProxyObject() {\n var _this14 = this;\n\n this.renderPath('proxy.name', { proxy: _emberRuntime.ObjectProxy.create({ content: { name: 'Tom Dale' } }) });\n\n this.assertContent('Tom Dale');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this14.context, 'proxy.content.name', 'Yehuda Katz');\n });\n\n this.assertContent('Yehuda Katz');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this14.context, 'proxy.content', { name: 'Godfrey Chan' });\n });\n\n this.assertContent('Godfrey Chan');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this14.context, 'proxy.name', 'Stefan Penner');\n });\n\n this.assertContent('Stefan Penner');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this14.context, 'proxy.content', null);\n });\n\n this.assertIsEmpty();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this14.context, 'proxy', _emberRuntime.ObjectProxy.create({ content: { name: 'Tom Dale' } }));\n });\n\n this.assertContent('Tom Dale');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can read from a nested path in a proxy object'] = function testItCanReadFromANestedPathInAProxyObject() {\n var _this15 = this;\n\n this.renderPath('proxy.name.last', { proxy: _emberRuntime.ObjectProxy.create({ content: { name: { first: 'Tom', last: 'Dale' } } }) });\n\n this.assertContent('Dale');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy.content.name.last', 'Cruise');\n });\n\n this.assertContent('Cruise');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy.content.name.first', 'Suri');\n });\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy.content.name', { first: 'Yehuda', last: 'Katz' });\n });\n\n this.assertContent('Katz');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy.content', { name: { first: 'Godfrey', last: 'Chan' } });\n });\n\n this.assertContent('Chan');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy.name', { first: 'Stefan', last: 'Penner' });\n });\n\n this.assertContent('Penner');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy', null);\n });\n\n this.assertIsEmpty();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'proxy', _emberRuntime.ObjectProxy.create({ content: { name: { first: 'Tom', last: 'Dale' } } }));\n });\n\n this.assertContent('Dale');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can read from a path flipping between a proxy and a real object'] = function testItCanReadFromAPathFlippingBetweenAProxyAndARealObject() {\n var _this16 = this;\n\n this.renderPath('proxyOrObject.name.last', { proxyOrObject: _emberRuntime.ObjectProxy.create({ content: { name: { first: 'Tom', last: 'Dale' } } }) });\n\n this.assertContent('Dale');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject', { name: { first: 'Tom', last: 'Dale' } });\n });\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject.name.last', 'Cruise');\n });\n\n this.assertContent('Cruise');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject.name.first', 'Suri');\n });\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject', { name: { first: 'Yehuda', last: 'Katz' } });\n });\n\n this.assertContent('Katz');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject', _emberRuntime.ObjectProxy.create({ content: { name: { first: 'Godfrey', last: 'Chan' } } }));\n });\n\n this.assertContent('Chan');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject.content.name', { first: 'Stefan', last: 'Penner' });\n });\n\n this.assertContent('Penner');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject', null);\n });\n\n this.assertIsEmpty();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this16.context, 'proxyOrObject', _emberRuntime.ObjectProxy.create({ content: { name: { first: 'Tom', last: 'Dale' } } }));\n });\n\n this.assertContent('Dale');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can read from a path flipping between a real object and a proxy'] = function testItCanReadFromAPathFlippingBetweenARealObjectAndAProxy() {\n var _this17 = this;\n\n this.renderPath('objectOrProxy.name.last', { objectOrProxy: { name: { first: 'Tom', last: 'Dale' } } });\n\n this.assertContent('Dale');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy', _emberRuntime.ObjectProxy.create({ content: { name: { first: 'Tom', last: 'Dale' } } }));\n });\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy.content.name.last', 'Cruise');\n });\n\n this.assertContent('Cruise');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy.content.name.first', 'Suri');\n });\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy.content', { name: { first: 'Yehuda', last: 'Katz' } });\n });\n\n this.assertContent('Katz');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy', { name: { first: 'Godfrey', last: 'Chan' } });\n });\n\n this.assertContent('Chan');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy.name', { first: 'Stefan', last: 'Penner' });\n });\n\n this.assertContent('Penner');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy', null);\n });\n\n this.assertIsEmpty();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'objectOrProxy', { name: { first: 'Tom', last: 'Dale' } });\n });\n\n this.assertContent('Dale');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can read from a null object'] = function testItCanReadFromANullObject() {\n var _this18 = this;\n\n var nullObject = Object.create(null);\n nullObject['message'] = 'hello';\n\n this.renderPath('nullObject.message', { nullObject: nullObject });\n\n this.assertContent('hello');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(nullObject, 'message', 'goodbye');\n });\n\n this.assertContent('goodbye');\n this.assertInvariants();\n\n nullObject = Object.create(null);\n nullObject['message'] = 'hello';\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this18.context, 'nullObject', nullObject);\n });\n\n this.assertContent('hello');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can render a readOnly property of a path'] = function testItCanRenderAReadOnlyPropertyOfAPath() {\n var _this19 = this;\n\n var Messenger = _emberRuntime.Object.extend({\n message: _emberMetal.computed.readOnly('a.b.c')\n });\n\n var messenger = Messenger.create({\n a: {\n b: {\n c: 'hello'\n }\n }\n });\n\n this.renderPath('messenger.message', { messenger: messenger });\n\n this.assertContent('hello');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(messenger, 'a.b.c', 'hi');\n });\n\n this.assertContent('hi');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this19.context, 'messenger.a.b', {\n c: 'goodbye'\n });\n });\n\n this.assertContent('goodbye');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this19.context, 'messenger', {\n message: 'hello'\n });\n });\n\n this.assertContent('hello');\n this.assertInvariants();\n };\n\n DynamicContentTest.prototype['@test it can render a property on a function'] = function testItCanRenderAPropertyOnAFunction() {\n var func = function () {};\n func.aProp = 'this is a property on a function';\n\n this.renderPath('func.aProp', { func: func });\n\n this.assertContent('this is a property on a function');\n\n this.assertStableRerender();\n\n // this.runTask(() => set(func, 'aProp', 'still a property on a function'));\n // this.assertContent('still a property on a function');\n // this.assertInvariants();\n\n // func = () => {};\n // func.aProp = 'a prop on a new function';\n\n // this.runTask(() => set(this.context, 'func', func));\n\n // this.assertContent('a prop on a new function');\n // this.assertInvariants();\n };\n\n return DynamicContentTest;\n }(_testCase.RenderingTest);\n\n var EMPTY = {};\n\n var ContentTestGenerator = function () {\n function ContentTestGenerator(cases) {\n var tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '@test';\n (0, _emberBabel.classCallCheck)(this, ContentTestGenerator);\n\n this.cases = cases;\n this.tag = tag;\n }\n\n ContentTestGenerator.prototype.generate = function generate(_ref) {\n var value = _ref[0],\n expected = _ref[1],\n label = _ref[2];\n\n var tag = this.tag;\n label = label || value;\n\n if (expected === EMPTY) {\n var _ref2;\n\n return _ref2 = {}, _ref2[tag + ' rendering ' + label] = function () {\n var _this20 = this;\n\n this.renderPath('value', { value: value });\n\n this.assertIsEmpty();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this20.context, 'value', 'hello');\n });\n\n this.assertContent('hello');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this20.context, 'value', value);\n });\n\n this.assertIsEmpty();\n }, _ref2;\n } else {\n var _ref3;\n\n return _ref3 = {}, _ref3[tag + ' rendering ' + label] = function () {\n var _this21 = this;\n\n this.renderPath('value', { value: value });\n\n this.assertContent(expected);\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this21.context, 'value', 'hello');\n });\n\n this.assertContent('hello');\n this.assertInvariants();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this21.context, 'value', value);\n });\n\n this.assertContent(expected);\n this.assertInvariants();\n }, _ref3;\n }\n };\n\n return ContentTestGenerator;\n }();\n\n var SharedContentTestCases = new ContentTestGenerator([['foo', 'foo'], [0, '0'], [-0, '0', '-0'], [1, '1'], [-1, '-1'], [0.0, '0', '0.0'], [0.5, '0.5'], [undefined, EMPTY], [null, EMPTY], [true, 'true'], [false, 'false'], [NaN, 'NaN'], [new Date(2000, 0, 1), String(new Date(2000, 0, 1)), 'a Date object'], [Infinity, 'Infinity'], [1 / -0, '-Infinity'], [{ foo: 'bar' }, '[object Object]', '{ foo: \\'bar\\' }'], [{\n toString: function () {\n return 'foo';\n }\n }, 'foo', 'an object with a custom toString function'], [{\n valueOf: function () {\n return 1;\n }\n }, '[object Object]', 'an object with a custom valueOf function'],\n\n // Escaping tests\n ['MaxJames', 'MaxJames']]);\n\n var GlimmerContentTestCases = new ContentTestGenerator([[Object.create(null), EMPTY, 'an object with no toString']]);\n\n if (typeof Symbol !== 'undefined') {\n GlimmerContentTestCases.cases.push([Symbol('debug'), 'Symbol(debug)', 'a symbol']);\n }\n\n (0, _abstractTestCase.applyMixins)(DynamicContentTest, SharedContentTestCases, GlimmerContentTestCases);\n\n (0, _testCase.moduleFor)('Dynamic content tests (content position)', function (_DynamicContentTest) {\n (0, _emberBabel.inherits)(_class2, _DynamicContentTest);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DynamicContentTest.apply(this, arguments));\n }\n\n _class2.prototype.renderPath = function renderPath(path) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.render('{{' + path + '}}', context);\n };\n\n _class2.prototype.assertContent = function assertContent(content) {\n this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one text node');\n this.assertTextNode(this.firstChild, content);\n };\n\n return _class2;\n }(DynamicContentTest));\n\n (0, _testCase.moduleFor)('Dynamic content tests (content concat)', function (_DynamicContentTest2) {\n (0, _emberBabel.inherits)(_class3, _DynamicContentTest2);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DynamicContentTest2.apply(this, arguments));\n }\n\n _class3.prototype.renderPath = function renderPath(path) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.render('{{concat \"\" ' + path + ' \"\"}}', context);\n };\n\n _class3.prototype.assertContent = function assertContent(content) {\n this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one text node');\n this.assertTextNode(this.firstChild, content);\n };\n\n return _class3;\n }(DynamicContentTest));\n\n (0, _testCase.moduleFor)('Dynamic content tests (inside an element)', function (_DynamicContentTest3) {\n (0, _emberBabel.inherits)(_class4, _DynamicContentTest3);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DynamicContentTest3.apply(this, arguments));\n }\n\n _class4.prototype.renderPath = function renderPath(path) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.render('
{{' + path + '}}
', context);\n };\n\n _class4.prototype.assertIsEmpty = function assertIsEmpty() {\n this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one
tag');\n this.assertElement(this.firstChild, { tagName: 'p' });\n this.assertText('');\n };\n\n _class4.prototype.assertContent = function assertContent(content) {\n this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one
', context);\n };\n\n _class5.prototype.assertIsEmpty = function assertIsEmpty() {\n this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one
tag');\n this.assertElement(this.firstChild, { tagName: 'div', content: '' });\n };\n\n _class5.prototype.assertContent = function assertContent(content) {\n this.assert.strictEqual(this.nodesCount, 1, 'It should render exactly one
tag');\n this.assertElement(this.firstChild, { tagName: 'div', attrs: { 'data-foo': content }, content: '' });\n };\n\n return _class5;\n }(DynamicContentTest));\n\n var TrustedContentTest = function (_DynamicContentTest5) {\n (0, _emberBabel.inherits)(TrustedContentTest, _DynamicContentTest5);\n\n function TrustedContentTest() {\n (0, _emberBabel.classCallCheck)(this, TrustedContentTest);\n return (0, _emberBabel.possibleConstructorReturn)(this, _DynamicContentTest5.apply(this, arguments));\n }\n\n TrustedContentTest.prototype.assertIsEmpty = function assertIsEmpty() {\n this.assert.strictEqual(this.firstChild, null);\n };\n\n TrustedContentTest.prototype.assertContent = function assertContent(content) {\n this.assertHTML(content);\n };\n\n TrustedContentTest.prototype.assertStableRerender = function assertStableRerender() {\n var _this27 = this;\n\n this.takeSnapshot();\n this.runTask(function () {\n return _this27.rerender();\n });\n _DynamicContentTest5.prototype.assertInvariants.call(this);\n };\n\n TrustedContentTest.prototype.assertInvariants = function assertInvariants() {\n // If it's not stable, we will wipe out all the content and replace them,\n // so there are no invariants\n };\n\n return TrustedContentTest;\n }(DynamicContentTest);\n\n (0, _testCase.moduleFor)('Dynamic content tests (trusted)', function (_TrustedContentTest) {\n (0, _emberBabel.inherits)(_class6, _TrustedContentTest);\n\n function _class6() {\n (0, _emberBabel.classCallCheck)(this, _class6);\n return (0, _emberBabel.possibleConstructorReturn)(this, _TrustedContentTest.apply(this, arguments));\n }\n\n _class6.prototype.renderPath = function renderPath(path) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.render('{{{' + path + '}}}', context);\n };\n\n _class6.prototype['@test updating trusted curlies'] = function testUpdatingTrustedCurlies() {\n var _this29 = this;\n\n this.render('{{{htmlContent}}}{{{nested.htmlContent}}}', {\n htmlContent: 'Max',\n nested: { htmlContent: 'James' }\n });\n\n this.assertContent('MaxJames');\n\n this.runTask(function () {\n return _this29.rerender();\n });\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this29.context, 'htmlContent', 'Max');\n });\n\n this.assertContent('MaxJames');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this29.context, 'nested.htmlContent', 'Jammie');\n });\n\n this.assertContent('MaxJammie');\n\n this.runTask(function () {\n (0, _emberMetal.set)(_this29.context, 'htmlContent', 'Max');\n (0, _emberMetal.set)(_this29.context, 'nested', { htmlContent: 'James' });\n });\n\n this.assertContent('MaxJames');\n };\n\n return _class6;\n }(TrustedContentTest));\n\n (0, _testCase.moduleFor)('Dynamic content tests (integration)', function (_RenderingTest3) {\n (0, _emberBabel.inherits)(_class7, _RenderingTest3);\n\n function _class7() {\n (0, _emberBabel.classCallCheck)(this, _class7);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest3.apply(this, arguments));\n }\n\n _class7.prototype['@test it can render a dynamic template'] = function testItCanRenderADynamicTemplate() {\n var _this31 = this;\n\n var template = '\\n
\\n
Welcome to {{framework}}
\\n
\\n
\\n
Why you should use {{framework}}?
\\n \\n
It\\'s great
\\n
It\\'s awesome
\\n
It\\'s {{framework}}
\\n \\n
\\n \\n ';\n\n var ember = '\\n
\\n
Welcome to Ember.js
\\n
\\n
\\n
Why you should use Ember.js?
\\n \\n
It\\'s great
\\n
It\\'s awesome
\\n
It\\'s Ember.js
\\n \\n
\\n \\n ';\n\n var react = '\\n
\\n
Welcome to React
\\n
\\n
\\n
Why you should use React?
\\n \\n
It\\'s great
\\n
It\\'s awesome
\\n
It\\'s React
\\n \\n
\\n \\n ';\n\n this.render(template, {\n framework: 'Ember.js'\n });\n this.assertHTML(ember);\n\n this.runTask(function () {\n return _this31.rerender();\n });\n\n this.assertHTML(ember);\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this31.context, 'framework', 'React');\n });\n\n this.assertHTML(react);\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this31.context, 'framework', 'Ember.js');\n });\n\n this.assertHTML(ember);\n };\n\n _class7.prototype['@test it should evaluate to nothing if part of the path is `undefined`'] = function testItShouldEvaluateToNothingIfPartOfThePathIsUndefined() {\n var _this32 = this;\n\n this.render('{{foo.bar.baz.bizz}}', {\n foo: {}\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return _this32.rerender();\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this32.context, 'foo', {\n bar: { baz: { bizz: 'Hey!' } }\n });\n });\n\n this.assertText('Hey!');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this32.context, 'foo', {});\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this32.context, 'foo', {\n bar: { baz: { bizz: 'Hello!' } }\n });\n });\n\n this.assertText('Hello!');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this32.context, 'foo', {});\n });\n\n this.assertText('');\n };\n\n _class7.prototype['@test it should evaluate to nothing if part of the path is a primative'] = function testItShouldEvaluateToNothingIfPartOfThePathIsAPrimative() {\n var _this33 = this;\n\n this.render('{{foo.bar.baz.bizz}}', {\n foo: { bar: true }\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return _this33.rerender();\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: false\n });\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: 'Haha'\n });\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: null\n });\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: undefined\n });\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: 1\n });\n });\n\n this.assertText('');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: { baz: { bizz: 'Hello!' } }\n });\n });\n\n this.assertText('Hello!');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this33.context, 'foo', {\n bar: true\n });\n });\n\n this.assertText('');\n };\n\n _class7.prototype['@test can set dynamic href'] = function testCanSetDynamicHref() {\n var _this34 = this;\n\n this.render('Example', {\n model: {\n url: 'http://example.com'\n }\n });\n\n this.assertElement(this.firstChild, { tagName: 'a', content: 'Example', attrs: { 'href': 'http://example.com' } });\n\n this.runTask(function () {\n return _this34.rerender();\n });\n\n this.assertElement(this.firstChild, { tagName: 'a', content: 'Example', attrs: { 'href': 'http://example.com' } });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this34.context, 'model.url', 'http://linkedin.com');\n });\n\n this.assertElement(this.firstChild, { tagName: 'a', content: 'Example', attrs: { 'href': 'http://linkedin.com' } });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this34.context, 'model', { url: 'http://example.com' });\n });\n\n this.assertElement(this.firstChild, { tagName: 'a', content: 'Example', attrs: { 'href': 'http://example.com' } });\n };\n\n _class7.prototype['@test quoteless class attributes update correctly'] = function testQuotelessClassAttributesUpdateCorrectly() {\n var _this35 = this;\n\n this.render('
', {\n model: {\n foo: 'foo',\n bar: 'bar'\n }\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: 'hello', attrs: { 'class': 'foo static bar' } });\n\n this.runTask(function () {\n return _this44.rerender();\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: 'hello', attrs: { 'class': 'foo static bar' } });\n\n this.runTask(function () {\n (0, _emberMetal.set)(_this44.context, 'model.bar', null);\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: 'hello', attrs: { 'class': 'foo static ' } });\n\n this.runTask(function () {\n (0, _emberMetal.set)(_this44.context, 'model', {\n foo: 'foo',\n bar: 'bar'\n });\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: 'hello', attrs: { 'class': 'foo static bar' } });\n };\n\n return _class7;\n }(_testCase.RenderingTest));\n\n var warnings = void 0,\n originalWarn = void 0;\n\n var StyleTest = function (_RenderingTest4) {\n (0, _emberBabel.inherits)(StyleTest, _RenderingTest4);\n\n function StyleTest() {\n (0, _emberBabel.classCallCheck)(this, StyleTest);\n\n var _this45 = (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest4.apply(this, arguments));\n\n warnings = [];\n originalWarn = (0, _emberDebug.getDebugFunction)('warn');\n (0, _emberDebug.setDebugFunction)('warn', function (message, test) {\n if (!test) {\n warnings.push(message);\n }\n });\n return _this45;\n }\n\n StyleTest.prototype.teardown = function teardown() {\n var _RenderingTest4$proto;\n\n (_RenderingTest4$proto = _RenderingTest4.prototype.teardown).call.apply(_RenderingTest4$proto, [this].concat(Array.prototype.slice.call(arguments)));\n (0, _emberDebug.setDebugFunction)('warn', originalWarn);\n };\n\n StyleTest.prototype.assertStyleWarning = function assertStyleWarning(style) {\n this.assert.deepEqual(warnings, [(0, _emberViews.constructStyleDeprecationMessage)(style)]);\n };\n\n StyleTest.prototype.assertNoWarning = function assertNoWarning() {\n this.assert.deepEqual(warnings, []);\n };\n\n return StyleTest;\n }(_testCase.RenderingTest);\n\n (0, _testCase.moduleFor)('Inline style tests', function (_StyleTest) {\n (0, _emberBabel.inherits)(_class8, _StyleTest);\n\n function _class8() {\n (0, _emberBabel.classCallCheck)(this, _class8);\n return (0, _emberBabel.possibleConstructorReturn)(this, _StyleTest.apply(this, arguments));\n }\n\n _class8.prototype['@test can set dynamic style'] = function testCanSetDynamicStyle() {\n var _this47 = this;\n\n this.render('', {\n model: {\n style: 'width: 60px;'\n }\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'width: 60px;' } });\n\n this.runTask(function () {\n return _this47.rerender();\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'width: 60px;' } });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this47.context, 'model.style', 'height: 60px;');\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'height: 60px;' } });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this47.context, 'model.style', null);\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: {} });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this47.context, 'model', { style: 'width: 60px;' });\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'width: 60px;' } });\n };\n\n _class8.prototype['@test can set dynamic style with -html-safe'] = function testCanSetDynamicStyleWithHtmlSafe() {\n var _this48 = this;\n\n this.render('', {\n model: {\n style: 'width: 60px;'\n }\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'width: 60px;' } });\n\n this.runTask(function () {\n return _this48.rerender();\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'width: 60px;' } });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this48.context, 'model.style', 'height: 60px;');\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'height: 60px;' } });\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this48.context, 'model', { style: 'width: 60px;' });\n });\n\n this.assertElement(this.firstChild, { tagName: 'div', content: '', attrs: { 'style': 'width: 60px;' } });\n };\n\n return _class8;\n }(StyleTest));\n\n if (!EmberDev.runningProdBuild) {\n (0, _testCase.moduleFor)('Inline style tests - warnings', function (_StyleTest2) {\n (0, _emberBabel.inherits)(_class9, _StyleTest2);\n\n function _class9() {\n (0, _emberBabel.classCallCheck)(this, _class9);\n return (0, _emberBabel.possibleConstructorReturn)(this, _StyleTest2.apply(this, arguments));\n }\n\n _class9.prototype['@test specifying generates a warning'] = function testSpecifyingDivStyleUserValueDivGeneratesAWarning(assert) {\n var userValue = 'width: 42px';\n this.render('', {\n userValue: userValue\n });\n\n this.assertStyleWarning(userValue);\n };\n\n _class9.prototype['@test specifying `attributeBindings: [\"style\"]` generates a warning'] = function testSpecifyingAttributeBindingsStyleGeneratesAWarning(assert) {\n var FooBarComponent = _helpers.Component.extend({\n attributeBindings: ['style']\n });\n\n this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });\n var userValue = 'width: 42px';\n this.render('{{foo-bar style=userValue}}', {\n userValue: userValue\n });\n\n this.assertStyleWarning(userValue);\n };\n\n _class9.prototype['@test specifying `` works properly without a warning'] = function testSpecifyingDivStyleUserValueDivWorksProperlyWithoutAWarning(assert) {\n this.render('', {\n userValue: 'width: 42px'\n });\n\n this.assertNoWarning();\n };\n\n _class9.prototype['@test specifying `` works properly with a SafeString'] = function testSpecifyingDivStyleUserValueDivWorksProperlyWithASafeString(assert) {\n this.render('', {\n userValue: new _helpers.SafeString('width: 42px')\n });\n\n this.assertNoWarning();\n };\n\n _class9.prototype['@test null value do not generate htmlsafe warning'] = function testNullValueDoNotGenerateHtmlsafeWarning(assert) {\n this.render('', {\n userValue: null\n });\n\n this.assertNoWarning();\n };\n\n _class9.prototype['@test undefined value do not generate htmlsafe warning'] = function testUndefinedValueDoNotGenerateHtmlsafeWarning(assert) {\n this.render('');\n\n this.assertNoWarning();\n };\n\n _class9.prototype['@test no warnings are triggered when using `-html-safe`'] = function testNoWarningsAreTriggeredWhenUsingHtmlSafe(assert) {\n this.render('', {\n userValue: 'width: 42px'\n });\n\n this.assertNoWarning();\n };\n\n _class9.prototype['@test no warnings are triggered when a safe string is quoted'] = function testNoWarningsAreTriggeredWhenASafeStringIsQuoted(assert) {\n this.render('', {\n userValue: new _helpers.SafeString('width: 42px')\n });\n\n this.assertNoWarning();\n };\n\n _class9.prototype['@test binding warning is triggered when an unsafe string is quoted'] = function testBindingWarningIsTriggeredWhenAnUnsafeStringIsQuoted(assert) {\n var userValue = 'width: 42px';\n this.render('', {\n userValue: userValue\n });\n\n this.assertStyleWarning(userValue);\n };\n\n _class9.prototype['@test binding warning is triggered when a safe string for a complete property is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForACompletePropertyIsConcatenatedInPlace(assert) {\n var userValue = 'width: 42px';\n this.render('', {\n userValue: new _helpers.SafeString('width: 42px')\n });\n\n this.assertStyleWarning('color: green; ' + userValue);\n };\n\n _class9.prototype['@test binding warning is triggered when a safe string for a value is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForAValueIsConcatenatedInPlace(assert) {\n var userValue = '42px';\n this.render('', {\n userValue: new _helpers.SafeString(userValue)\n });\n\n this.assertStyleWarning('color: green; width: ' + userValue);\n };\n\n _class9.prototype['@test binding warning is triggered when a safe string for a property name is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForAPropertyNameIsConcatenatedInPlace(assert) {\n var userValue = 'width';\n this.render('', {\n userProperty: new _helpers.SafeString(userValue)\n });\n\n this.assertStyleWarning('color: green; ' + userValue + ': 42px');\n };\n\n return _class9;\n }(StyleTest));\n }\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/content-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/content-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/custom-component-manager-test', ['ember-babel', '@glimmer/runtime', 'ember-glimmer/tests/utils/test-case', 'ember/features', 'ember-glimmer'], function (_emberBabel, _runtime, _testCase, _features, _emberGlimmer) {\n 'use strict';\n\n if (_features.GLIMMER_CUSTOM_COMPONENT_MANAGER) {\n var TestLayoutCompiler = function () {\n function TestLayoutCompiler(template) {\n (0, _emberBabel.classCallCheck)(this, TestLayoutCompiler);\n\n this.template = template;\n }\n\n TestLayoutCompiler.prototype.compile = function compile(builder) {\n builder.wrapLayout(this.template);\n builder.tag.dynamic(function () {\n return _runtime.PrimitiveReference.create('p');\n });\n builder.attrs.static('class', 'hey-oh-lets-go');\n builder.attrs.static('manager-id', 'test');\n };\n\n return TestLayoutCompiler;\n }();\n\n var TestComponentManager = function (_AbstractComponentMan) {\n (0, _emberBabel.inherits)(TestComponentManager, _AbstractComponentMan);\n\n function TestComponentManager() {\n (0, _emberBabel.classCallCheck)(this, TestComponentManager);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AbstractComponentMan.apply(this, arguments));\n }\n\n TestComponentManager.prototype.create = function create(env, definition, args, dynamicScope, caller, hasBlock) {\n return definition.ComponentClass.create();\n };\n\n TestComponentManager.prototype.layoutFor = function layoutFor(definition, bucket, env) {\n return env.getCompiledBlock(TestLayoutCompiler, definition.template);\n };\n\n TestComponentManager.prototype.getDestructor = function getDestructor(component) {\n return component;\n };\n\n TestComponentManager.prototype.getSelf = function getSelf() {\n return null;\n };\n\n return TestComponentManager;\n }(_emberGlimmer.AbstractComponentManager);\n\n (0, _testCase.moduleFor)('Components test: curly components with custom manager', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype['@test it can render a basic component with custom component manager'] = function testItCanRenderABasicComponentWithCustomComponentManager(assert) {\n var managerId = 'test';\n this.owner.register('component-manager:' + managerId, new TestComponentManager());\n this.registerComponent('foo-bar', {\n template: '{{use-component-manager \"' + managerId + '\"}}hello',\n managerId: managerId\n });\n\n this.render('{{foo-bar}}');\n\n assert.equal(this.firstChild.className, 'hey-oh-lets-go', 'class name was set correctly');\n assert.equal(this.firstChild.tagName, 'P', 'tag name was set correctly');\n assert.equal(this.firstChild.getAttribute('manager-id'), managerId, 'custom attribute was set correctly');\n };\n\n return _class;\n }(_testCase.RenderingTest));\n }\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/custom-component-manager-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/custom-component-manager-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/event-dispatcher-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/helpers', 'ember-metal', 'ember/features', 'ember-views'], function (_emberBabel, _testCase, _helpers, _emberMetal, _features, _emberViews) {\n 'use strict';\n\n var canDataTransfer = !!document.createEvent('HTMLEvents').dataTransfer;\n\n function fireNativeWithDataTransfer(node, type, dataTransfer) {\n var event = document.createEvent('HTMLEvents');\n event.initEvent(type, true, true);\n event.dataTransfer = dataTransfer;\n node.dispatchEvent(event);\n }\n\n (0, _testCase.moduleFor)('EventDispatcher', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype['@test events bubble view hierarchy for form elements'] = function testEventsBubbleViewHierarchyForFormElements(assert) {\n var _this2 = this;\n\n var receivedEvent = void 0;\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n change: function (event) {\n receivedEvent = event;\n }\n }),\n template: ''\n });\n\n this.render('{{x-foo}}');\n\n this.runTask(function () {\n return _this2.$('#is-done').trigger('change');\n });\n assert.ok(receivedEvent, 'change event was triggered');\n assert.strictEqual(receivedEvent.target, this.$('#is-done')[0]);\n };\n\n _class.prototype['@test events bubble to parent view'] = function testEventsBubbleToParentView(assert) {\n var _this3 = this;\n\n var receivedEvent = void 0;\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n change: function (event) {\n receivedEvent = event;\n }\n }),\n template: '{{yield}}'\n });\n\n this.registerComponent('x-bar', {\n ComponentClass: _helpers.Component.extend({\n change: function () {}\n }),\n template: ''\n });\n\n this.render('{{#x-foo}}{{x-bar}}{{/x-foo}}');\n\n this.runTask(function () {\n return _this3.$('#is-done').trigger('change');\n });\n assert.ok(receivedEvent, 'change event was triggered');\n assert.strictEqual(receivedEvent.target, this.$('#is-done')[0]);\n };\n\n _class.prototype['@test events bubbling up can be prevented'] = function testEventsBubblingUpCanBePrevented(assert) {\n var _this4 = this;\n\n var hasReceivedEvent = void 0;\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n change: function () {\n hasReceivedEvent = true;\n }\n }),\n template: '{{yield}}'\n });\n\n this.registerComponent('x-bar', {\n ComponentClass: _helpers.Component.extend({\n change: function () {\n return false;\n }\n }),\n template: ''\n });\n\n this.render('{{#x-foo}}{{x-bar}}{{/x-foo}}');\n\n this.runTask(function () {\n return _this4.$('#is-done').trigger('change');\n });\n assert.notOk(hasReceivedEvent, 'change event has not been received');\n };\n\n _class.prototype['@test dispatches to the nearest event manager'] = function testDispatchesToTheNearestEventManager(assert) {\n var _this5 = this;\n\n var receivedEvent = void 0;\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n click: function (event) {\n assert.notOk(true, 'should not trigger `click` on component');\n },\n\n\n eventManager: {\n click: function (event) {\n receivedEvent = event;\n }\n }\n }),\n\n template: ''\n });\n\n expectDeprecation(/`eventManager` has been deprecated/);\n this.render('{{x-foo}}');\n\n this.runTask(function () {\n return _this5.$('#is-done').trigger('click');\n });\n assert.strictEqual(receivedEvent.target, this.$('#is-done')[0]);\n };\n\n _class.prototype['@test event manager can re-dispatch to the component'] = function testEventManagerCanReDispatchToTheComponent(assert) {\n var _this6 = this;\n\n var handlers = [];\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n click: function () {\n handlers.push('component');\n },\n\n\n eventManager: {\n click: function (event, component) {\n handlers.push('eventManager');\n // Re-dispatch event when you get it.\n //\n // The second parameter tells the dispatcher\n // that this event has been handled. This\n // API will clearly need to be reworked since\n // multiple eventManagers in a single view\n // hierarchy would break, but it shows that\n // re-dispatching works\n component.$().trigger('click', this);\n }\n }\n }),\n\n template: ''\n });\n\n expectDeprecation(/`eventManager` has been deprecated/);\n this.render('{{x-foo}}');\n\n this.runTask(function () {\n return _this6.$('#is-done').trigger('click');\n });\n assert.deepEqual(handlers, ['eventManager', 'component']);\n };\n\n _class.prototype['@test event handlers are wrapped in a run loop'] = function testEventHandlersAreWrappedInARunLoop(assert) {\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n change: function () {\n assert.ok(_emberMetal.run.currentRunLoop, 'a run loop should have started');\n }\n }),\n template: ''\n });\n\n this.render('{{x-foo}}');\n\n this.$('#is-done').trigger('click');\n };\n\n return _class;\n }(_testCase.RenderingTest));\n\n (0, _testCase.moduleFor)('EventDispatcher#setup', function (_RenderingTest2) {\n (0, _emberBabel.inherits)(_class2, _RenderingTest2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n\n var _this7 = (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest2.call(this));\n\n var dispatcher = _this7.owner.lookup('event_dispatcher:main');\n (0, _emberMetal.run)(dispatcher, 'destroy');\n _this7.owner.__container__.reset('event_dispatcher:main');\n _this7.dispatcher = _this7.owner.lookup('event_dispatcher:main');\n return _this7;\n }\n\n _class2.prototype['@test additional events can be specified'] = function testAdditionalEventsCanBeSpecified(assert) {\n this.dispatcher.setup({ myevent: 'myEvent' });\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n myEvent: function () {\n assert.ok(true, 'custom event was triggered');\n }\n }),\n template: '
Hello!
'\n });\n\n this.render('{{x-foo}}');\n\n this.$('div').trigger('myevent');\n };\n\n _class2.prototype['@test eventManager is deprecated'] = function testEventManagerIsDeprecated(assert) {\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n eventManager: {\n myEvent: function () {}\n }\n }),\n template: '
Hello!
'\n });\n\n expectDeprecation(/`eventManager` has been deprecated/);\n this.render('{{x-foo}}');\n };\n\n _class2.prototype['@test a rootElement can be specified'] = function testARootElementCanBeSpecified(assert) {\n this.$().append('');\n this.dispatcher.setup({ myevent: 'myEvent' }, '#app');\n\n assert.ok(this.$('#app').hasClass('ember-application'), 'custom rootElement was used');\n assert.equal(this.dispatcher.rootElement, '#app', 'the dispatchers rootElement was updated');\n };\n\n _class2.prototype['@test default events can be disabled via `customEvents`'] = function testDefaultEventsCanBeDisabledViaCustomEvents(assert) {\n this.dispatcher.setup({ click: null });\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n click: function () {\n assert.ok(false, 'click method was called');\n },\n null: function () {\n assert.ok(false, 'null method was called');\n },\n doubleClick: function () {\n assert.ok(true, 'a non-disabled event is still handled properly');\n }\n }),\n\n template: '
Hello!
'\n });\n\n this.render('{{x-foo}}');\n\n this.$('div').trigger('click');\n this.$('div').trigger('dblclick');\n };\n\n _class2.prototype['@test throws if specified rootElement does not exist'] = function testThrowsIfSpecifiedRootElementDoesNotExist(assert) {\n var _this8 = this;\n\n assert.throws(function () {\n _this8.dispatcher.setup({ myevent: 'myEvent' }, '#app');\n });\n };\n\n return _class2;\n }(_testCase.RenderingTest));\n\n (0, _testCase.moduleFor)('custom EventDispatcher subclass with #setup', function (_RenderingTest3) {\n (0, _emberBabel.inherits)(_class3, _RenderingTest3);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n\n var _this9 = (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest3.call(this));\n\n var dispatcher = _this9.owner.lookup('event_dispatcher:main');\n (0, _emberMetal.run)(dispatcher, 'destroy');\n _this9.owner.__container__.reset('event_dispatcher:main');\n _this9.owner.unregister('event_dispatcher:main');\n return _this9;\n }\n\n _class3.prototype['@test canDispatchToEventManager is deprecated in EventDispatcher'] = function testCanDispatchToEventManagerIsDeprecatedInEventDispatcher(assert) {\n var MyDispatcher = _emberViews.EventDispatcher.extend({\n canDispatchToEventManager: null\n });\n this.owner.register('event_dispatcher:main', MyDispatcher);\n\n expectDeprecation(/`canDispatchToEventManager` has been deprecated/);\n this.owner.lookup('event_dispatcher:main');\n };\n\n return _class3;\n }(_testCase.RenderingTest));\n\n if (_features.EMBER_IMPROVED_INSTRUMENTATION) {\n (0, _testCase.moduleFor)('EventDispatcher - Instrumentation', function (_RenderingTest4) {\n (0, _emberBabel.inherits)(_class4, _RenderingTest4);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest4.apply(this, arguments));\n }\n\n _class4.prototype.teardown = function teardown() {\n _RenderingTest4.prototype.teardown.call(this);\n (0, _emberMetal.instrumentationReset)();\n };\n\n _class4.prototype['@test instruments triggered events'] = function testInstrumentsTriggeredEvents(assert) {\n var clicked = 0;\n\n this.registerComponent('x-foo', {\n ComponentClass: _helpers.Component.extend({\n click: function (evt) {\n clicked++;\n }\n }),\n template: '
{{render \\'home\\'}}');\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('HIBYE');\n };\n\n _class.prototype['@test uses `controller:basic` as the basis for a generated controller when none exists for specified name'] = function testUsesControllerBasicAsTheBasisForAGeneratedControllerWhenNoneExistsForSpecifiedName() {\n var _this3 = this;\n\n this.owner.register('controller:basic', _emberRuntime.Controller.extend({\n isBasicController: true\n }));\n this.registerTemplate('home', '{{isBasicController}}');\n\n expectDeprecation(function () {\n _this3.render('{{render \\'home\\'}}');\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('true');\n };\n\n _class.prototype['@test generates a controller if none exists'] = function testGeneratesAControllerIfNoneExists() {\n var _this4 = this;\n\n this.registerTemplate('home', '
{{render \\'home\\'}}');\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('HI(generated home controller)');\n };\n\n _class.prototype['@test should use controller with the same name as template if present'] = function testShouldUseControllerWithTheSameNameAsTemplateIfPresent() {\n var _this5 = this;\n\n this.owner.register('controller:home', _emberRuntime.Controller.extend({ name: 'home' }));\n this.registerTemplate('home', '{{name}}
{{render \\'foo\\'}}');\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('HIFOOBARBAZ');\n };\n\n _class.prototype['@test should have assertion if the template does not exist'] = function testShouldHaveAssertionIfTheTemplateDoesNotExist() {\n var _this7 = this;\n\n this.owner.register('controller:oops', _emberRuntime.Controller.extend());\n\n expectDeprecation(function () {\n expectAssertion(function () {\n _this7.render('
HI
{{render \\'oops\\'}}');\n }, 'You used `{{render \\'oops\\'}}`, but \\'oops\\' can not be found as a template.');\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n };\n\n _class.prototype['@test should render given template with the singleton controller as its context'] = function testShouldRenderGivenTemplateWithTheSingletonControllerAsItsContext() {\n var _this8 = this;\n\n this.owner.register('controller:post', _emberRuntime.Controller.extend({\n init: function () {\n this.set('title', 'It\\'s Simple Made Easy');\n }\n }));\n this.registerTemplate('post', '
{{render \\'post\\' post}}', {\n post: {\n title: 'It\\'s Simple Made Easy'\n }\n });\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('HIIt\\'s Simple Made Easy');\n\n this.runTask(function () {\n return _this10.rerender();\n });\n\n this.assertText('HIIt\\'s Simple Made Easy');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this10.context, 'post.title', 'Rails is omakase');\n });\n\n this.assertText('HIRails is omakase');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this10.context, 'post', { title: 'It\\'s Simple Made Easy' });\n });\n\n this.assertText('HIIt\\'s Simple Made Easy');\n };\n\n _class.prototype['@test should destroy the non-singleton controllers on teardown'] = function testShouldDestroyTheNonSingletonControllersOnTeardown(assert) {\n var _this11 = this;\n\n var willDestroyFired = 0;\n\n this.owner.register('controller:post', _emberRuntime.Controller.extend({\n willDestroy: function () {\n this._super.apply(this, arguments);\n willDestroyFired++;\n }\n }));\n\n this.registerTemplate('post', '
{{model.title}}
');\n\n expectDeprecation(function () {\n _this11.render('{{#if showPost}}{{render \\'post\\' post}}{{else}}Nothing here{{/if}}', {\n showPost: false,\n post: {\n title: 'It\\'s Simple Made Easy'\n }\n });\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('Nothing here');\n\n assert.strictEqual(willDestroyFired, 0, 'it did not destroy the controller');\n\n this.runTask(function () {\n return _this11.rerender();\n });\n\n this.assertText('Nothing here');\n\n assert.strictEqual(willDestroyFired, 0, 'it did not destroy the controller');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'showPost', true);\n });\n\n this.assertText('It\\'s Simple Made Easy');\n\n assert.strictEqual(willDestroyFired, 0, 'it did not destroy the controller');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'showPost', false);\n });\n\n this.assertText('Nothing here');\n\n assert.strictEqual(willDestroyFired, 1, 'it did destroy the controller');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'showPost', true);\n });\n\n this.assertText('It\\'s Simple Made Easy');\n\n assert.strictEqual(willDestroyFired, 1, 'it did not destroy the controller');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'showPost', false);\n });\n\n this.assertText('Nothing here');\n\n assert.strictEqual(willDestroyFired, 2, 'it did destroy the controller');\n };\n\n _class.prototype['@test with a supplied model should not fire observers on the controller'] = function testWithASuppliedModelShouldNotFireObserversOnTheController() {\n var _this12 = this;\n\n this.owner.register('controller:post', _emberRuntime.Controller.extend());\n this.registerTemplate('post', '
{{model.title}}
');\n\n var postDidChange = 0;\n expectDeprecation(function () {\n _this12.render('
HI
{{render \\'post\\' post}}', {\n postDidChange: (0, _emberMetal.observer)('post', function () {\n postDidChange++;\n }),\n post: {\n title: 'It\\'s Simple Made Easy'\n }\n });\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('HIIt\\'s Simple Made Easy');\n\n this.runTask(function () {\n return _this12.rerender();\n });\n\n this.assertText('HIIt\\'s Simple Made Easy');\n };\n\n _class.prototype['@test should raise an error when a given controller name does not resolve to a controller'] = function testShouldRaiseAnErrorWhenAGivenControllerNameDoesNotResolveToAController() {\n var _this13 = this;\n\n this.registerTemplate('home', '
{{render \"home\" controller=\"postss\"}}');\n }, /The controller name you supplied \\'postss\\' did not resolve to a controller./);\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n };\n\n _class.prototype['@test should render with given controller'] = function testShouldRenderWithGivenController(assert) {\n var _this14 = this;\n\n this.registerTemplate('home', '{{uniqueId}}');\n\n var id = 0;\n var model = {};\n\n this.owner.register('controller:posts', _emberRuntime.Controller.extend({\n init: function () {\n this._super.apply(this, arguments);\n this.uniqueId = id++;\n this.set('model', model);\n }\n }));\n\n expectDeprecation(function () {\n _this14.render('{{render \"home\" controller=\"posts\"}}');\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n var renderedController = this.owner.lookup('controller:posts');\n var uniqueId = renderedController.get('uniqueId');\n var renderedModel = renderedController.get('model');\n\n assert.equal(uniqueId, 0);\n assert.equal(renderedModel, model);\n this.assertText('0');\n\n this.runTask(function () {\n return _this14.rerender();\n });\n\n assert.equal(uniqueId, 0);\n assert.equal(renderedModel, model);\n this.assertText('0');\n };\n\n _class.prototype['@test should render templates with models multiple times'] = function testShouldRenderTemplatesWithModelsMultipleTimes(assert) {\n var _this15 = this;\n\n this.owner.register('controller:post', _emberRuntime.Controller.extend());\n\n this.registerTemplate('post', '
{{render \\'post\\' post1}} {{render \\'post\\' post2}}', {\n post1: {\n title: 'Me First'\n },\n post2: {\n title: 'Then me'\n }\n });\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n this.assertText('HI Me First Then me');\n\n this.runTask(function () {\n return _this15.rerender();\n });\n\n this.assertText('HI Me First Then me');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'post1.title', 'I am new');\n });\n\n this.assertText('HI I am new Then me');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this15.context, 'post1', { title: 'Me First' });\n });\n\n this.assertText('HI Me First Then me');\n };\n\n _class.prototype['@test should not treat invocations with falsy contexts as context-less'] = function testShouldNotTreatInvocationsWithFalsyContextsAsContextLess(assert) {\n var _this16 = this;\n\n this.registerTemplate('post', '
{{render \\'post\\' zero}} {{render \\'post\\' nonexistent}}', {\n model: {\n zero: false\n }\n });\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n assert.ok(this.$().text().match(/^HI ?NOTHING ?NOTHING$/));\n };\n\n _class.prototype['@test should render templates both with and without models'] = function testShouldRenderTemplatesBothWithAndWithoutModels(assert) {\n var _this17 = this;\n\n this.registerTemplate('post', '
Title:{{model.title}}
');\n this.owner.register('controller:post', _emberRuntime.Controller.extend());\n\n var post = {\n title: 'Rails is omakase'\n };\n expectDeprecation(function () {\n _this17.render('
HI
{{render \\'post\\'}} {{render \\'post\\' post}}', {\n post: post\n });\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n assert.ok(this.$().text().match(/^HI ?Title: ?Title:Rails is omakase$/));\n\n this.runTask(function () {\n return _this17.rerender();\n });\n\n assert.ok(this.$().text().match(/^HI ?Title: ?Title:Rails is omakase$/));\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'post.title', 'Simple Made Easy');\n });\n\n assert.ok(this.$().text().match(/^HI ?Title: ?Title:Simple Made Easy$/));\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this17.context, 'post', { title: 'Rails is omakase' });\n });\n\n assert.ok(this.$().text().match(/^HI ?Title: ?Title:Rails is omakase$/));\n };\n\n _class.prototype['@test works with dot notation'] = function testWorksWithDotNotation() {\n var _this18 = this;\n\n this.registerTemplate('blog.post', '{{uniqueId}}');\n\n var id = 0;\n this.owner.register('controller:blog.post', _emberRuntime.Controller.extend({\n init: function () {\n this._super.apply(this, arguments);\n this.uniqueId = id++;\n }\n }));\n\n expectDeprecation(function () {\n _this18.render('{{render \"blog.post\"}}');\n }, /Please refactor [\\w\\.{\\}\"` ]+ to a component/);\n\n this.assertText('0');\n };\n\n _class.prototype['@test throws an assertion if called with an unquoted template name'] = function testThrowsAnAssertionIfCalledWithAnUnquotedTemplateName() {\n var _this19 = this;\n\n this.registerTemplate('home', '
{{render home}}');\n }, 'The first argument of {{render}} must be quoted, e.g. {{render \"sidebar\"}}.');\n };\n\n _class.prototype['@test throws an assertion if called with a literal for a model'] = function testThrowsAnAssertionIfCalledWithALiteralForAModel() {\n var _this20 = this;\n\n this.registerTemplate('home', '
{{/with}}' });\n\n this.render('{{#kiwi-comp}}{{item}}{{/kiwi-comp}}', { item: 'Outer' });\n this.assertText('InnerOuter');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'item', 'Otherworld');\n });\n this.assertText('InnerOtherworld');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this11.context, 'item', 'Outer');\n });\n this.assertText('InnerOuter');\n };\n\n _class.prototype['@test can bind a block param to a component and use it in yield'] = function testCanBindABlockParamToAComponentAndUseItInYield() {\n var _this12 = this;\n\n this.registerComponent('kiwi-comp', { template: '
{{content}}
{{yield}}
' });\n\n this.render('{{#with boundText as |item|}}{{#kiwi-comp content=item}}{{item}}{{/kiwi-comp}}{{/with}}', { boundText: 'Outer' });\n this.assertText('OuterOuter');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this12.context, 'boundText', 'Update');\n });\n this.assertText('UpdateUpdate');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this12.context, 'boundText', 'Outer');\n });\n this.assertText('OuterOuter');\n };\n\n _class.prototype['@test yield should not introduce a view'] = function testYieldShouldNotIntroduceAView() {\n var ParentCompComponent = _helpers.Component.extend({ isParentComponent: true });\n\n var ChildCompComponent = _helpers.Component.extend({\n didReceiveAttrs: function () {\n this._super();\n var parentView = this.get('parentView');\n\n ok(parentView.get('isParentComponent'));\n }\n });\n\n this.registerComponent('parent-comp', { ComponentClass: ParentCompComponent, template: '{{yield}}' });\n this.registerComponent('child-comp', { ComponentClass: ChildCompComponent });\n\n this.render('{{#parent-comp}}{{child-comp}}{{/parent-comp}}');\n };\n\n _class.prototype['@test yield with nested components (#3220)'] = function testYieldWithNestedComponents3220() {\n var _this13 = this;\n\n this.registerComponent('inner-component', { template: '{{yield}}' });\n this.registerComponent('outer-component', { template: '{{#inner-component}}{{yield}}{{/inner-component}}' });\n\n this.render('{{#outer-component}}Hello {{boundText}}{{/outer-component}}', { boundText: 'world' });\n this.assertText('Hello world');\n\n this.assertStableRerender();\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this13.context, 'boundText', 'update');\n });\n this.assertText('Hello update');\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this13.context, 'boundText', 'world');\n });\n this.assertText('Hello world');\n };\n\n return _class;\n }(_testCase.RenderingTest));\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/helpers/yield-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/helpers/yield-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/input-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-metal'], function (_emberBabel, _testCase, _emberMetal) {\n 'use strict';\n\n (0, _testCase.moduleFor)('Input element tests', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype.runAttributeTest = function runAttributeTest(attributeName, values) {\n var _this2 = this;\n\n var template = '';\n this.render(template, { value: values[0] });\n this.assertAttributeHasValue(attributeName, values[0], attributeName + ' is set on initial render');\n\n this.runTask(function () {\n return _this2.rerender();\n });\n this.assertAttributeHasValue(attributeName, values[0], attributeName + ' is set on noop rerender');\n\n this.setComponentValue(values[1]);\n this.assertAttributeHasValue(attributeName, values[1], attributeName + ' is set on rerender');\n\n this.setComponentValue(values[0]);\n this.assertAttributeHasValue(attributeName, values[0], attributeName + ' can be set back to the initial value');\n };\n\n _class.prototype.runPropertyTest = function runPropertyTest(propertyName, values) {\n var _this3 = this;\n\n var attributeName = propertyName;\n var template = '';\n this.render(template, { value: values[0] });\n this.assertPropertyHasValue(propertyName, values[0], propertyName + ' is set on initial render');\n\n this.runTask(function () {\n return _this3.rerender();\n });\n this.assertPropertyHasValue(propertyName, values[0], propertyName + ' is set on noop rerender');\n\n this.setComponentValue(values[1]);\n this.assertPropertyHasValue(propertyName, values[1], propertyName + ' is set on rerender');\n\n this.setComponentValue(values[0]);\n this.assertPropertyHasValue(propertyName, values[0], propertyName + ' can be set back to the initial value');\n };\n\n _class.prototype.runFalsyValueProperty = function runFalsyValueProperty(values) {\n var _this4 = this;\n\n var value = 'value';\n var template = '';\n this.render(template, { value: values[0] });\n this.assertPropertyHasValue(value, '', value + ' is set on initial render');\n\n this.runTask(function () {\n return _this4.rerender();\n });\n this.assertPropertyHasValue(value, '', value + ' is set on noop rerender');\n this.setComponentValue(values[1]);\n\n this.assertPropertyHasValue(value, values[1], value + ' is set on rerender');\n\n this.setComponentValue(values[0]);\n this.assertPropertyHasValue(value, '', value + ' can be set back to the initial value');\n };\n\n _class.prototype['@test input disabled attribute'] = function testInputDisabledAttribute() {\n var _this5 = this;\n\n var model = { model: { value: false } };\n\n this.render('', model);\n\n this.assert.equal(this.$inputElement().prop('disabled'), false);\n\n this.runTask(function () {\n return _this5.rerender();\n });\n\n this.assert.equal(this.$inputElement().prop('disabled'), false);\n\n this.runTask(function () {\n return _this5.context.set('model.value', true);\n });\n\n this.assert.equal(this.$inputElement().prop('disabled'), true);\n this.assertHTML(''); // Note the DOM output is \n\n this.runTask(function () {\n return _this5.context.set('model.value', 'wat');\n });\n\n this.assert.equal(this.$inputElement().prop('disabled'), true);\n this.assertHTML(''); // Note the DOM output is \n\n this.runTask(function () {\n return _this5.context.set('model', { value: false });\n });\n\n this.assert.equal(this.$inputElement().prop('disabled'), false);\n this.assertHTML('');\n };\n\n _class.prototype['@test input value attribute'] = function testInputValueAttribute() {\n this.runPropertyTest('value', ['foo', 'bar']);\n };\n\n _class.prototype['@test input placeholder attribute'] = function testInputPlaceholderAttribute() {\n this.runAttributeTest('placeholder', ['foo', 'bar']);\n };\n\n _class.prototype['@test input name attribute'] = function testInputNameAttribute() {\n this.runAttributeTest('name', ['nam', 'name']);\n };\n\n _class.prototype['@test input maxlength attribute'] = function testInputMaxlengthAttribute() {\n this.runAttributeTest('maxlength', [2, 3]);\n };\n\n _class.prototype['@test input size attribute'] = function testInputSizeAttribute() {\n this.runAttributeTest('size', [2, 3]);\n };\n\n _class.prototype['@test input tabindex attribute'] = function testInputTabindexAttribute() {\n this.runAttributeTest('tabindex', [2, 3]);\n };\n\n _class.prototype['@test null input value'] = function testNullInputValue() {\n this.runFalsyValueProperty([null, 'hello']);\n };\n\n _class.prototype['@test undefined input value'] = function testUndefinedInputValue() {\n this.runFalsyValueProperty([undefined, 'hello']);\n };\n\n _class.prototype['@test undefined `toString` method as input value'] = function testUndefinedToStringMethodAsInputValue() {\n this.runFalsyValueProperty([Object.create(null), 'hello']);\n };\n\n _class.prototype['@test cursor position is not lost when updating content'] = function testCursorPositionIsNotLostWhenUpdatingContent() {\n var template = '';\n this.render(template, { value: 'hola' });\n\n this.setDOMValue('hello');\n this.setSelectionRange(1, 3);\n\n this.setComponentValue('hello');\n\n this.assertSelectionRange(1, 3);\n\n // Note: We should eventually get around to testing reseting, however\n // browsers handle `selectionStart` and `selectionEnd` differently\n // when are synthetically testing movement of the cursor.\n };\n\n _class.prototype['@test input can be updated multiple times'] = function testInputCanBeUpdatedMultipleTimes() {\n var template = '';\n this.render(template, { value: 'hola' });\n\n this.assertValue('hola', 'Value is initialised');\n\n this.setComponentValue('');\n this.assertValue('', 'Value is set in the DOM');\n\n this.setDOMValue('hola');\n this.setComponentValue('hola');\n this.assertValue('hola', 'Value is updated the first time');\n\n this.setComponentValue('');\n this.assertValue('', 'Value is updated the second time');\n };\n\n _class.prototype['@test DOM is SSOT if value is set'] = function testDOMIsSSOTIfValueIsSet() {\n var template = '';\n this.render(template, { value: 'hola' });\n\n this.assertValue('hola', 'Value is initialised');\n\n this.setComponentValue('hello');\n\n this.assertValue('hello', 'Value is initialised');\n\n this.setDOMValue('hola');\n\n this.assertValue('hola', 'DOM is used');\n\n this.setComponentValue('bye');\n\n this.assertValue('bye', 'Value is used');\n\n // Simulates setting the input to the same value as it already is which won't cause a rerender\n\n this.setDOMValue('hola');\n\n this.assertValue('hola', 'DOM is used');\n\n this.setComponentValue('hola');\n\n this.assertValue('hola', 'Value is used');\n };\n\n _class.prototype.setDOMValue = function setDOMValue(value) {\n this.inputElement().value = value;\n };\n\n _class.prototype.setComponentValue = function setComponentValue(value) {\n var _this6 = this;\n\n this.runTask(function () {\n return (0, _emberMetal.set)(_this6.context, 'value', value);\n });\n };\n\n _class.prototype.setSelectionRange = function setSelectionRange(start, end) {\n this.inputElement().selectionStart = start;\n this.inputElement().selectionEnd = end;\n };\n\n _class.prototype.inputElement = function inputElement() {\n return this.$inputElement()[0];\n };\n\n _class.prototype.$inputElement = function $inputElement() {\n return this.$('input');\n };\n\n _class.prototype.assertValue = function assertValue(value, message) {\n this.assertPropertyHasValue('value', value, message);\n };\n\n _class.prototype.assertAttributeHasValue = function assertAttributeHasValue(attribute, value, message) {\n this.assert.equal(this.$inputElement().attr(attribute), value, attribute + ' ' + message);\n };\n\n _class.prototype.assertPropertyHasValue = function assertPropertyHasValue(property, value, message) {\n this.assert.equal(this.$inputElement().prop(property), value, property + ' ' + message);\n };\n\n _class.prototype.assertSelectionRange = function assertSelectionRange(start, end) {\n this.assert.equal(this.inputElement().selectionStart, start);\n this.assert.equal(this.inputElement().selectionEnd, end);\n };\n\n return _class;\n }(_testCase.RenderingTest));\n});","QUnit.module('ESLint | ember-glimmer/tests/integration/input-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-glimmer/tests/integration/input-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-glimmer/tests/integration/mount-test', ['ember-babel', 'ember-utils', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/helpers', 'ember-runtime', 'ember-metal', 'ember-application', 'ember/features'], function (_emberBabel, _emberUtils, _testCase, _helpers, _emberRuntime, _emberMetal, _emberApplication, _features) {\n 'use strict';\n\n if (_features.EMBER_ENGINES_MOUNT_PARAMS) {\n (0, _testCase.moduleFor)('{{mount}} single param assertion', function (_RenderingTest) {\n (0, _emberBabel.inherits)(_class, _RenderingTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));\n }\n\n _class.prototype['@test it asserts that only a single param is passed'] = function testItAssertsThatOnlyASingleParamIsPassed() {\n var _this2 = this;\n\n expectAssertion(function () {\n _this2.render('{{mount \"chat\" \"foo\"}}');\n }, /You can only pass a single positional argument to the {{mount}} helper, e.g. {{mount \"chat-engine\"}}./i);\n };\n\n return _class;\n }(_testCase.RenderingTest));\n } else {\n (0, _testCase.moduleFor)('{{mount}} single param assertion', function (_RenderingTest2) {\n (0, _emberBabel.inherits)(_class2, _RenderingTest2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest2.apply(this, arguments));\n }\n\n _class2.prototype['@test it asserts that only a single param is passed'] = function testItAssertsThatOnlyASingleParamIsPassed() {\n var _this4 = this;\n\n expectAssertion(function () {\n _this4.render('{{mount \"chat\" \"foo\"}}');\n }, /You can only pass a single argument to the {{mount}} helper, e.g. {{mount \"chat-engine\"}}./i);\n };\n\n return _class2;\n }(_testCase.RenderingTest));\n }\n\n (0, _testCase.moduleFor)('{{mount}} assertions', function (_RenderingTest3) {\n (0, _emberBabel.inherits)(_class3, _RenderingTest3);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest3.apply(this, arguments));\n }\n\n _class3.prototype['@test it asserts when an invalid engine name is provided'] = function testItAssertsWhenAnInvalidEngineNameIsProvided() {\n var _this6 = this;\n\n expectAssertion(function () {\n _this6.render('{{mount engineName}}', { engineName: {} });\n }, /Invalid engine name '\\[object Object\\]' specified, engine name must be either a string, null or undefined./i);\n };\n\n _class3.prototype['@test it asserts that the specified engine is registered'] = function testItAssertsThatTheSpecifiedEngineIsRegistered() {\n var _this7 = this;\n\n expectAssertion(function () {\n _this7.render('{{mount \"chat\"}}');\n }, /You used `{{mount 'chat'}}`, but the engine 'chat' can not be found./i);\n };\n\n return _class3;\n }(_testCase.RenderingTest));\n\n (0, _testCase.moduleFor)('{{mount}} test', function (_ApplicationTest) {\n (0, _emberBabel.inherits)(_class4, _ApplicationTest);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n\n var _this8 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTest.call(this));\n\n var engineRegistrations = _this8.engineRegistrations = {};\n\n _this8.add('engine:chat', _emberApplication.Engine.extend({\n router: null,\n\n init: function () {\n var _this9 = this;\n\n this._super.apply(this, arguments);\n\n Object.keys(engineRegistrations).forEach(function (fullName) {\n _this9.register(fullName, engineRegistrations[fullName]);\n });\n }\n }));\n\n _this8.addTemplate('index', '{{mount \"chat\"}}');\n return _this8;\n }\n\n _class4.prototype['@test it boots an engine, instantiates its application controller, and renders its application template'] = function testItBootsAnEngineInstantiatesItsApplicationControllerAndRendersItsApplicationTemplate(assert) {\n var _this10 = this;\n\n this.engineRegistrations['template:application'] = (0, _helpers.compile)('
Chat here, {{username}}
', { moduleName: 'application' });\n\n var controller = void 0;\n\n this.engineRegistrations['controller:application'] = _emberRuntime.Controller.extend({\n username: 'dgeb',\n\n init: function () {\n this._super();\n controller = this;\n }\n });\n\n return this.visit('/').then(function () {\n assert.ok(controller, 'engine\\'s application controller has been instantiated');\n\n var engineInstance = (0, _emberUtils.getOwner)(controller);\n assert.strictEqual((0, _emberApplication.getEngineParent)(engineInstance), _this10.applicationInstance, 'engine instance has the application instance as its parent');\n\n _this10.assertComponentElement(_this10.firstChild, { content: '
\\n ');\n this.addTemplate('index', '{{index-wrapper}}');\n\n this.runTask(function () {\n _this28.application.advanceReadiness();\n });\n\n var _application$testHelp10 = this.application.testHelpers,\n wait = _application$testHelp10.wait,\n triggerEvent = _application$testHelp10.triggerEvent;\n\n return wait().then(function () {\n return triggerEvent('.input', '#limited', 'keydown', { keyCode: 13 });\n }).then(function () {\n assert.equal(event.keyCode, 13, 'options were passed');\n assert.equal(event.type, 'keydown', 'correct event was triggered');\n assert.equal(event.target.getAttribute('id'), 'inside-scope', 'triggered on the correct element');\n });\n };\n\n return _class2;\n }(HelpersApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('ember-testing: debugging helpers', function (_HelpersApplicationTe2) {\n (0, _emberBabel.inherits)(_class3, _HelpersApplicationTe2);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n\n var _this29 = (0, _emberBabel.possibleConstructorReturn)(this, _HelpersApplicationTe2.call(this));\n\n _this29.runTask(function () {\n _this29.application.advanceReadiness();\n });\n return _this29;\n }\n\n _class3.prototype['@test pauseTest pauses'] = function (assert) {\n assert.expect(1);\n\n var _application$testHelp11 = this.application.testHelpers,\n andThen = _application$testHelp11.andThen,\n pauseTest = _application$testHelp11.pauseTest;\n\n andThen(function () {\n _test.default.adapter.asyncStart = function () {\n assert.ok(true, 'Async start should be called after waiting for other helpers');\n };\n });\n\n pauseTest();\n };\n\n _class3.prototype['@test resumeTest resumes paused tests'] = function (assert) {\n assert.expect(1);\n\n var _application$testHelp12 = this.application.testHelpers,\n pauseTest = _application$testHelp12.pauseTest,\n resumeTest = _application$testHelp12.resumeTest;\n\n\n _emberMetal.run.later(function () {\n return resumeTest();\n }, 20);\n return pauseTest().then(function () {\n assert.ok(true, 'pauseTest promise was resolved');\n });\n };\n\n _class3.prototype['@test resumeTest throws if nothing to resume'] = function (assert) {\n var _this30 = this;\n\n assert.expect(1);\n\n assert.throws(function () {\n _this30.application.testHelpers.resumeTest();\n }, /Testing has not been paused. There is nothing to resume./);\n };\n\n return _class3;\n }(HelpersApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('ember-testing: routing helpers', function (_HelpersTestCase3) {\n (0, _emberBabel.inherits)(_class4, _HelpersTestCase3);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n\n var _this31 = (0, _emberBabel.possibleConstructorReturn)(this, _HelpersTestCase3.call(this));\n\n _this31.runTask(function () {\n _this31.createApplication();\n _this31.application.setupForTesting();\n _this31.application.injectTestHelpers();\n _this31.router.map(function () {\n this.route('posts', { resetNamespace: true }, function () {\n this.route('new');\n this.route('edit', { resetNamespace: true });\n });\n });\n });\n _this31.runTask(function () {\n _this31.application.advanceReadiness();\n });\n return _this31;\n }\n\n _class4.prototype['@test currentRouteName for \\'/\\''] = function (assert) {\n assert.expect(3);\n\n var testHelpers = this.application.testHelpers;\n\n return testHelpers.visit('/').then(function () {\n assert.equal(testHelpers.currentRouteName(), 'index', 'should equal \\'index\\'.');\n assert.equal(testHelpers.currentPath(), 'index', 'should equal \\'index\\'.');\n assert.equal(testHelpers.currentURL(), '/', 'should equal \\'/\\'.');\n });\n };\n\n _class4.prototype['@test currentRouteName for \\'/posts\\''] = function (assert) {\n assert.expect(3);\n\n var testHelpers = this.application.testHelpers;\n\n return testHelpers.visit('/posts').then(function () {\n assert.equal(testHelpers.currentRouteName(), 'posts.index', 'should equal \\'posts.index\\'.');\n assert.equal(testHelpers.currentPath(), 'posts.index', 'should equal \\'posts.index\\'.');\n assert.equal(testHelpers.currentURL(), '/posts', 'should equal \\'/posts\\'.');\n });\n };\n\n _class4.prototype['@test currentRouteName for \\'/posts/new\\''] = function (assert) {\n assert.expect(3);\n\n var testHelpers = this.application.testHelpers;\n\n return testHelpers.visit('/posts/new').then(function () {\n assert.equal(testHelpers.currentRouteName(), 'posts.new', 'should equal \\'posts.new\\'.');\n assert.equal(testHelpers.currentPath(), 'posts.new', 'should equal \\'posts.new\\'.');\n assert.equal(testHelpers.currentURL(), '/posts/new', 'should equal \\'/posts/new\\'.');\n });\n };\n\n _class4.prototype['@test currentRouteName for \\'/posts/edit\\''] = function (assert) {\n assert.expect(3);\n\n var testHelpers = this.application.testHelpers;\n\n return testHelpers.visit('/posts/edit').then(function () {\n assert.equal(testHelpers.currentRouteName(), 'edit', 'should equal \\'edit\\'.');\n assert.equal(testHelpers.currentPath(), 'posts.edit', 'should equal \\'posts.edit\\'.');\n assert.equal(testHelpers.currentURL(), '/posts/edit', 'should equal \\'/posts/edit\\'.');\n });\n };\n\n return _class4;\n }(HelpersTestCase));\n\n (0, _internalTestHelpers.moduleFor)('ember-testing: pendingRequests', function (_HelpersApplicationTe3) {\n (0, _emberBabel.inherits)(_class5, _HelpersApplicationTe3);\n\n function _class5() {\n (0, _emberBabel.classCallCheck)(this, _class5);\n return (0, _emberBabel.possibleConstructorReturn)(this, _HelpersApplicationTe3.apply(this, arguments));\n }\n\n _class5.prototype['@test pendingRequests is maintained for ajaxSend and ajaxComplete events'] = function (assert) {\n assert.equal((0, _pending_requests.pendingRequests)(), 0);\n\n var xhr = { some: 'xhr' };\n\n (0, _emberViews.jQuery)(document).trigger('ajaxSend', xhr);\n assert.equal((0, _pending_requests.pendingRequests)(), 1, 'Ember.Test.pendingRequests was incremented');\n\n (0, _emberViews.jQuery)(document).trigger('ajaxComplete', xhr);\n assert.equal((0, _pending_requests.pendingRequests)(), 0, 'Ember.Test.pendingRequests was decremented');\n };\n\n _class5.prototype['@test pendingRequests is ignores ajaxComplete events from past setupForTesting calls'] = function (assert) {\n assert.equal((0, _pending_requests.pendingRequests)(), 0);\n\n var xhr = { some: 'xhr' };\n\n (0, _emberViews.jQuery)(document).trigger('ajaxSend', xhr);\n assert.equal((0, _pending_requests.pendingRequests)(), 1, 'Ember.Test.pendingRequests was incremented');\n\n (0, _setup_for_testing.default)();\n\n assert.equal((0, _pending_requests.pendingRequests)(), 0, 'Ember.Test.pendingRequests was reset');\n\n var altXhr = { some: 'more xhr' };\n\n (0, _emberViews.jQuery)(document).trigger('ajaxSend', altXhr);\n assert.equal((0, _pending_requests.pendingRequests)(), 1, 'Ember.Test.pendingRequests was incremented');\n\n (0, _emberViews.jQuery)(document).trigger('ajaxComplete', xhr);\n assert.equal((0, _pending_requests.pendingRequests)(), 1, 'Ember.Test.pendingRequests is not impressed with your unexpected complete');\n };\n\n _class5.prototype['@test pendingRequests is reset by setupForTesting'] = function (assert) {\n (0, _pending_requests.incrementPendingRequests)();\n\n (0, _setup_for_testing.default)();\n\n assert.equal((0, _pending_requests.pendingRequests)(), 0, 'pendingRequests is reset');\n };\n\n return _class5;\n }(HelpersApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('ember-testing: async router', function (_HelpersTestCase4) {\n (0, _emberBabel.inherits)(_class6, _HelpersTestCase4);\n\n function _class6() {\n (0, _emberBabel.classCallCheck)(this, _class6);\n\n var _this33 = (0, _emberBabel.possibleConstructorReturn)(this, _HelpersTestCase4.call(this));\n\n _this33.runTask(function () {\n _this33.createApplication();\n\n _this33.router.map(function () {\n this.route('user', { resetNamespace: true }, function () {\n this.route('profile');\n this.route('edit');\n });\n });\n\n // Emulate a long-running unscheduled async operation.\n var resolveLater = function () {\n return new _emberRuntime.RSVP.Promise(function (resolve) {\n /*\n * The wait() helper has a 10ms tick. We should resolve() after\n * at least one tick to test whether wait() held off while the\n * async router was still loading. 20ms should be enough.\n */\n _emberMetal.run.later(resolve, { firstName: 'Tom' }, 20);\n });\n };\n\n _this33.add('route:user', _emberRouting.Route.extend({\n model: function () {\n return resolveLater();\n }\n }));\n\n _this33.add('route:user.profile', _emberRouting.Route.extend({\n beforeModel: function () {\n var _this34 = this;\n\n return resolveLater().then(function () {\n return _this34.transitionTo('user.edit');\n });\n }\n }));\n\n _this33.application.setupForTesting();\n });\n\n _this33.application.injectTestHelpers();\n _this33.runTask(function () {\n _this33.application.advanceReadiness();\n });\n return _this33;\n }\n\n _class6.prototype['@test currentRouteName for \\'/user\\''] = function (assert) {\n var _this35 = this;\n\n assert.expect(4);\n\n var testHelpers = this.application.testHelpers;\n\n return testHelpers.visit('/user').then(function () {\n assert.equal(testHelpers.currentRouteName(), 'user.index', 'should equal \\'user.index\\'.');\n assert.equal(testHelpers.currentPath(), 'user.index', 'should equal \\'user.index\\'.');\n assert.equal(testHelpers.currentURL(), '/user', 'should equal \\'/user\\'.');\n var userRoute = _this35.applicationInstance.lookup('route:user');\n assert.equal(userRoute.get('controller.model.firstName'), 'Tom', 'should equal \\'Tom\\'.');\n });\n };\n\n _class6.prototype['@test currentRouteName for \\'/user/profile\\''] = function (assert) {\n var _this36 = this;\n\n assert.expect(4);\n\n var testHelpers = this.application.testHelpers;\n\n return testHelpers.visit('/user/profile').then(function () {\n assert.equal(testHelpers.currentRouteName(), 'user.edit', 'should equal \\'user.edit\\'.');\n assert.equal(testHelpers.currentPath(), 'user.edit', 'should equal \\'user.edit\\'.');\n assert.equal(testHelpers.currentURL(), '/user/edit', 'should equal \\'/user/edit\\'.');\n var userRoute = _this36.applicationInstance.lookup('route:user');\n assert.equal(userRoute.get('controller.model.firstName'), 'Tom', 'should equal \\'Tom\\'.');\n });\n };\n\n return _class6;\n }(HelpersTestCase));\n\n (0, _internalTestHelpers.moduleFor)('ember-testing: can override built-in helpers', function (_HelpersTestCase5) {\n (0, _emberBabel.inherits)(_class7, _HelpersTestCase5);\n\n function _class7() {\n (0, _emberBabel.classCallCheck)(this, _class7);\n\n var _this37 = (0, _emberBabel.possibleConstructorReturn)(this, _HelpersTestCase5.call(this));\n\n _this37.runTask(function () {\n _this37.createApplication();\n _this37.application.setupForTesting();\n });\n _this37._originalVisitHelper = _test.default._helpers.visit;\n _this37._originalFindHelper = _test.default._helpers.find;\n return _this37;\n }\n\n _class7.prototype.teardown = function teardown() {\n _test.default._helpers.visit = this._originalVisitHelper;\n _test.default._helpers.find = this._originalFindHelper;\n _HelpersTestCase5.prototype.teardown.call(this);\n };\n\n _class7.prototype['@test can override visit helper'] = function (assert) {\n assert.expect(1);\n\n _test.default.registerHelper('visit', function () {\n assert.ok(true, 'custom visit helper was called');\n });\n\n this.application.injectTestHelpers();\n\n return this.application.testHelpers.visit();\n };\n\n _class7.prototype['@test can override find helper'] = function (assert) {\n assert.expect(1);\n\n _test.default.registerHelper('find', function () {\n assert.ok(true, 'custom find helper was called');\n\n return ['not empty array'];\n });\n\n this.application.injectTestHelpers();\n\n return this.application.testHelpers.findWithAssert('.who-cares');\n };\n\n return _class7;\n }(HelpersTestCase));\n});","QUnit.module('ESLint | ember-testing/tests/helpers_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-testing/tests/helpers_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-testing/tests/integration_test', ['ember-babel', 'internal-test-helpers', 'ember-testing/test', 'ember-runtime', 'ember-routing'], function (_emberBabel, _internalTestHelpers, _test, _emberRuntime, _emberRouting) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('ember-testing Integration tests of acceptance', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class, _AutobootApplicationT);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.call(this));\n\n _this.modelContent = [];\n _this._originalAdapter = _test.default.adapter;\n\n _this.runTask(function () {\n _this.createApplication();\n\n _this.addTemplate('people', '\\n
\\n {{#each model as |person|}}\\n
{{person.firstName}}
\\n {{/each}}\\n
\\n ');\n\n _this.router.map(function () {\n this.route('people', { path: '/' });\n });\n\n _this.add('route:people', _emberRouting.Route.extend({\n model: function () {\n return _this.modelContent;\n }\n }));\n\n _this.application.setupForTesting();\n });\n\n _this.runTask(function () {\n _this.application.reset();\n });\n\n _this.application.injectTestHelpers();\n return _this;\n }\n\n _class.prototype.teardown = function teardown() {\n _AutobootApplicationT.prototype.teardown.call(this);\n _test.default.adapter = this._originalAdapter;\n };\n\n _class.prototype['@test template is bound to empty array of people'] = function (assert) {\n var _this2 = this;\n\n this.runTask(function () {\n return _this2.application.advanceReadiness();\n });\n window.visit('/').then(function () {\n var rows = window.find('.name').length;\n assert.equal(rows, 0, 'successfully stubbed an empty array of people');\n });\n };\n\n _class.prototype['@test template is bound to array of 2 people'] = function (assert) {\n var _this3 = this;\n\n this.modelContent = (0, _emberRuntime.A)([]);\n this.modelContent.pushObject({ firstName: 'x' });\n this.modelContent.pushObject({ firstName: 'y' });\n\n this.runTask(function () {\n return _this3.application.advanceReadiness();\n });\n window.visit('/').then(function () {\n var rows = window.find('.name').length;\n assert.equal(rows, 2, 'successfully stubbed a non empty array of people');\n });\n };\n\n _class.prototype['@test \\'visit\\' can be called without advanceReadiness.'] = function (assert) {\n window.visit('/').then(function () {\n var rows = window.find('.name').length;\n assert.equal(rows, 0, 'stubbed an empty array of people without calling advanceReadiness.');\n });\n };\n\n return _class;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember-testing/tests/integration_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-testing/tests/integration_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-testing/tests/reexports_test', ['ember', 'internal-test-helpers'], function (_ember, _internalTestHelpers) {\n 'use strict';\n\n QUnit.module('ember-testing reexports');\n\n [\n // ember-testing\n ['Test', 'ember-testing'], ['Test.Adapter', 'ember-testing', 'Adapter'], ['Test.QUnitAdapter', 'ember-testing', 'QUnitAdapter'], ['setupForTesting', 'ember-testing']].forEach(function (reexport) {\n var path = reexport[0],\n moduleId = reexport[1],\n exportName = reexport[2];\n\n\n // default path === exportName if none present\n if (!exportName) {\n exportName = path;\n }\n\n QUnit.test('Ember.' + path + ' exports correctly', function (assert) {\n (0, _internalTestHelpers.confirmExport)(_ember.default, assert, path, moduleId, exportName);\n });\n });\n});","QUnit.module('ESLint | ember-testing/tests/reexports_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-testing/tests/reexports_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-testing/tests/simple_setup', ['ember-metal', 'ember-views'], function (_emberMetal, _emberViews) {\n 'use strict';\n\n var App;\n\n QUnit.module('Simple Testing Setup', {\n teardown: function () {\n if (App) {\n App.removeTestHelpers();\n (0, _emberViews.jQuery)('#ember-testing-container, #ember-testing').remove();\n (0, _emberMetal.run)(App, 'destroy');\n App = null;\n }\n }\n });\n});","QUnit.module('ESLint | ember-testing/tests/simple_setup.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-testing/tests/simple_setup.js should pass ESLint\\n\\n');\n});\n","enifed('ember-testing/tests/test/waiters-test', ['ember-babel', 'ember-testing/test/waiters'], function (_emberBabel, _waiters) {\n 'use strict';\n\n var Waiters = function () {\n function Waiters() {\n (0, _emberBabel.classCallCheck)(this, Waiters);\n\n this._waiters = [];\n }\n\n Waiters.prototype.add = function add() {\n this._waiters.push([].concat(Array.prototype.slice.call(arguments)));\n };\n\n Waiters.prototype.register = function register() {\n this.forEach(function () {\n _waiters.registerWaiter.apply(undefined, arguments);\n });\n };\n\n Waiters.prototype.unregister = function unregister() {\n this.forEach(function () {\n _waiters.unregisterWaiter.apply(undefined, arguments);\n });\n };\n\n Waiters.prototype.forEach = function forEach(callback) {\n for (var i = 0; i < this._waiters.length; i++) {\n var args = this._waiters[i];\n\n callback.apply(undefined, args);\n }\n };\n\n Waiters.prototype.check = function check() {\n this.register();\n var result = (0, _waiters.checkWaiters)();\n this.unregister();\n\n return result;\n };\n\n return Waiters;\n }();\n\n QUnit.module('ember-testing: waiters', {\n setup: function () {\n this.waiters = new Waiters();\n },\n teardown: function () {\n this.waiters.unregister();\n }\n });\n\n QUnit.test('registering a waiter', function (assert) {\n assert.expect(2);\n\n var obj = { foo: true };\n\n this.waiters.add(obj, function () {\n assert.ok(this.foo, 'has proper `this` context');\n return true;\n });\n\n this.waiters.add(function () {\n assert.ok(true, 'is called');\n return true;\n });\n\n this.waiters.check();\n });\n\n QUnit.test('unregistering a waiter', function (assert) {\n assert.expect(2);\n\n var obj = { foo: true };\n\n this.waiters.add(obj, function () {\n assert.ok(true, 'precond - waiter with context is registered');\n return true;\n });\n\n this.waiters.add(function () {\n assert.ok(true, 'precond - waiter without context is registered');\n return true;\n });\n\n this.waiters.check();\n this.waiters.unregister();\n\n (0, _waiters.checkWaiters)();\n });\n\n QUnit.test('checkWaiters returns false if all waiters return true', function (assert) {\n assert.expect(3);\n\n this.waiters.add(function () {\n assert.ok(true, 'precond - waiter is registered');\n\n return true;\n });\n\n this.waiters.add(function () {\n assert.ok(true, 'precond - waiter is registered');\n\n return true;\n });\n\n assert.notOk(this.waiters.check(), 'checkWaiters returns true if all waiters return true');\n });\n\n QUnit.test('checkWaiters returns true if any waiters return false', function (assert) {\n assert.expect(3);\n\n this.waiters.add(function () {\n assert.ok(true, 'precond - waiter is registered');\n\n return true;\n });\n\n this.waiters.add(function () {\n assert.ok(true, 'precond - waiter is registered');\n\n return false;\n });\n\n assert.ok(this.waiters.check(), 'checkWaiters returns false if any waiters return false');\n });\n\n QUnit.test('checkWaiters short circuits after first falsey waiter', function (assert) {\n assert.expect(2);\n\n this.waiters.add(function () {\n assert.ok(true, 'precond - waiter is registered');\n\n return false;\n });\n\n this.waiters.add(function () {\n assert.notOk(true, 'waiter should not be called');\n });\n\n assert.ok(this.waiters.check(), 'checkWaiters returns false if any waiters return false');\n });\n});","QUnit.module('ESLint | ember-testing/tests/test/waiters-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-testing/tests/test/waiters-test.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/apply-str.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/apply-str.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/assign.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/assign.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/dictionary.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/dictionary.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/guid.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/guid.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/index.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/index.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/inspect.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/inspect.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/intern.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/intern.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/invoke.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/invoke.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/lookup-descriptor.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/lookup-descriptor.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/make-array.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/make-array.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/name.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/name.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/owner.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/owner.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/proxy-utils.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/proxy-utils.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/super.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/super.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/symbol.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/symbol.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/to-string.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/to-string.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-utils/lib/weak-map-utils.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/lib/weak-map-utils.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/assign_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n QUnit.module('Ember.assign');\n\n QUnit.test('merging objects', function () {\n var trgt = { a: 1 };\n var src1 = { b: 2 };\n var src2 = { c: 3 };\n\n (0, _emberUtils.assignPolyfill)(trgt, src1, src2);\n\n deepEqual(trgt, { a: 1, b: 2, c: 3 }, 'assign copies values from one or more source objects to a target object');\n deepEqual(src1, { b: 2 }, 'assign does not change source object 1');\n deepEqual(src2, { c: 3 }, 'assign does not change source object 2');\n });\n\n QUnit.test('merging objects with same property', function () {\n var trgt = { a: 1, b: 1 };\n var src1 = { a: 2, b: 2 };\n var src2 = { a: 3 };\n\n (0, _emberUtils.assignPolyfill)(trgt, src1, src2);\n deepEqual(trgt, { a: 3, b: 2 }, 'properties are overwritten by other objects that have the same properties later in the parameters order');\n });\n\n QUnit.test('null', function () {\n var trgt = { a: 1 };\n\n (0, _emberUtils.assignPolyfill)(trgt, null);\n deepEqual(trgt, { a: 1 }, 'null as a source parameter is ignored');\n });\n\n QUnit.test('undefined', function () {\n var trgt = { a: 1 };\n\n (0, _emberUtils.assignPolyfill)(trgt, null);\n deepEqual(trgt, { a: 1 }, 'undefined as a source parameter is ignored');\n });\n});","QUnit.module('ESLint | ember-utils/tests/assign_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/assign_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/can_invoke_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n var obj = void 0;\n\n QUnit.module('Ember.canInvoke', {\n setup: function () {\n obj = {\n foobar: 'foobar',\n aMethodThatExists: function () {}\n };\n },\n teardown: function () {\n obj = undefined;\n }\n });\n\n QUnit.test('should return false if the object doesn\\'t exist', function () {\n equal((0, _emberUtils.canInvoke)(undefined, 'aMethodThatDoesNotExist'), false);\n });\n\n QUnit.test('should return true for falsy values that have methods', function () {\n equal((0, _emberUtils.canInvoke)(false, 'valueOf'), true);\n equal((0, _emberUtils.canInvoke)('', 'charAt'), true);\n equal((0, _emberUtils.canInvoke)(0, 'toFixed'), true);\n });\n\n QUnit.test('should return true if the method exists on the object', function () {\n equal((0, _emberUtils.canInvoke)(obj, 'aMethodThatExists'), true);\n });\n\n QUnit.test('should return false if the method doesn\\'t exist on the object', function () {\n equal((0, _emberUtils.canInvoke)(obj, 'aMethodThatDoesNotExist'), false);\n });\n\n QUnit.test('should return false if the property exists on the object but is a non-function', function () {\n equal((0, _emberUtils.canInvoke)(obj, 'foobar'), false);\n });\n});","QUnit.module('ESLint | ember-utils/tests/can_invoke_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/can_invoke_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/checkHasSuper_test', ['ember-environment', 'ember-utils'], function (_emberEnvironment, _emberUtils) {\n 'use strict';\n\n QUnit.module('checkHasSuper');\n\n // Only run this test on browsers that we are certain should have function\n // source available. This allows the test suite to continue to pass on other\n // platforms that correctly (for them) fall back to the \"always wrap\" code.\n if (_emberEnvironment.environment.isPhantom || _emberEnvironment.environment.isChrome || _emberEnvironment.environment.isFirefox) {\n QUnit.test('does not super wrap needlessly [GH #12462]', function (assert) {\n assert.notOk((0, _emberUtils.checkHasSuper)(function () {}), 'empty function does not have super');\n });\n }\n});","QUnit.module('ESLint | ember-utils/tests/checkHasSuper_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/checkHasSuper_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/generate_guid_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n QUnit.module('Ember.generateGuid');\n\n QUnit.test('Prefix', function () {\n var a = {};\n\n ok((0, _emberUtils.generateGuid)(a, 'tyrell').indexOf('tyrell') > -1, 'guid can be prefixed');\n });\n});","QUnit.module('ESLint | ember-utils/tests/generate_guid_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/generate_guid_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/guid_for_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n QUnit.module('guidFor');\n\n function sameGuid(a, b, message) {\n equal((0, _emberUtils.guidFor)(a), (0, _emberUtils.guidFor)(b), message);\n }\n\n function diffGuid(a, b, message) {\n ok((0, _emberUtils.guidFor)(a) !== (0, _emberUtils.guidFor)(b), message);\n }\n\n function nanGuid(obj) {\n var type = typeof obj;\n ok(isNaN(parseInt((0, _emberUtils.guidFor)(obj), 0)), 'guids for ' + type + 'don\\'t parse to numbers');\n }\n\n QUnit.test('Object', function () {\n var a = {};\n var b = {};\n\n sameGuid(a, a, 'same object always yields same guid');\n diffGuid(a, b, 'different objects yield different guids');\n nanGuid(a);\n });\n\n QUnit.test('strings', function () {\n var a = 'string A';\n var aprime = 'string A';\n var b = 'String B';\n\n sameGuid(a, a, 'same string always yields same guid');\n sameGuid(a, aprime, 'identical strings always yield the same guid');\n diffGuid(a, b, 'different strings yield different guids');\n nanGuid(a);\n });\n\n QUnit.test('numbers', function () {\n var a = 23;\n var aprime = 23;\n var b = 34;\n\n sameGuid(a, a, 'same numbers always yields same guid');\n sameGuid(a, aprime, 'identical numbers always yield the same guid');\n diffGuid(a, b, 'different numbers yield different guids');\n nanGuid(a);\n });\n\n QUnit.test('numbers', function () {\n var a = true;\n var aprime = true;\n var b = false;\n\n sameGuid(a, a, 'same booleans always yields same guid');\n sameGuid(a, aprime, 'identical booleans always yield the same guid');\n diffGuid(a, b, 'different boolean yield different guids');\n nanGuid(a);\n nanGuid(b);\n });\n\n QUnit.test('null and undefined', function () {\n var a = null;\n var aprime = null;\n var b = void 0;\n\n sameGuid(a, a, 'null always returns the same guid');\n sameGuid(b, b, 'undefined always returns the same guid');\n sameGuid(a, aprime, 'different nulls return the same guid');\n diffGuid(a, b, 'null and undefined return different guids');\n nanGuid(a);\n nanGuid(b);\n });\n\n QUnit.test('arrays', function () {\n var a = ['a', 'b', 'c'];\n var aprime = ['a', 'b', 'c'];\n var b = ['1', '2', '3'];\n\n sameGuid(a, a, 'same instance always yields same guid');\n diffGuid(a, aprime, 'identical arrays always yield the same guid');\n diffGuid(a, b, 'different arrays yield different guids');\n nanGuid(a);\n });\n});","QUnit.module('ESLint | ember-utils/tests/guid_for_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/guid_for_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/inspect_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n // Symbol is not defined on pre-ES2015 runtimes, so this let's us safely test\n // for it's existence (where a simple `if (Symbol)` would ReferenceError)\n var HAS_NATIVE_SYMBOL = typeof Symbol === 'function';\n\n QUnit.module('Ember.inspect');\n\n QUnit.test('strings', function () {\n equal((0, _emberUtils.inspect)('foo'), 'foo');\n });\n\n QUnit.test('numbers', function () {\n equal((0, _emberUtils.inspect)(2.6), '2.6');\n });\n\n QUnit.test('null', function () {\n equal((0, _emberUtils.inspect)(null), 'null');\n });\n\n QUnit.test('undefined', function () {\n equal((0, _emberUtils.inspect)(undefined), 'undefined');\n });\n\n QUnit.test('true', function () {\n equal((0, _emberUtils.inspect)(true), 'true');\n });\n\n QUnit.test('false', function () {\n equal((0, _emberUtils.inspect)(false), 'false');\n });\n\n QUnit.test('object', function () {\n equal((0, _emberUtils.inspect)({}), '{}');\n equal((0, _emberUtils.inspect)({ foo: 'bar' }), '{foo: bar}');\n equal((0, _emberUtils.inspect)({\n foo: function () {\n return this;\n }\n }), '{foo: function() { ... }}');\n });\n\n QUnit.test('objects without a prototype', function () {\n var prototypelessObj = Object.create(null);\n equal((0, _emberUtils.inspect)({ foo: prototypelessObj }), '{foo: [object Object]}');\n });\n\n QUnit.test('array', function () {\n equal((0, _emberUtils.inspect)([1, 2, 3]), '[1,2,3]');\n });\n\n QUnit.test('regexp', function () {\n equal((0, _emberUtils.inspect)(/regexp/), '/regexp/');\n });\n\n QUnit.test('date', function () {\n var inspected = (0, _emberUtils.inspect)(new Date('Sat Apr 30 2011 13:24:11'));\n ok(inspected.match(/Sat Apr 30/), 'The inspected date has its date');\n ok(inspected.match(/2011/), 'The inspected date has its year');\n ok(inspected.match(/13:24:11/), 'The inspected date has its time');\n });\n\n QUnit.test('inspect outputs the toString() representation of Symbols', function () {\n if (HAS_NATIVE_SYMBOL) {\n var symbol = Symbol('test');\n equal((0, _emberUtils.inspect)(symbol), 'Symbol(test)');\n } else {\n expect(0);\n }\n });\n});","QUnit.module('ESLint | ember-utils/tests/inspect_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/inspect_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/make_array_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n QUnit.module('Ember.makeArray');\n\n QUnit.test('undefined', function () {\n deepEqual((0, _emberUtils.makeArray)(), []);\n deepEqual((0, _emberUtils.makeArray)(undefined), []);\n });\n\n QUnit.test('null', function () {\n deepEqual((0, _emberUtils.makeArray)(null), []);\n });\n\n QUnit.test('string', function () {\n deepEqual((0, _emberUtils.makeArray)('lindsay'), ['lindsay']);\n });\n\n QUnit.test('number', function () {\n deepEqual((0, _emberUtils.makeArray)(0), [0]);\n deepEqual((0, _emberUtils.makeArray)(1), [1]);\n });\n\n QUnit.test('array', function () {\n deepEqual((0, _emberUtils.makeArray)([1, 2, 42]), [1, 2, 42]);\n });\n\n QUnit.test('true', function () {\n deepEqual((0, _emberUtils.makeArray)(true), [true]);\n });\n\n QUnit.test('false', function () {\n deepEqual((0, _emberUtils.makeArray)(false), [false]);\n });\n\n QUnit.test('object', function () {\n deepEqual((0, _emberUtils.makeArray)({}), [{}]);\n });\n});","QUnit.module('ESLint | ember-utils/tests/make_array_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/make_array_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/to-string-test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n QUnit.module('ember-utils toString');\n\n QUnit.test('toString uses an object\\'s toString method when available', function () {\n var obj = {\n toString: function () {\n return 'bob';\n }\n };\n\n strictEqual((0, _emberUtils.toString)(obj), 'bob');\n });\n\n QUnit.test('toString falls back to Object.prototype.toString', function () {\n var obj = Object.create(null);\n\n strictEqual((0, _emberUtils.toString)(obj), {}.toString());\n });\n\n QUnit.test('toString does not fail when called on Arrays with objects without toString method', function () {\n var obj = Object.create(null);\n var arr = [obj, 2];\n\n strictEqual((0, _emberUtils.toString)(arr), {}.toString() + ',2');\n });\n});","QUnit.module('ESLint | ember-utils/tests/to-string-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/to-string-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember-utils/tests/try_invoke_test', ['ember-utils'], function (_emberUtils) {\n 'use strict';\n\n var obj = void 0;\n\n QUnit.module('Ember.tryInvoke', {\n setup: function () {\n obj = {\n aMethodThatExists: function () {\n return true;\n },\n aMethodThatTakesArguments: function (arg1, arg2) {\n return arg1 === arg2;\n }\n };\n },\n teardown: function () {\n obj = undefined;\n }\n });\n\n QUnit.test('should return undefined when the object doesn\\'t exist', function () {\n equal((0, _emberUtils.tryInvoke)(undefined, 'aMethodThatDoesNotExist'), undefined);\n });\n\n QUnit.test('should return undefined when asked to perform a method that doesn\\'t exist on the object', function () {\n equal((0, _emberUtils.tryInvoke)(obj, 'aMethodThatDoesNotExist'), undefined);\n });\n\n QUnit.test('should return what the method returns when asked to perform a method that exists on the object', function () {\n equal((0, _emberUtils.tryInvoke)(obj, 'aMethodThatExists'), true);\n });\n\n QUnit.test('should return what the method returns when asked to perform a method that takes arguments and exists on the object', function () {\n equal((0, _emberUtils.tryInvoke)(obj, 'aMethodThatTakesArguments', [true, true]), true);\n });\n});","QUnit.module('ESLint | ember-utils/tests/try_invoke_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-utils/tests/try_invoke_test.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/compat/attrs.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/compat/attrs.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/compat/fallback-view-registry.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/compat/fallback-view-registry.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/component_lookup.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/component_lookup.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/index.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/index.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/mixins/action_support.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/mixins/action_support.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/mixins/child_views_support.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/mixins/child_views_support.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/mixins/class_names_support.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/mixins/class_names_support.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/mixins/text_support.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/mixins/text_support.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/mixins/view_state_support.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/mixins/view_state_support.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/mixins/view_support.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/mixins/view_support.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/system/action_manager.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/system/action_manager.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/system/event_dispatcher.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/system/event_dispatcher.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/system/ext.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/system/ext.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/system/jquery.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/system/jquery.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/system/lookup_partial.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/system/lookup_partial.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/system/utils.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/system/utils.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/utils/lookup-component.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/utils/lookup-component.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/core_view.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/core_view.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/states.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/states.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/states/default.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/states/default.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/states/destroying.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/states/destroying.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/states/has_element.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/states/has_element.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/states/in_dom.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/states/in_dom.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember-views/lib/views/states/pre_render.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember-views/lib/views/states/pre_render.js should pass ESLint\\n\\n');\n});\n","QUnit.module('ESLint | ember/lib/index.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/lib/index.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/application_lifecycle_test', ['ember-babel', 'internal-test-helpers', 'ember-application', 'ember-routing', 'ember-glimmer'], function (_emberBabel, _internalTestHelpers, _emberApplication, _emberRouting, _emberGlimmer) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Application Lifecycle - route hooks', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class, _AutobootApplicationT);\n\n _class.prototype.createApplication = function createApplication() {\n var _AutobootApplicationT2;\n\n var application = (_AutobootApplicationT2 = _AutobootApplicationT.prototype.createApplication).call.apply(_AutobootApplicationT2, [this].concat(Array.prototype.slice.call(arguments)));\n this.add('router:main', _emberRouting.Router.extend({\n location: 'none'\n }));\n return application;\n };\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.call(this));\n\n var menuItem = _this.menuItem = {};\n\n _this.runTask(function () {\n _this.createApplication();\n\n var SettingRoute = _emberRouting.Route.extend({\n setupController: function () {\n this.controller.set('selectedMenuItem', menuItem);\n },\n deactivate: function () {\n this.controller.set('selectedMenuItem', null);\n }\n });\n _this.add('route:index', SettingRoute);\n _this.add('route:application', SettingRoute);\n });\n return _this;\n }\n\n _class.prototype['@test Resetting the application allows controller properties to be set when a route deactivates'] = function (assert) {\n var indexController = this.indexController,\n applicationController = this.applicationController;\n\n assert.equal(indexController.get('selectedMenuItem'), this.menuItem);\n assert.equal(applicationController.get('selectedMenuItem'), this.menuItem);\n\n this.application.reset();\n\n assert.equal(indexController.get('selectedMenuItem'), null);\n assert.equal(applicationController.get('selectedMenuItem'), null);\n };\n\n _class.prototype['@test Destroying the application resets the router before the appInstance is destroyed'] = function (assert) {\n var _this2 = this;\n\n var indexController = this.indexController,\n applicationController = this.applicationController;\n\n assert.equal(indexController.get('selectedMenuItem'), this.menuItem);\n assert.equal(applicationController.get('selectedMenuItem'), this.menuItem);\n\n this.runTask(function () {\n _this2.application.destroy();\n });\n\n assert.equal(indexController.get('selectedMenuItem'), null);\n assert.equal(applicationController.get('selectedMenuItem'), null);\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'indexController',\n get: function () {\n return this.applicationInstance.lookup('controller:index');\n }\n }, {\n key: 'applicationController',\n get: function () {\n return this.applicationInstance.lookup('controller:application');\n }\n }]);\n return _class;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Application Lifecycle', function (_AutobootApplicationT3) {\n (0, _emberBabel.inherits)(_class2, _AutobootApplicationT3);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT3.apply(this, arguments));\n }\n\n _class2.prototype.createApplication = function createApplication() {\n var _AutobootApplicationT4;\n\n var application = (_AutobootApplicationT4 = _AutobootApplicationT3.prototype.createApplication).call.apply(_AutobootApplicationT4, [this].concat(Array.prototype.slice.call(arguments)));\n this.add('router:main', _emberRouting.Router.extend({\n location: 'none'\n }));\n return application;\n };\n\n _class2.prototype['@test Destroying a route after the router does create an undestroyed \\'toplevelView\\''] = function (assert) {\n var _this4 = this;\n\n this.runTask(function () {\n _this4.createApplication();\n _this4.addTemplate('index', 'Index!');\n _this4.addTemplate('application', 'Application! {{outlet}}');\n });\n\n var router = this.applicationInstance.lookup('router:main');\n var route = this.applicationInstance.lookup('route:index');\n\n this.runTask(function () {\n return router.destroy();\n });\n equal(router._toplevelView, null, 'the toplevelView was cleared');\n\n this.runTask(function () {\n return route.destroy();\n });\n equal(router._toplevelView, null, 'the toplevelView was not reinitialized');\n\n this.runTask(function () {\n return _this4.application.destroy();\n });\n equal(router._toplevelView, null, 'the toplevelView was not reinitialized');\n };\n\n _class2.prototype['@test initializers can augment an applications customEvents hash'] = function (assert) {\n var _this5 = this;\n\n assert.expect(1);\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.initializer({\n name: 'customize-things',\n initialize: function (application) {\n application.customEvents = {\n wowza: 'wowza'\n };\n }\n });\n\n this.runTask(function () {\n _this5.createApplication({}, MyApplication);\n\n _this5.add('component:foo-bar', _emberGlimmer.Component.extend({\n wowza: function () {\n assert.ok(true, 'fired the event!');\n }\n }));\n\n _this5.addTemplate('application', '{{foo-bar}}');\n _this5.addTemplate('components/foo-bar', '');\n });\n\n this.$('#wowza-thingy').trigger('wowza');\n };\n\n _class2.prototype['@test instanceInitializers can augment an the customEvents hash'] = function (assert) {\n var _this6 = this;\n\n assert.expect(1);\n\n var MyApplication = _emberApplication.Application.extend();\n\n MyApplication.instanceInitializer({\n name: 'customize-things',\n initialize: function (application) {\n application.customEvents = {\n herky: 'jerky'\n };\n }\n });\n this.runTask(function () {\n _this6.createApplication({}, MyApplication);\n\n _this6.add('component:foo-bar', _emberGlimmer.Component.extend({\n jerky: function () {\n assert.ok(true, 'fired the event!');\n }\n }));\n\n _this6.addTemplate('application', '{{foo-bar}}');\n _this6.addTemplate('components/foo-bar', '');\n });\n\n this.$('#herky-thingy').trigger('herky');\n };\n\n return _class2;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/application_lifecycle_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/application_lifecycle_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/component_context_test', ['ember-babel', 'ember-runtime', 'ember-glimmer', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberGlimmer, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Application Lifecycle - Component Context', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test Components with a block should have the proper content when a template is provided'] = function testComponentsWithABlockShouldHaveTheProperContentWhenATemplateIsProvided(assert) {\n var _this2 = this;\n\n this.addTemplate('application', '\\n
\\n {{#my-component}}{{text}}{{/my-component}}\\n
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n 'text': 'outer'\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n text: 'inner'\n }),\n template: '{{text}}-{{yield}}'\n });\n\n this.visit('/').then(function () {\n var text = _this2.$('#wrapper').text().trim();\n assert.equal(text, 'inner-outer', 'The component is composed correctly');\n });\n };\n\n _class.prototype['@test Components with a block should yield the proper content without a template provided'] = function testComponentsWithABlockShouldYieldTheProperContentWithoutATemplateProvided(assert) {\n var _this3 = this;\n\n this.addTemplate('application', '\\n
\\n {{#my-component}}{{text}}{{/my-component}}\\n
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n 'text': 'outer'\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n text: 'inner'\n })\n });\n\n this.visit('/').then(function () {\n var text = _this3.$('#wrapper').text().trim();\n assert.equal(text, 'outer', 'The component is composed correctly');\n });\n };\n\n _class.prototype['@test Components without a block should have the proper content when a template is provided'] = function testComponentsWithoutABlockShouldHaveTheProperContentWhenATemplateIsProvided(assert) {\n var _this4 = this;\n\n this.addTemplate('application', '\\n
{{my-component}}
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n 'text': 'outer'\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n text: 'inner'\n }),\n template: '{{text}}'\n });\n\n this.visit('/').then(function () {\n var text = _this4.$('#wrapper').text().trim();\n assert.equal(text, 'inner', 'The component is composed correctly');\n });\n };\n\n _class.prototype['@test Components without a block should have the proper content'] = function testComponentsWithoutABlockShouldHaveTheProperContent(assert) {\n var _this5 = this;\n\n this.addTemplate('application', '\\n
{{my-component}}
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n 'text': 'outer'\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n didInsertElement: function () {\n this.$().html('Some text inserted by jQuery');\n }\n })\n });\n\n this.visit('/').then(function () {\n var text = _this5.$('#wrapper').text().trim();\n assert.equal(text, 'Some text inserted by jQuery', 'The component is composed correctly');\n });\n };\n\n _class.prototype['@test properties of a component without a template should not collide with internal structures [DEPRECATED]'] = function testPropertiesOfAComponentWithoutATemplateShouldNotCollideWithInternalStructuresDEPRECATED(assert) {\n var _this6 = this;\n\n this.addTemplate('application', '\\n
{{my-component data=foo}}
');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n 'text': 'outer',\n 'foo': 'Some text inserted by jQuery'\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n didInsertElement: function () {\n this.$().html(this.get('data'));\n }\n })\n });\n\n this.visit('/').then(function () {\n var text = _this6.$('#wrapper').text().trim();\n assert.equal(text, 'Some text inserted by jQuery', 'The component is composed correctly');\n });\n };\n\n _class.prototype['@test attrs property of a component without a template should not collide with internal structures'] = function testAttrsPropertyOfAComponentWithoutATemplateShouldNotCollideWithInternalStructures(assert) {\n var _this7 = this;\n\n this.addTemplate('application', '\\n
{{my-component attrs=foo}}
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n 'text': 'outer',\n 'foo': 'Some text inserted by jQuery'\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n didInsertElement: function () {\n // FIXME: I'm unsure if this is even the right way to access attrs\n this.$().html(this.get('attrs.attrs.value'));\n }\n })\n });\n\n this.visit('/').then(function () {\n var text = _this7.$('#wrapper').text().trim();\n assert.equal(text, 'Some text inserted by jQuery', 'The component is composed correctly');\n });\n };\n\n _class.prototype['@test Components trigger actions in the parents context when called from within a block'] = function testComponentsTriggerActionsInTheParentsContextWhenCalledFromWithinABlock(assert) {\n var _this8 = this;\n\n this.addTemplate('application', '\\n
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n actions: {\n fizzbuzz: function () {\n ok(true, 'action triggered on parent');\n }\n }\n }));\n this.addComponent('my-component', { ComponentClass: _emberGlimmer.Component.extend({}) });\n\n this.visit('/').then(function () {\n _this8.$('#fizzbuzz', '#wrapper').click();\n });\n };\n\n _class.prototype['@test Components trigger actions in the components context when called from within its template'] = function testComponentsTriggerActionsInTheComponentsContextWhenCalledFromWithinItsTemplate(assert) {\n var _this9 = this;\n\n this.addTemplate('application', '\\n
{{#my-component}}{{text}}{{/my-component}}
\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n actions: {\n fizzbuzz: function () {\n ok(false, 'action on the wrong context');\n }\n }\n }));\n this.addComponent('my-component', {\n ComponentClass: _emberGlimmer.Component.extend({\n actions: {\n fizzbuzz: function () {\n ok(true, 'action triggered on component');\n }\n }\n }),\n template: 'Fizzbuzz'\n });\n\n this.visit('/').then(function () {\n _this9.$('#fizzbuzz', '#wrapper').click();\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/component_context_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/component_context_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/component_registration_test', ['ember-babel', 'ember-runtime', 'ember-glimmer', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberGlimmer, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Application Lifecycle - Component Registration', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class, _AutobootApplicationT);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.apply(this, arguments));\n }\n\n _class.prototype['@test The helper becomes the body of the component'] = function testTheHelperBecomesTheBodyOfTheComponent(assert) {\n var _this2 = this;\n\n this.runTask(function () {\n _this2.createApplication();\n\n _this2.addTemplate('components/expand-it', '
hello {{yield}}
');\n _this2.addTemplate('application', 'Hello world {{#expand-it}}world{{/expand-it}}');\n });\n\n var text = this.$('div.ember-view > div.ember-view').text().trim();\n assert.equal(text, 'hello world', 'The component is composed correctly');\n };\n\n _class.prototype['@test If a component is registered, it is used'] = function testIfAComponentIsRegisteredItIsUsed(assert) {\n var _this3 = this;\n\n this.runTask(function () {\n _this3.createApplication();\n\n _this3.addTemplate('components/expand-it', '
hello {{yield}}
');\n _this3.addTemplate('application', 'Hello world {{#expand-it}}world{{/expand-it}}');\n\n _this3.applicationInstance.register('component:expand-it', _emberGlimmer.Component.extend({\n classNames: 'testing123'\n }));\n });\n\n var text = this.$('div.testing123').text().trim();\n assert.equal(text, 'hello world', 'The component is composed correctly');\n };\n\n _class.prototype['@test Late-registered components can be rendered with custom `layout` property'] = function testLateRegisteredComponentsCanBeRenderedWithCustomLayoutProperty(assert) {\n var _this4 = this;\n\n this.runTask(function () {\n _this4.createApplication();\n\n _this4.addTemplate('application', '
there goes {{my-hero}}
');\n\n _this4.applicationInstance.register('component:my-hero', _emberGlimmer.Component.extend({\n classNames: 'testing123',\n layout: _this4.compile('watch him as he GOES')\n }));\n });\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'there goes watch him as he GOES', 'The component is composed correctly');\n };\n\n _class.prototype['@test Late-registered components can be rendered with template registered on the container'] = function testLateRegisteredComponentsCanBeRenderedWithTemplateRegisteredOnTheContainer(assert) {\n var _this5 = this;\n\n this.runTask(function () {\n _this5.createApplication();\n\n _this5.addTemplate('application', '
hello world {{sally-rutherford}}-{{#sally-rutherford}}!!!{{/sally-rutherford}}
');\n\n _this5.applicationInstance.register('template:components/sally-rutherford', _this5.compile('funkytowny{{yield}}'));\n _this5.applicationInstance.register('component:sally-rutherford', _emberGlimmer.Component);\n });\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'hello world funkytowny-funkytowny!!!', 'The component is composed correctly');\n };\n\n _class.prototype['@test Late-registered components can be rendered with ONLY the template registered on the container'] = function testLateRegisteredComponentsCanBeRenderedWithONLYTheTemplateRegisteredOnTheContainer(assert) {\n var _this6 = this;\n\n this.runTask(function () {\n _this6.createApplication();\n\n _this6.addTemplate('application', '
hello world {{borf-snorlax}}-{{#borf-snorlax}}!!!{{/borf-snorlax}}
');\n\n _this6.applicationInstance.register('template:components/borf-snorlax', _this6.compile('goodfreakingTIMES{{yield}}'));\n });\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'hello world goodfreakingTIMES-goodfreakingTIMES!!!', 'The component is composed correctly');\n };\n\n _class.prototype['@test Assigning layoutName to a component should setup the template as a layout'] = function testAssigningLayoutNameToAComponentShouldSetupTheTemplateAsALayout(assert) {\n var _this7 = this;\n\n assert.expect(1);\n\n this.runTask(function () {\n _this7.createApplication();\n\n _this7.addTemplate('application', '
{{#my-component}}{{text}}{{/my-component}}
');\n _this7.addTemplate('foo-bar-baz', '{{text}}-{{yield}}');\n\n _this7.applicationInstance.register('controller:application', _emberRuntime.Controller.extend({\n text: 'outer'\n }));\n _this7.applicationInstance.register('component:my-component', _emberGlimmer.Component.extend({\n text: 'inner',\n layoutName: 'foo-bar-baz'\n }));\n });\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'inner-outer', 'The component is composed correctly');\n };\n\n _class.prototype['@test Assigning layoutName and layout to a component should use the `layout` value'] = function testAssigningLayoutNameAndLayoutToAComponentShouldUseTheLayoutValue(assert) {\n var _this8 = this;\n\n assert.expect(1);\n\n this.runTask(function () {\n _this8.createApplication();\n\n _this8.addTemplate('application', '
{{#my-component}}{{text}}{{/my-component}}
');\n _this8.addTemplate('foo-bar-baz', 'No way!');\n\n _this8.applicationInstance.register('controller:application', _emberRuntime.Controller.extend({\n text: 'outer'\n }));\n _this8.applicationInstance.register('component:my-component', _emberGlimmer.Component.extend({\n text: 'inner',\n layoutName: 'foo-bar-baz',\n layout: _this8.compile('{{text}}-{{yield}}')\n }));\n });\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'inner-outer', 'The component is composed correctly');\n };\n\n _class.prototype['@test Assigning defaultLayout to a component should set it up as a layout if no layout was found [DEPRECATED]'] = function testAssigningDefaultLayoutToAComponentShouldSetItUpAsALayoutIfNoLayoutWasFoundDEPRECATED(assert) {\n var _this9 = this;\n\n assert.expect(2);\n\n expectDeprecation(function () {\n _this9.runTask(function () {\n _this9.createApplication();\n\n _this9.addTemplate('application', '
{{#my-component}}{{text}}{{/my-component}}
');\n\n _this9.applicationInstance.register('controller:application', _emberRuntime.Controller.extend({\n text: 'outer'\n }));\n _this9.applicationInstance.register('component:my-component', _emberGlimmer.Component.extend({\n text: 'inner',\n defaultLayout: _this9.compile('{{text}}-{{yield}}')\n }));\n });\n });\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'inner-outer', 'The component is composed correctly');\n };\n\n _class.prototype['@test Assigning defaultLayout to a component should set it up as a layout if layout was found [DEPRECATED]'] = function testAssigningDefaultLayoutToAComponentShouldSetItUpAsALayoutIfLayoutWasFoundDEPRECATED(assert) {\n var _this10 = this;\n\n assert.expect(2);\n\n expectDeprecation(function () {\n _this10.runTask(function () {\n _this10.createApplication();\n\n _this10.addTemplate('application', '
{{#my-component}}{{text}}{{/my-component}}
');\n _this10.addTemplate('components/my-component', '{{text}}-{{yield}}');\n\n _this10.applicationInstance.register('controller:application', _emberRuntime.Controller.extend({\n text: 'outer'\n }));\n _this10.applicationInstance.register('component:my-component', _emberGlimmer.Component.extend({\n text: 'inner',\n defaultLayout: _this10.compile('should not see this!')\n }));\n });\n }, /Specifying `defaultLayout` to .+ is deprecated\\./);\n\n var text = this.$('#wrapper').text().trim();\n assert.equal(text, 'inner-outer', 'The component is composed correctly');\n };\n\n _class.prototype['@test Using name of component that does not exist'] = function testUsingNameOfComponentThatDoesNotExist() {\n var _this11 = this;\n\n expectAssertion(function () {\n _this11.runTask(function () {\n _this11.createApplication();\n\n _this11.addTemplate('application', '
{{#no-good}} {{/no-good}}
');\n });\n }, /.* named \"no-good\" .*/);\n };\n\n return _class;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/component_registration_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/component_registration_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/controller_test', ['ember-babel', 'ember-runtime', 'internal-test-helpers', 'ember-glimmer'], function (_emberBabel, _emberRuntime, _internalTestHelpers, _emberGlimmer) {\n 'use strict';\n\n /*\n In Ember 1.x, controllers subtly affect things like template scope\n and action targets in exciting and often inscrutable ways. This test\n file contains integration tests that verify the correct behavior of\n the many parts of the system that change and rely upon controller scope,\n from the runtime up to the templating layer.\n */\n\n (0, _internalTestHelpers.moduleFor)('Template scoping examples', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test Actions inside an outlet go to the associated controller'] = function testActionsInsideAnOutletGoToTheAssociatedController(assert) {\n var _this2 = this;\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n actions: {\n componentAction: function () {\n assert.ok(true, 'controller received the action');\n }\n }\n }));\n\n this.addComponent('component-with-action', {\n ComponentClass: _emberGlimmer.Component.extend({\n classNames: ['component-with-action'],\n click: function () {\n this.sendAction();\n }\n })\n });\n\n this.addTemplate('index', '{{component-with-action action=\"componentAction\"}}');\n\n return this.visit('/').then(function () {\n _this2.runTask(function () {\n return _this2.$('.component-with-action').click();\n });\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/controller_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/controller_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/error_handler_test', ['ember', 'ember-metal'], function (_ember, _emberMetal) {\n 'use strict';\n\n var ONERROR = _ember.default.onerror;\n var ADAPTER = _ember.default.Test && _ember.default.Test.adapter;\n var TESTING = _ember.default.testing;\n\n var WINDOW_ONERROR = void 0;\n\n QUnit.module('error_handler', {\n setup: function () {\n // capturing this outside of module scope to ensure we grab\n // the test frameworks own window.onerror to reset it\n WINDOW_ONERROR = window.onerror;\n },\n teardown: function () {\n _ember.default.onerror = ONERROR;\n _ember.default.testing = TESTING;\n window.onerror = WINDOW_ONERROR;\n if (_ember.default.Test) {\n _ember.default.Test.adapter = ADAPTER;\n }\n }\n });\n\n function runThatThrowsSync() {\n var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Error for testing error handling';\n\n return (0, _emberMetal.run)(function () {\n throw new Error(message);\n });\n }\n\n function runThatThrowsAsync() {\n var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Error for testing error handling';\n\n return _emberMetal.run.next(function () {\n throw new Error(message);\n });\n }\n\n test('by default there is no onerror - sync run', function (assert) {\n assert.strictEqual(_ember.default.onerror, undefined, 'precond - there should be no Ember.onerror set by default');\n assert.throws(runThatThrowsSync, Error, 'errors thrown sync are catchable');\n });\n\n test('when Ember.onerror (which rethrows) is registered - sync run', function (assert) {\n assert.expect(2);\n _ember.default.onerror = function (error) {\n assert.ok(true, 'onerror called');\n throw error;\n };\n assert.throws(runThatThrowsSync, Error, 'error is thrown');\n });\n\n test('when Ember.onerror (which does not rethrow) is registered - sync run', function (assert) {\n assert.expect(2);\n _ember.default.onerror = function (error) {\n assert.ok(true, 'onerror called');\n };\n runThatThrowsSync();\n assert.ok(true, 'no error was thrown, Ember.onerror can intercept errors');\n });\n\n if (true) {\n test('when Ember.Test.adapter is registered and error is thrown - sync run', function (assert) {\n assert.expect(1);\n\n _ember.default.Test.adapter = {\n exception: function (error) {\n assert.notOk(true, 'adapter is not called for errors thrown in sync run loops');\n }\n };\n\n assert.throws(runThatThrowsSync, Error);\n });\n\n test('when both Ember.onerror (which rethrows) and Ember.Test.adapter are registered - sync run', function (assert) {\n assert.expect(2);\n\n _ember.default.Test.adapter = {\n exception: function (error) {\n assert.notOk(true, 'adapter is not called for errors thrown in sync run loops');\n }\n };\n\n _ember.default.onerror = function (error) {\n assert.ok(true, 'onerror is called for sync errors even if Ember.Test.adapter is setup');\n throw error;\n };\n\n assert.throws(runThatThrowsSync, Error, 'error is thrown');\n });\n\n test('when both Ember.onerror (which does not rethrow) and Ember.Test.adapter are registered - sync run', function (assert) {\n assert.expect(2);\n\n _ember.default.Test.adapter = {\n exception: function (error) {\n assert.notOk(true, 'adapter is not called for errors thrown in sync run loops');\n }\n };\n\n _ember.default.onerror = function (error) {\n assert.ok(true, 'onerror is called for sync errors even if Ember.Test.adapter is setup');\n };\n\n runThatThrowsSync();\n assert.ok(true, 'no error was thrown, Ember.onerror can intercept errors');\n });\n\n QUnit.test('when Ember.Test.adapter is registered and error is thrown - async run', function (assert) {\n assert.expect(3);\n var done = assert.async();\n\n var caughtInAdapter = void 0,\n caughtInCatch = void 0,\n caughtByWindowOnerror = void 0;\n _ember.default.Test.adapter = {\n exception: function (error) {\n caughtInAdapter = error;\n }\n };\n\n window.onerror = function (message) {\n caughtByWindowOnerror = message;\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n try {\n runThatThrowsAsync();\n } catch (e) {\n caughtInCatch = e;\n }\n\n setTimeout(function () {\n assert.equal(caughtInAdapter, undefined, 'test adapter should never catch errors in run loops');\n assert.equal(caughtInCatch, undefined, 'a \"normal\" try/catch should never catch errors in an async run');\n\n assert.pushResult({\n result: /Error for testing error handling/.test(caughtByWindowOnerror),\n actual: caughtByWindowOnerror,\n expected: 'to include `Error for testing error handling`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n\n done();\n }, 20);\n });\n\n test('when both Ember.onerror and Ember.Test.adapter are registered - async run', function (assert) {\n assert.expect(1);\n var done = assert.async();\n\n _ember.default.Test.adapter = {\n exception: function (error) {\n assert.notOk(true, 'Adapter.exception is not called for errors thrown in run.next');\n }\n };\n\n _ember.default.onerror = function (error) {\n assert.ok(true, 'onerror is invoked for errors thrown in run.next/run.later');\n };\n\n runThatThrowsAsync();\n setTimeout(done, 10);\n });\n }\n\n QUnit.test('does not swallow exceptions by default (Ember.testing = true, no Ember.onerror) - sync run', function (assert) {\n _ember.default.testing = true;\n\n var error = new Error('the error');\n assert.throws(function () {\n _ember.default.run(function () {\n throw error;\n });\n }, error);\n });\n\n QUnit.test('does not swallow exceptions by default (Ember.testing = false, no Ember.onerror) - sync run', function (assert) {\n _ember.default.testing = false;\n var error = new Error('the error');\n assert.throws(function () {\n _ember.default.run(function () {\n throw error;\n });\n }, error);\n });\n\n QUnit.test('does not swallow exceptions (Ember.testing = false, Ember.onerror which rethrows) - sync run', function (assert) {\n assert.expect(2);\n _ember.default.testing = false;\n\n _ember.default.onerror = function (error) {\n assert.ok(true, 'Ember.onerror was called');\n throw error;\n };\n\n var error = new Error('the error');\n assert.throws(function () {\n _ember.default.run(function () {\n throw error;\n });\n }, error);\n });\n\n QUnit.test('Ember.onerror can intercept errors (aka swallow) by not rethrowing (Ember.testing = false) - sync run', function (assert) {\n assert.expect(1);\n _ember.default.testing = false;\n\n _ember.default.onerror = function (error) {\n assert.ok(true, 'Ember.onerror was called');\n };\n\n var error = new Error('the error');\n try {\n _ember.default.run(function () {\n throw error;\n });\n } catch (e) {\n assert.notOk(true, 'Ember.onerror that does not rethrow is intentionally swallowing errors, try / catch wrapping does not see error');\n }\n });\n\n QUnit.test('does not swallow exceptions by default (Ember.testing = true, no Ember.onerror) - async run', function (assert) {\n var done = assert.async();\n var caughtByWindowOnerror = void 0;\n\n _ember.default.testing = true;\n\n window.onerror = function (message) {\n caughtByWindowOnerror = message;\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n _ember.default.run.later(function () {\n throw new Error('the error');\n }, 10);\n\n setTimeout(function () {\n assert.pushResult({\n result: /the error/.test(caughtByWindowOnerror),\n actual: caughtByWindowOnerror,\n expected: 'to include `the error`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n\n done();\n }, 20);\n });\n\n QUnit.test('does not swallow exceptions by default (Ember.testing = false, no Ember.onerror) - async run', function (assert) {\n var done = assert.async();\n var caughtByWindowOnerror = void 0;\n\n _ember.default.testing = false;\n\n window.onerror = function (message) {\n caughtByWindowOnerror = message;\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n _ember.default.run.later(function () {\n throw new Error('the error');\n }, 10);\n\n setTimeout(function () {\n assert.pushResult({\n result: /the error/.test(caughtByWindowOnerror),\n actual: caughtByWindowOnerror,\n expected: 'to include `the error`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n\n done();\n }, 20);\n });\n\n QUnit.test('Ember.onerror can intercept errors (aka swallow) by not rethrowing (Ember.testing = false) - async run', function (assert) {\n var done = assert.async();\n\n _ember.default.testing = false;\n\n window.onerror = function (message) {\n assert.notOk(true, 'window.onerror is never invoked when Ember.onerror intentionally swallows errors');\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n var thrown = new Error('the error');\n _ember.default.onerror = function (error) {\n assert.strictEqual(error, thrown, 'Ember.onerror is called with the error');\n };\n\n _ember.default.run.later(function () {\n throw thrown;\n }, 10);\n\n setTimeout(done, 20);\n });\n\n function generateRSVPErrorHandlingTests(message, generatePromise) {\n var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n\n test(message + ' when Ember.onerror which does not rethrow is present - rsvp', function (assert) {\n assert.expect(1);\n\n var thrown = new Error('the error');\n _ember.default.onerror = function (error) {\n assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when Ember.onerror which does rethrow is present - rsvp', function (assert) {\n assert.expect(2);\n\n var thrown = new Error('the error');\n _ember.default.onerror = function (error) {\n assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');\n throw error;\n };\n\n window.onerror = function (message) {\n assert.pushResult({\n result: /the error/.test(message),\n actual: message,\n expected: 'to include `the error`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when Ember.onerror which does not rethrow is present (Ember.testing = false) - rsvp', function (assert) {\n assert.expect(1);\n\n _ember.default.testing = false;\n var thrown = new Error('the error');\n _ember.default.onerror = function (error) {\n assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when Ember.onerror which does rethrow is present (Ember.testing = false) - rsvp', function (assert) {\n assert.expect(2);\n\n _ember.default.testing = false;\n var thrown = new Error('the error');\n _ember.default.onerror = function (error) {\n assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises');\n throw error;\n };\n\n window.onerror = function (message) {\n assert.pushResult({\n result: /the error/.test(message),\n actual: message,\n expected: 'to include `the error`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n if (true) {\n test(message + ' when Ember.Test.adapter without `exception` method is present - rsvp', function (assert) {\n assert.expect(1);\n\n var thrown = new Error('the error');\n _ember.default.Test.adapter = _ember.default.Test.QUnitAdapter.create({\n exception: undefined\n });\n\n window.onerror = function (message) {\n assert.pushResult({\n result: /the error/.test(message),\n actual: message,\n expected: 'to include `the error`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n\n // prevent \"bubbling\" and therefore failing the test\n return true;\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when both Ember.onerror and Ember.Test.adapter without `exception` method are present - rsvp', function (assert) {\n assert.expect(1);\n\n var thrown = new Error('the error');\n _ember.default.Test.adapter = _ember.default.Test.QUnitAdapter.create({\n exception: undefined\n });\n\n _ember.default.onerror = function (error) {\n assert.pushResult({\n result: /the error/.test(error.message),\n actual: error.message,\n expected: 'to include `the error`',\n message: 'error should bubble out to window.onerror, and therefore fail tests (due to QUnit implementing window.onerror)'\n });\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when Ember.Test.adapter is present - rsvp', function (assert) {\n assert.expect(1);\n\n var thrown = new Error('the error');\n _ember.default.Test.adapter = _ember.default.Test.QUnitAdapter.create({\n exception: function (error) {\n assert.strictEqual(error, thrown, 'Adapter.exception is called for errors thrown in RSVP promises');\n }\n });\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when both Ember.onerror and Ember.Test.adapter are present - rsvp', function (assert) {\n assert.expect(1);\n\n var thrown = new Error('the error');\n _ember.default.Test.adapter = _ember.default.Test.QUnitAdapter.create({\n exception: function (error) {\n assert.strictEqual(error, thrown, 'Adapter.exception is called for errors thrown in RSVP promises');\n }\n });\n\n _ember.default.onerror = function (error) {\n assert.notOk(true, 'Ember.onerror is not called if Test.adapter does not rethrow');\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n\n test(message + ' when both Ember.onerror and Ember.Test.adapter are present - rsvp', function (assert) {\n assert.expect(2);\n\n var thrown = new Error('the error');\n _ember.default.Test.adapter = _ember.default.Test.QUnitAdapter.create({\n exception: function (error) {\n assert.strictEqual(error, thrown, 'Adapter.exception is called for errors thrown in RSVP promises');\n throw error;\n }\n });\n\n _ember.default.onerror = function (error) {\n assert.strictEqual(error, thrown, 'Ember.onerror is called for errors thrown in RSVP promises if Test.adapter rethrows');\n };\n\n generatePromise(thrown);\n\n // RSVP.Promise's are configured to settle within the run loop, this\n // ensures that run loop has completed\n return new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, timeout);\n });\n });\n }\n }\n\n generateRSVPErrorHandlingTests('errors in promise constructor', function (error) {\n new _ember.default.RSVP.Promise(function () {\n throw error;\n });\n });\n\n generateRSVPErrorHandlingTests('errors in promise .then callback', function (error) {\n _ember.default.RSVP.resolve().then(function () {\n throw error;\n });\n });\n\n generateRSVPErrorHandlingTests('errors in async promise .then callback', function (error) {\n new _ember.default.RSVP.Promise(function (resolve) {\n return setTimeout(resolve, 10);\n }).then(function () {\n throw error;\n });\n }, 20);\n});","QUnit.module('ESLint | ember/tests/error_handler_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/error_handler_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/global-api-test', ['ember-metal', 'ember-runtime'], function (_emberMetal, _emberRuntime) {\n 'use strict';\n\n QUnit.module('Global API Tests');\n\n function confirmExport(property, internal) {\n QUnit.test('confirm ' + property + ' is exported', function () {\n var theExport = (0, _emberMetal.get)(window, property);\n ok(theExport + ' is exported');\n if (internal !== undefined) {\n equal(theExport, internal, theExport + ' is exported properly');\n }\n });\n }\n\n confirmExport('Ember.DefaultResolver');\n confirmExport('Ember.generateController');\n confirmExport('Ember.Helper');\n confirmExport('Ember.Helper.helper');\n confirmExport('Ember.isArray', _emberRuntime.isArray);\n});","QUnit.module('ESLint | ember/tests/global-api-test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/global-api-test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/helpers/helper_registration_test', ['ember-babel', 'internal-test-helpers', 'ember-runtime', 'ember-glimmer'], function (_emberBabel, _internalTestHelpers, _emberRuntime, _emberGlimmer) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Application Lifecycle - Helper Registration', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test Unbound dashed helpers registered on the container can be late-invoked'] = function testUnboundDashedHelpersRegisteredOnTheContainerCanBeLateInvoked(assert) {\n var _this2 = this;\n\n this.addTemplate('application', '
{{x-borf}} {{x-borf \\'YES\\'}}
');\n\n var myHelper = (0, _emberGlimmer.helper)(function (params) {\n return params[0] || 'BORF';\n });\n this.application.register('helper:x-borf', myHelper);\n\n return this.visit('/').then(function () {\n assert.equal(_this2.$('#wrapper').text(), 'BORF YES', 'The helper was invoked from the container');\n });\n };\n\n _class.prototype['@test Bound helpers registered on the container can be late-invoked'] = function testBoundHelpersRegisteredOnTheContainerCanBeLateInvoked(assert) {\n var _this3 = this;\n\n this.addTemplate('application', '
{{x-reverse}} {{x-reverse foo}}
');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n foo: 'alex'\n }));\n\n this.application.register('helper:x-reverse', (0, _emberGlimmer.helper)(function (_ref) {\n var value = _ref[0];\n\n return value ? value.split('').reverse().join('') : '--';\n }));\n\n return this.visit('/').then(function () {\n assert.equal(_this3.$('#wrapper').text(), '-- xela', 'The bound helper was invoked from the container');\n });\n };\n\n _class.prototype['@test Undashed helpers registered on the container can be invoked'] = function testUndashedHelpersRegisteredOnTheContainerCanBeInvoked(assert) {\n var _this4 = this;\n\n this.addTemplate('application', '
{{omg}}|{{yorp \\'boo\\'}}|{{yorp \\'ya\\'}}
');\n\n this.application.register('helper:omg', (0, _emberGlimmer.helper)(function () {\n return 'OMG';\n }));\n\n this.application.register('helper:yorp', (0, _emberGlimmer.helper)(function (_ref2) {\n var value = _ref2[0];\n return value;\n }));\n\n return this.visit('/').then(function () {\n assert.equal(_this4.$('#wrapper').text(), 'OMG|boo|ya', 'The helper was invoked from the container');\n });\n };\n\n _class.prototype['@test Helpers can receive injections'] = function testHelpersCanReceiveInjections(assert) {\n this.addTemplate('application', '
{{full-name}}
');\n\n var serviceCalled = false;\n\n this.add('service:name-builder', _emberRuntime.Service.extend({\n build: function () {\n serviceCalled = true;\n }\n }));\n\n this.add('helper:full-name', _emberGlimmer.Helper.extend({\n nameBuilder: _emberRuntime.inject.service('name-builder'),\n compute: function () {\n this.get('nameBuilder').build();\n }\n }));\n\n return this.visit('/').then(function () {\n assert.ok(serviceCalled, 'service was injected, method called');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/helpers/helper_registration_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/helpers/helper_registration_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/helpers/link_to_test', ['ember-babel', 'ember-console', 'internal-test-helpers', 'ember-runtime', 'ember-metal', 'ember-routing', 'ember-views', 'ember/features'], function (_emberBabel, _emberConsole, _internalTestHelpers, _emberRuntime, _emberMetal, _emberRouting, _emberViews, _features) {\n 'use strict';\n\n // IE includes the host name\n function normalizeUrl(url) {\n return url.replace(/https?:\\/\\/[^\\/]+/, '');\n }\n\n function shouldNotBeActive(assert, element) {\n checkActive(assert, element, false);\n }\n\n function shouldBeActive(assert, element) {\n checkActive(assert, element, true);\n }\n\n function checkActive(assert, element, active) {\n var classList = element.attr('class');\n assert.equal(classList.indexOf('active') > -1, active, element + ' active should be ' + active);\n }\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper - basic tests', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n\n _this.router.map(function () {\n this.route('about');\n });\n\n _this.addTemplate('index', '\\n
\\n {{#link-to \\'index\\' id=\\'home-link\\'}}Home{{/link-to}}\\n {{#link-to \\'about\\' id=\\'self-link\\'}}Self{{/link-to}}\\n ');\n return _this;\n }\n\n _class.prototype['@test The {{link-to}} helper moves into the named route'] = function testTheLinkToHelperMovesIntoTheNamedRoute(assert) {\n this.visit('/');\n assert.equal(this.$('h3:contains(Home)').length, 1, 'The home template was rendered');\n assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n\n this.click('#about-link');\n\n assert.equal(this.$('h3:contains(About)').length, 1, 'The about template was rendered');\n assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n };\n\n _class.prototype['@test the {{link-to}} helper doesn\\'t add an href when the tagName isn\\'t \\'a\\''] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \\'about\\' id=\\'about-link\\' tagName=\\'div\\'}}About{{/link-to}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('#about-link').attr('href'), undefined, 'there is no href attribute');\n };\n\n _class.prototype['@test the {{link-to}} applies a \\'disabled\\' class when disabled'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \"about\" id=\"about-link-static\" disabledWhen=\"shouldDisable\"}}About{{/link-to}}\\n {{#link-to \"about\" id=\"about-link-dynamic\" disabledWhen=dynamicDisabledWhen}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n shouldDisable: true,\n dynamicDisabledWhen: 'shouldDisable'\n }));\n\n this.visit('/');\n\n assert.equal(this.$('#about-link-static.disabled').length, 1, 'The static link is disabled when its disabledWhen is true');\n assert.equal(this.$('#about-link-dynamic.disabled').length, 1, 'The dynamic link is disabled when its disabledWhen is true');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return controller.set('dynamicDisabledWhen', false);\n });\n\n assert.equal(this.$('#about-link-dynamic.disabled').length, 0, 'The dynamic link is re-enabled when its disabledWhen becomes false');\n };\n\n _class.prototype['@test the {{link-to}} doesn\\'t apply a \\'disabled\\' class if disabledWhen is not provided'] = function (assert) {\n this.addTemplate('index', '{{#link-to \"about\" id=\"about-link\"}}About{{/link-to}}');\n\n this.visit('/');\n\n assert.ok(!this.$('#about-link').hasClass('disabled'), 'The link is not disabled if disabledWhen not provided');\n };\n\n _class.prototype['@test the {{link-to}} helper supports a custom disabledClass'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \"about\" id=\"about-link\" disabledWhen=true disabledClass=\"do-not-want\"}}About{{/link-to}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('#about-link.do-not-want').length, 1, 'The link can apply a custom disabled class');\n };\n\n _class.prototype['@test the {{link-to}} helper supports a custom disabledClass set via bound param'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \"about\" id=\"about-link\" disabledWhen=true disabledClass=disabledClass}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n disabledClass: 'do-not-want'\n }));\n\n this.visit('/');\n\n assert.equal(this.$('#about-link.do-not-want').length, 1, 'The link can apply a custom disabled class via bound param');\n };\n\n _class.prototype['@test the {{link-to}} helper does not respond to clicks when disabledWhen'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \"about\" id=\"about-link\" disabledWhen=true}}About{{/link-to}}\\n ');\n\n this.visit('/');\n this.click('#about-link');\n\n assert.equal(this.$('h3:contains(About)').length, 0, 'Transitioning did not occur');\n };\n\n _class.prototype['@test the {{link-to}} helper does not respond to clicks when disabled'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \"about\" id=\"about-link\" disabled=true}}About{{/link-to}}\\n ');\n\n this.visit('/');\n this.click('#about-link');\n\n assert.equal(this.$('h3:contains(About)').length, 0, 'Transitioning did not occur');\n };\n\n _class.prototype['@test the {{link-to}} helper responds to clicks according to its disabledWhen bound param'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \"about\" id=\"about-link\" disabledWhen=disabledWhen}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n disabledWhen: true\n }));\n\n this.visit('/');\n\n this.click('#about-link');\n\n assert.equal(this.$('h3:contains(About)').length, 0, 'Transitioning did not occur');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return controller.set('disabledWhen', false);\n });\n\n this.click('#about-link');\n\n assert.equal(this.$('h3:contains(About)').length, 1, 'Transitioning did occur when disabledWhen became false');\n };\n\n _class.prototype['@test The {{link-to}} helper supports a custom activeClass'] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'about\\' id=\\'about-link\\'}}About{{/link-to}}\\n {{#link-to \\'index\\' id=\\'self-link\\' activeClass=\\'zomg-active\\'}}Self{{/link-to}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('h3:contains(Home)').length, 1, 'The home template was rendered');\n assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');\n assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n };\n\n _class.prototype['@test The {{link-to}} helper supports a custom activeClass from a bound param'] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'about\\' id=\\'about-link\\'}}About{{/link-to}}\\n {{#link-to \\'index\\' id=\\'self-link\\' activeClass=activeClass}}Self{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n activeClass: 'zomg-active'\n }));\n\n this.visit('/');\n\n assert.equal(this.$('h3:contains(Home)').length, 1, 'The home template was rendered');\n assert.equal(this.$('#self-link.zomg-active').length, 1, 'The self-link was rendered with active class');\n assert.equal(this.$('#about-link:not(.active)').length, 1, 'The other link was rendered without active class');\n };\n\n _class.prototype['@test The {{link-to}} helper supports \\'classNameBindings\\' with custom values [GH #11699]'] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'about\\' id=\\'about-link\\' classNameBindings=\\'foo:foo-is-true:foo-is-false\\'}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n foo: false\n }));\n\n this.visit('/');\n\n assert.equal(this.$('#about-link.foo-is-false').length, 1, 'The about-link was rendered with the falsy class');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return controller.set('foo', true);\n });\n\n assert.equal(this.$('#about-link.foo-is-true').length, 1, 'The about-link was rendered with the truthy class after toggling the property');\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper - location hooks', function (_ApplicationTestCase2) {\n (0, _emberBabel.inherits)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase2.call(this));\n\n _this2.updateCount = 0;\n _this2.replaceCount = 0;\n\n var testContext = _this2;\n _this2.add('location:none', _emberRouting.NoneLocation.extend({\n setURL: function () {\n testContext.updateCount++;\n return this._super.apply(this, arguments);\n },\n replaceURL: function () {\n testContext.replaceCount++;\n return this._super.apply(this, arguments);\n }\n }));\n\n _this2.router.map(function () {\n this.route('about');\n });\n\n _this2.addTemplate('index', '\\n
\\n {{#link-to \\'about\\' id=\\'about-link\\' replace=true}}About{{/link-to}}\\n ');\n\n this.visit('/');\n this.click('#about-link');\n\n assert.equal(this.updateCount, this.updateCountAfterVisit, 'setURL should not be called');\n assert.equal(this.replaceCount, this.replaceCountAfterVisit + 1, 'replaceURL should be called once');\n };\n\n _class2.prototype['@test The {{link-to}} helper supports URL replacement via replace=boundTruthyThing'] = function testTheLinkToHelperSupportsURLReplacementViaReplaceBoundTruthyThing(assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'about\\' id=\\'about-link\\' replace=boundTruthyThing}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n boundTruthyThing: true\n }));\n\n this.visit('/');\n this.click('#about-link');\n\n assert.equal(this.updateCount, this.updateCountAfterVisit, 'setURL should not be called');\n assert.equal(this.replaceCount, this.replaceCountAfterVisit + 1, 'replaceURL should be called once');\n };\n\n _class2.prototype['@test The {{link-to}} helper supports setting replace=boundFalseyThing'] = function testTheLinkToHelperSupportsSettingReplaceBoundFalseyThing(assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'about\\' id=\\'about-link\\' replace=boundFalseyThing}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n boundFalseyThing: false\n }));\n\n this.visit('/');\n this.click('#about-link');\n\n assert.equal(this.updateCount, this.updateCountAfterVisit + 1, 'setURL should be called');\n assert.equal(this.replaceCount, this.replaceCountAfterVisit, 'replaceURL should not be called');\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n\n if (_features.EMBER_IMPROVED_INSTRUMENTATION) {\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper with EMBER_IMPROVED_INSTRUMENTATION', function (_ApplicationTestCase4) {\n (0, _emberBabel.inherits)(_class3, _ApplicationTestCase4);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n\n var _this3 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase4.call(this));\n\n _this3.router.map(function () {\n this.route('about');\n });\n\n _this3.addTemplate('index', '\\n
\\n {{#link-to \\'index\\' id=\\'home-link\\'}}Home{{/link-to}}\\n {{#link-to \\'about\\' id=\\'self-link\\'}}Self{{/link-to}}\\n ');\n\n _this3.visit('/');\n return _this3;\n }\n\n _class3.prototype['@test The {{link-to}} helper fires an interaction event'] = function testTheLinkToHelperFiresAnInteractionEvent(assert) {\n assert.expect(2);\n\n (0, _emberMetal.instrumentationSubscribe)('interaction.link-to', {\n before: function () {\n assert.ok(true, 'instrumentation subscriber was called');\n },\n after: function () {\n assert.ok(true, 'instrumentation subscriber was called');\n }\n });\n\n this.click('#about-link');\n };\n\n _class3.prototype['@test The {{link-to}} helper interaction event includes the route name'] = function testTheLinkToHelperInteractionEventIncludesTheRouteName(assert) {\n assert.expect(2);\n\n (0, _emberMetal.instrumentationSubscribe)('interaction.link-to', {\n before: function (name, timestamp, _ref) {\n var routeName = _ref.routeName;\n\n assert.equal(routeName, 'about', 'instrumentation subscriber was passed route name');\n },\n after: function (name, timestamp, _ref2) {\n var routeName = _ref2.routeName;\n\n assert.equal(routeName, 'about', 'instrumentation subscriber was passed route name');\n }\n });\n\n this.click('#about-link');\n };\n\n _class3.prototype['@test The {{link-to}} helper interaction event includes the transition in the after hook'] = function testTheLinkToHelperInteractionEventIncludesTheTransitionInTheAfterHook(assert) {\n assert.expect(1);\n\n (0, _emberMetal.instrumentationSubscribe)('interaction.link-to', {\n before: function () {},\n after: function (name, timestamp, _ref3) {\n var transition = _ref3.transition;\n\n assert.equal(transition.targetName, 'about', 'instrumentation subscriber was passed route name');\n }\n });\n\n this.click('#about-link');\n };\n\n return _class3;\n }(_internalTestHelpers.ApplicationTestCase));\n }\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper - nested routes and link-to arguments', function (_ApplicationTestCase5) {\n (0, _emberBabel.inherits)(_class4, _ApplicationTestCase5);\n\n function _class4() {\n (0, _emberBabel.classCallCheck)(this, _class4);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase5.apply(this, arguments));\n }\n\n _class4.prototype['@test The {{link-to}} helper supports leaving off .index for nested routes'] = function testTheLinkToHelperSupportsLeavingOffIndexForNestedRoutes(assert) {\n this.router.map(function () {\n this.route('about', function () {\n this.route('item');\n });\n });\n\n this.addTemplate('about', '
About
{{outlet}}');\n this.addTemplate('about.index', '
Index
');\n this.addTemplate('about.item', '
{{#link-to \\'about\\'}}About{{/link-to}}
');\n\n this.visit('/about/item');\n\n assert.equal(normalizeUrl(this.$('#item a').attr('href')), '/about');\n };\n\n _class4.prototype['@test The {{link-to}} helper supports currentWhen (DEPRECATED)'] = function testTheLinkToHelperSupportsCurrentWhenDEPRECATED(assert) {\n expectDeprecation('Usage of `currentWhen` is deprecated, use `current-when` instead.');\n\n this.router.map(function () {\n this.route('index', { path: '/' }, function () {\n this.route('about');\n });\n this.route('item');\n });\n\n this.addTemplate('index', '
Home
{{outlet}}');\n this.addTemplate('index.about', '\\n {{#link-to \\'item\\' id=\\'other-link\\' currentWhen=\\'index\\'}}ITEM{{/link-to}}\\n ');\n\n this.visit('/about');\n\n assert.equal(this.$('#other-link.active').length, 1, 'The link is active since current-when is a parent route');\n };\n\n _class4.prototype['@test The {{link-to}} helper supports custom, nested, current-when'] = function (assert) {\n this.router.map(function () {\n this.route('index', { path: '/' }, function () {\n this.route('about');\n });\n\n this.route('item');\n });\n\n this.addTemplate('index', '
Home
{{outlet}}');\n this.addTemplate('index.about', '\\n {{#link-to \\'item\\' id=\\'other-link\\' current-when=\\'index\\'}}ITEM{{/link-to}}\\n ');\n\n this.visit('/about');\n\n equal(this.$('#other-link.active').length, 1, 'The link is active since current-when is a parent route');\n };\n\n _class4.prototype['@test The {{link-to}} helper does not disregard current-when when it is given explicitly for a route'] = function (assert) {\n this.router.map(function () {\n this.route('index', { path: '/' }, function () {\n this.route('about');\n });\n\n this.route('items', function () {\n this.route('item');\n });\n });\n\n this.addTemplate('index', '
Home
{{outlet}}');\n this.addTemplate('index.about', '\\n {{#link-to \\'items\\' id=\\'other-link\\' current-when=\\'index\\'}}ITEM{{/link-to}}\\n ');\n\n this.visit('/about');\n\n assert.equal(this.$('#other-link.active').length, 1, 'The link is active when current-when is given for explicitly for a route');\n };\n\n _class4.prototype['@test The {{link-to}} helper does not disregard current-when when it is set via a bound param'] = function testTheLinkToHelperDoesNotDisregardCurrentWhenWhenItIsSetViaABoundParam(assert) {\n this.router.map(function () {\n this.route('index', { path: '/' }, function () {\n this.route('about');\n });\n\n this.route('items', function () {\n this.route('item');\n });\n });\n\n this.add('controller:index.about', _emberRuntime.Controller.extend({\n currentWhen: 'index'\n }));\n\n this.addTemplate('index', '
Home
{{outlet}}');\n this.addTemplate('index.about', '{{#link-to \\'items\\' id=\\'other-link\\' current-when=currentWhen}}ITEM{{/link-to}}');\n\n this.visit('/about');\n\n assert.equal(this.$('#other-link.active').length, 1, 'The link is active when current-when is given for explicitly for a route');\n };\n\n _class4.prototype['@test The {{link-to}} helper supports multiple current-when routes'] = function testTheLinkToHelperSupportsMultipleCurrentWhenRoutes(assert) {\n this.router.map(function () {\n this.route('index', { path: '/' }, function () {\n this.route('about');\n });\n this.route('item');\n this.route('foo');\n });\n\n this.addTemplate('index', '
Home
{{outlet}}');\n this.addTemplate('index.about', '{{#link-to \\'item\\' id=\\'link1\\' current-when=\\'item index\\'}}ITEM{{/link-to}}');\n this.addTemplate('item', '{{#link-to \\'item\\' id=\\'link2\\' current-when=\\'item index\\'}}ITEM{{/link-to}}');\n this.addTemplate('foo', '{{#link-to \\'item\\' id=\\'link3\\' current-when=\\'item index\\'}}ITEM{{/link-to}}');\n\n this.visit('/about');\n\n assert.equal(this.$('#link1.active').length, 1, 'The link is active since current-when contains the parent route');\n\n this.visit('/item');\n\n assert.equal(this.$('#link2.active').length, 1, 'The link is active since you are on the active route');\n\n this.visit('/foo');\n\n assert.equal(this.$('#link3.active').length, 0, 'The link is not active since current-when does not contain the active route');\n };\n\n _class4.prototype['@test The {{link-to}} helper supports boolean values for current-when'] = function testTheLinkToHelperSupportsBooleanValuesForCurrentWhen(assert) {\n this.router.map(function (match) {\n this.route('index', { path: '/' }, function () {\n this.route('about');\n });\n this.route('item');\n });\n\n this.addTemplate('index', '
Home
{{outlet}}');\n this.addTemplate('index.about', '{{#link-to \\'item\\' id=\\'other-link\\' current-when=true}}ITEM{{/link-to}}');\n\n this.visit('/about');\n\n assert.equal(this.$('#other-link').length, 1, 'The link is active since current-when is true');\n };\n\n _class4.prototype['@test The {{link-to}} helper defaults to bubbling'] = function testTheLinkToHelperDefaultsToBubbling(assert) {\n this.addTemplate('about', '\\n
\\n {{#link-to \\'about\\' id=\\'about-link\\'}}About{{/link-to}}\\n ');\n\n this.add('route:about', _emberRouting.Route.extend({\n model: function () {\n return [{ id: 'yehuda', name: 'Yehuda Katz' }, { id: 'tom', name: 'Tom Dale' }, { id: 'erik', name: 'Erik Brynroflsson' }];\n }\n }));\n\n this.visit('/about');\n\n assert.equal(this.$('h3:contains(List)').length, 1, 'The home template was rendered');\n assert.equal(normalizeUrl(this.$('#home-link').attr('href')), '/', 'The home link points back at /');\n\n this.click('li a:contains(Yehuda)');\n\n assert.equal(this.$('h3:contains(Item)').length, 1, 'The item template was rendered');\n assert.equal(this.$('p').text(), 'Yehuda Katz', 'The name is correct');\n\n this.click('#home-link');\n this.click('#about-link');\n\n assert.equal(normalizeUrl(this.$('li a:contains(Yehuda)').attr('href')), '/item/yehuda');\n assert.equal(normalizeUrl(this.$('li a:contains(Tom)').attr('href')), '/item/tom');\n assert.equal(normalizeUrl(this.$('li a:contains(Erik)').attr('href')), '/item/erik');\n\n this.click('li a:contains(Erik)');\n\n assert.equal(this.$('h3:contains(Item)').length, 1, 'The item template was rendered');\n assert.equal(this.$('p').text(), 'Erik Brynroflsson', 'The name is correct');\n };\n\n _class4.prototype['@test The {{link-to}} helper binds some anchor html tag common attributes'] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'index\\' id=\\'self-link\\' title=\\'title-attr\\' rel=\\'rel-attr\\' tabindex=\\'-1\\'}}\\n Self\\n {{/link-to}}\\n ');\n\n this.visit('/');\n\n var link = this.$('#self-link');\n assert.equal(link.attr('title'), 'title-attr', 'The self-link contains title attribute');\n assert.equal(link.attr('rel'), 'rel-attr', 'The self-link contains rel attribute');\n assert.equal(link.attr('tabindex'), '-1', 'The self-link contains tabindex attribute');\n };\n\n _class4.prototype['@test The {{link-to}} helper supports \\'target\\' attribute'] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'index\\' id=\\'self-link\\' target=\\'_blank\\'}}Self{{/link-to}}\\n ');\n\n this.visit('/');\n\n var link = this.$('#self-link');\n assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');\n };\n\n _class4.prototype['@test The {{link-to}} helper supports \\'target\\' attribute specified as a bound param'] = function (assert) {\n this.addTemplate('index', '
Home
{{#link-to \\'index\\' id=\\'self-link\\' target=boundLinkTarget}}Self{{/link-to}}');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n boundLinkTarget: '_blank'\n }));\n\n this.visit('/');\n\n var link = this.$('#self-link');\n assert.equal(link.attr('target'), '_blank', 'The self-link contains `target` attribute');\n };\n\n _class4.prototype['@test the {{link-to}} helper calls preventDefault'] = function (assert) {\n this.router.map(function () {\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{#link-to \\'about\\' id=\\'about-link\\'}}About{{/link-to}}\\n ');\n\n this.visit('/');\n\n var event = _emberViews.jQuery.Event('click');\n this.$('#about-link').trigger(event);\n\n assert.equal(event.isDefaultPrevented(), true, 'should preventDefault');\n };\n\n _class4.prototype['@test the {{link-to}} helper does not call preventDefault if \\'preventDefault=false\\' is passed as an option'] = function (assert) {\n this.router.map(function () {\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{#link-to \\'about\\' id=\\'about-link\\' preventDefault=false}}About{{/link-to}}\\n ');\n\n this.visit('/');\n\n var event = _emberViews.jQuery.Event('click');\n this.$('#about-link').trigger(event);\n\n assert.equal(event.isDefaultPrevented(), false, 'should not preventDefault');\n };\n\n _class4.prototype['@test the {{link-to}} helper does not call preventDefault if \\'preventDefault=boundFalseyThing\\' is passed as an option'] = function (assert) {\n this.router.map(function () {\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{#link-to \\'about\\' id=\\'about-link\\' preventDefault=boundFalseyThing}}About{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n boundFalseyThing: false\n }));\n\n this.visit('/');\n\n var event = _emberViews.jQuery.Event('click');\n this.$('#about-link').trigger(event);\n\n equal(event.isDefaultPrevented(), false, 'should not preventDefault');\n };\n\n _class4.prototype['@test The {{link-to}} helper does not call preventDefault if \\'target\\' attribute is provided'] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'index\\' id=\\'self-link\\' target=\\'_blank\\'}}Self{{/link-to}}\\n ');\n\n this.visit('/');\n\n var event = _emberViews.jQuery.Event('click');\n this.$('#self-link').trigger(event);\n\n assert.equal(event.isDefaultPrevented(), false, 'should not preventDefault when target attribute is specified');\n };\n\n _class4.prototype['@test The {{link-to}} helper should preventDefault when \\'target = _self\\''] = function (assert) {\n this.addTemplate('index', '\\n
Home
\\n {{#link-to \\'index\\' id=\\'self-link\\' target=\\'_self\\'}}Self{{/link-to}}\\n ');\n\n this.visit('/');\n\n var event = _emberViews.jQuery.Event('click');\n this.$('#self-link').trigger(event);\n\n equal(event.isDefaultPrevented(), true, 'should preventDefault when target attribute is `_self`');\n };\n\n _class4.prototype['@test The {{link-to}} helper should not transition if target is not equal to _self or empty'] = function (assert) {\n this.addTemplate('index', '\\n {{#link-to \\'about\\' id=\\'about-link\\' replace=true target=\\'_blank\\'}}\\n About\\n {{/link-to}}\\n ');\n\n this.router.map(function () {\n this.route('about');\n });\n\n this.visit('/');\n this.click('#about-link');\n\n var currentRouteName = this.applicationInstance.lookup('controller:application').get('currentRouteName');\n assert.notEqual(currentRouteName, 'about', 'link-to should not transition if target is not equal to _self or empty');\n };\n\n _class4.prototype['@test The {{link-to}} helper accepts string/numeric arguments'] = function (assert) {\n this.router.map(function () {\n this.route('filter', { path: '/filters/:filter' });\n this.route('post', { path: '/post/:post_id' });\n this.route('repo', { path: '/repo/:owner/:name' });\n });\n\n this.add('controller:filter', _emberRuntime.Controller.extend({\n filter: 'unpopular',\n repo: { owner: 'ember', name: 'ember.js' },\n post_id: 123\n }));\n\n this.addTemplate('filter', '\\n
{{filter}}
\\n {{#link-to \"filter\" \"unpopular\" id=\"link\"}}Unpopular{{/link-to}}\\n {{#link-to \"filter\" filter id=\"path-link\"}}Unpopular{{/link-to}}\\n {{#link-to \"post\" post_id id=\"post-path-link\"}}Post{{/link-to}}\\n {{#link-to \"post\" 123 id=\"post-number-link\"}}Post{{/link-to}}\\n {{#link-to \"repo\" repo id=\"repo-object-link\"}}Repo{{/link-to}}\\n ');\n\n this.visit('/filters/popular');\n\n assert.equal(normalizeUrl(this.$('#link').attr('href')), '/filters/unpopular');\n assert.equal(normalizeUrl(this.$('#path-link').attr('href')), '/filters/unpopular');\n assert.equal(normalizeUrl(this.$('#post-path-link').attr('href')), '/post/123');\n assert.equal(normalizeUrl(this.$('#post-number-link').attr('href')), '/post/123');\n assert.equal(normalizeUrl(this.$('#repo-object-link').attr('href')), '/repo/ember/ember.js');\n };\n\n _class4.prototype['@test Issue 4201 - Shorthand for route.index shouldn\\'t throw errors about context arguments'] = function (assert) {\n assert.expect(2);\n this.router.map(function () {\n this.route('lobby', function () {\n this.route('index', { path: ':lobby_id' });\n this.route('list');\n });\n });\n\n this.add('route:lobby.index', _emberRouting.Route.extend({\n model: function (params) {\n assert.equal(params.lobby_id, 'foobar');\n return params.lobby_id;\n }\n }));\n\n this.addTemplate('lobby.index', '\\n {{#link-to \\'lobby\\' \\'foobar\\' id=\\'lobby-link\\'}}Lobby{{/link-to}}\\n ');\n this.addTemplate('lobby.list', '\\n {{#link-to \\'lobby\\' \\'foobar\\' id=\\'lobby-link\\'}}Lobby{{/link-to}}\\n ');\n\n this.visit('/lobby/list');\n this.click('#lobby-link');\n\n shouldBeActive(assert, this.$('#lobby-link'));\n };\n\n _class4.prototype['@test Quoteless route param performs property lookup'] = function (assert) {\n var _this5 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{#link-to \\'index\\' id=\\'string-link\\'}}string{{/link-to}}\\n {{#link-to foo id=\\'path-link\\'}}path{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n foo: 'index'\n }));\n\n var assertEquality = function (href) {\n assert.equal(normalizeUrl(_this5.$('#string-link').attr('href')), '/');\n assert.equal(normalizeUrl(_this5.$('#path-link').attr('href')), href);\n };\n\n this.visit('/');\n\n assertEquality('/');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return controller.set('foo', 'about');\n });\n\n assertEquality('/about');\n };\n\n _class4.prototype['@test The {{link-to}} helper refreshes href element when one of params changes'] = function (assert) {\n this.router.map(function () {\n this.route('post', { path: '/posts/:post_id' });\n });\n\n var post = { id: '1' };\n var secondPost = { id: '2' };\n\n this.addTemplate('index', '\\n {{#link-to \"post\" post id=\"post\"}}post{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend());\n\n this.visit('/');\n\n var indexController = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return indexController.set('post', post);\n });\n\n assert.equal(normalizeUrl(this.$('#post').attr('href')), '/posts/1', 'precond - Link has rendered href attr properly');\n\n this.runTask(function () {\n return indexController.set('post', secondPost);\n });\n\n assert.equal(this.$('#post').attr('href'), '/posts/2', 'href attr was updated after one of the params had been changed');\n\n this.runTask(function () {\n return indexController.set('post', null);\n });\n\n assert.equal(this.$('#post').attr('href'), '#', 'href attr becomes # when one of the arguments in nullified');\n };\n\n _class4.prototype['@test The {{link-to}} helper is active when a route is active'] = function (assert) {\n this.router.map(function () {\n this.route('about', function () {\n this.route('item');\n });\n });\n\n this.addTemplate('about', '\\n
\\n ');\n\n this.visit('/about');\n\n assert.equal(this.$('#about-link.active').length, 1, 'The about route link is active');\n assert.equal(this.$('#item-link.active').length, 0, 'The item route link is inactive');\n\n this.visit('/about/item');\n\n assert.equal(this.$('#about-link.active').length, 1, 'The about route link is active');\n assert.equal(this.$('#item-link.active').length, 1, 'The item route link is active');\n };\n\n _class4.prototype['@test The {{link-to}} helper works in an #each\\'d array of string route names'] = function (assert) {\n var _this6 = this;\n\n this.router.map(function () {\n this.route('foo');\n this.route('bar');\n this.route('rar');\n });\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n routeNames: (0, _emberRuntime.A)(['foo', 'bar', 'rar']),\n route1: 'bar',\n route2: 'foo'\n }));\n\n this.addTemplate('index', '\\n {{#each routeNames as |routeName|}}\\n {{#link-to routeName}}{{routeName}}{{/link-to}}\\n {{/each}}\\n {{#each routeNames as |r|}}\\n {{#link-to r}}{{r}}{{/link-to}}\\n {{/each}}\\n {{#link-to route1}}a{{/link-to}}\\n {{#link-to route2}}b{{/link-to}}\\n ');\n\n this.visit('/');\n\n var linksEqual = function (links, expected) {\n equal(links.length, expected.length, 'Has correct number of links');\n\n var idx = void 0;\n for (idx = 0; idx < links.length; idx++) {\n var href = _this6.$(links[idx]).attr('href');\n // Old IE includes the whole hostname as well\n assert.equal(href.slice(-expected[idx].length), expected[idx], 'Expected link to be \\'' + expected[idx] + '\\', but was \\'' + href + '\\'');\n }\n };\n\n linksEqual(this.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/bar', '/foo']);\n\n var indexController = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return indexController.set('route1', 'rar');\n });\n\n linksEqual(this.$('a'), ['/foo', '/bar', '/rar', '/foo', '/bar', '/rar', '/rar', '/foo']);\n\n this.runTask(function () {\n return indexController.routeNames.shiftObject();\n });\n\n linksEqual(this.$('a'), ['/bar', '/rar', '/bar', '/rar', '/rar', '/foo']);\n };\n\n _class4.prototype['@test The non-block form {{link-to}} helper moves into the named route'] = function (assert) {\n assert.expect(3);\n this.router.map(function () {\n this.route('contact');\n });\n\n this.addTemplate('index', '\\n
\\n {{link-to \\'Home\\' \\'index\\' id=\\'home-link\\'}}\\n {{link-to \\'Self\\' \\'contact\\' id=\\'self-link\\'}}\\n ');\n\n this.visit('/');\n\n this.click('#contact-link');\n\n assert.equal(this.$('h3:contains(Contact)').length, 1, 'The contact template was rendered');\n assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n };\n\n _class4.prototype['@test The non-block form {{link-to}} helper updates the link text when it is a binding'] = function (assert) {\n assert.expect(8);\n this.router.map(function () {\n this.route('contact');\n });\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n contactName: 'Jane'\n }));\n\n this.addTemplate('index', '\\n
\\n {{link-to \\'Home\\' \\'index\\' id=\\'home-link\\'}}\\n {{link-to \\'Self\\' \\'contact\\' id=\\'self-link\\'}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('#contact-link:contains(Jane)').length, 1, 'The link title is correctly resolved');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return controller.set('contactName', 'Joe');\n });\n\n assert.equal(this.$('#contact-link:contains(Joe)').length, 1, 'The link title is correctly updated when the bound property changes');\n\n this.runTask(function () {\n return controller.set('contactName', 'Robert');\n });\n\n assert.equal(this.$('#contact-link:contains(Robert)').length, 1, 'The link title is correctly updated when the bound property changes a second time');\n\n this.click('#contact-link');\n\n assert.equal(this.$('h3:contains(Contact)').length, 1, 'The contact template was rendered');\n assert.equal(this.$('#self-link.active').length, 1, 'The self-link was rendered with active class');\n assert.equal(this.$('#home-link:not(.active)').length, 1, 'The other link was rendered without active class');\n\n this.click('#home-link');\n\n assert.equal(this.$('h3:contains(Home)').length, 1, 'The index template was rendered');\n assert.equal(this.$('#contact-link:contains(Robert)').length, 1, 'The link title is correctly updated when the route changes');\n };\n\n _class4.prototype['@test The non-block form {{link-to}} helper moves into the named route with context'] = function (assert) {\n assert.expect(5);\n\n this.router.map(function () {\n this.route('item', { path: '/item/:id' });\n });\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function () {\n return [{ id: 'yehuda', name: 'Yehuda Katz' }, { id: 'tom', name: 'Tom Dale' }, { id: 'erik', name: 'Erik Brynroflsson' }];\n }\n }));\n\n this.addTemplate('index', '\\n
Home
\\n
\\n {{#each model as |person|}}\\n
\\n {{link-to person.name \\'item\\' person}}\\n
\\n {{/each}}\\n
\\n ');\n this.addTemplate('item', '\\n
Item
\\n
{{model.name}}
\\n {{#link-to \\'index\\' id=\\'home-link\\'}}Home{{/link-to}}\\n ');\n\n this.visit('/');\n\n this.click('li a:contains(Yehuda)');\n\n assert.equal(this.$('h3:contains(Item)').length, 1, 'The item template was rendered');\n assert.equal(this.$('p').text(), 'Yehuda Katz', 'The name is correct');\n\n this.click('#home-link');\n\n assert.equal(normalizeUrl(this.$('li a:contains(Yehuda)').attr('href')), '/item/yehuda');\n assert.equal(normalizeUrl(this.$('li a:contains(Tom)').attr('href')), '/item/tom');\n assert.equal(normalizeUrl(this.$('li a:contains(Erik)').attr('href')), '/item/erik');\n };\n\n _class4.prototype['@test The non-block form {{link-to}} performs property lookup'] = function (assert) {\n var _this7 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{link-to \\'string\\' \\'index\\' id=\\'string-link\\'}}\\n {{link-to path foo id=\\'path-link\\'}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n foo: 'index'\n }));\n\n this.visit('/');\n\n var assertEquality = function (href) {\n assert.equal(normalizeUrl(_this7.$('#string-link').attr('href')), '/');\n assert.equal(normalizeUrl(_this7.$('#path-link').attr('href')), href);\n };\n\n assertEquality('/');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n return controller.set('foo', 'about');\n });\n\n assertEquality('/about');\n };\n\n _class4.prototype['@test The non-block form {{link-to}} protects against XSS'] = function (assert) {\n this.addTemplate('application', '{{link-to display \\'index\\' id=\\'link\\'}}');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n display: 'blahzorz'\n }));\n\n this.visit('/');\n\n assert.equal(this.$('#link').text(), 'blahzorz');\n\n var controller = this.applicationInstance.lookup('controller:application');\n this.runTask(function () {\n return controller.set('display', 'BLAMMO');\n });\n\n assert.equal(this.$('#link').text(), 'BLAMMO');\n assert.equal(this.$('b').length, 0);\n };\n\n _class4.prototype['@test the {{link-to}} helper does not throw an error if its route has exited'] = function (assert) {\n assert.expect(0);\n\n this.router.map(function () {\n this.route('post', { path: 'post/:post_id' });\n });\n\n this.addTemplate('application', '\\n {{#link-to \\'index\\' id=\\'home-link\\'}}Home{{/link-to}}\\n {{#link-to \\'post\\' defaultPost id=\\'default-post-link\\'}}Default Post{{/link-to}}\\n {{#if currentPost}}\\n {{#link-to \\'post\\' currentPost id=\\'current-post-link\\'}}Current Post{{/link-to}}\\n {{/if}}\\n ');\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n defaultPost: { id: 1 },\n postController: _emberRuntime.inject.controller('post'),\n currentPost: (0, _emberMetal.alias)('postController.model')\n }));\n\n this.add('controller:post', _emberRuntime.Controller.extend());\n\n this.add('route:post', _emberRouting.Route.extend({\n model: function () {\n return { id: 2 };\n },\n serialize: function (model) {\n return { post_id: model.id };\n }\n }));\n\n this.visit('/');\n\n this.click('#default-post-link');\n this.click('#home-link');\n this.click('#current-post-link');\n this.click('#home-link');\n };\n\n _class4.prototype['@test {{link-to}} active property respects changing parent route context'] = function (assert) {\n this.router.map(function () {\n this.route('things', { path: '/things/:name' }, function () {\n this.route('other');\n });\n });\n\n this.addTemplate('application', '\\n {{link-to \\'OMG\\' \\'things\\' \\'omg\\' id=\\'omg-link\\'}}\\n {{link-to \\'LOL\\' \\'things\\' \\'lol\\' id=\\'lol-link\\'}}\\n ');\n\n this.visit('/things/omg');\n\n shouldBeActive(assert, this.$('#omg-link'));\n shouldNotBeActive(assert, this.$('#lol-link'));\n\n this.visit('/things/omg/other');\n\n shouldBeActive(assert, this.$('#omg-link'));\n shouldNotBeActive(assert, this.$('#lol-link'));\n };\n\n _class4.prototype['@test {{link-to}} populates href with default query param values even without query-params object'] = function (assert) {\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['foo'],\n foo: '123'\n }));\n\n this.addTemplate('index', '{{#link-to \\'index\\' id=\\'the-link\\'}}Index{{/link-to}}');\n\n this.visit('/');\n\n assert.equal(this.$('#the-link').attr('href'), '/', 'link has right href');\n };\n\n _class4.prototype['@test {{link-to}} populates href with default query param values with empty query-params object'] = function (assert) {\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['foo'],\n foo: '123'\n }));\n\n this.addTemplate('index', '\\n {{#link-to \\'index\\' (query-params) id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('#the-link').attr('href'), '/', 'link has right href');\n };\n\n _class4.prototype['@test {{link-to}} with only query-params and a block updates when route changes'] = function (assert) {\n this.router.map(function () {\n this.route('about');\n });\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n queryParams: ['foo', 'bar'],\n foo: '123',\n bar: 'yes'\n }));\n\n this.addTemplate('application', '\\n {{#link-to (query-params foo=\\'456\\' bar=\\'NAW\\') id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('#the-link').attr('href'), '/?bar=NAW&foo=456', 'link has right href');\n\n this.visit('/about');\n\n assert.equal(this.$('#the-link').attr('href'), '/about?bar=NAW&foo=456', 'link has right href');\n };\n\n _class4.prototype['@test Block-less {{link-to}} with only query-params updates when route changes'] = function (assert) {\n this.router.map(function () {\n this.route('about');\n });\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n queryParams: ['foo', 'bar'],\n foo: '123',\n bar: 'yes'\n }));\n\n this.addTemplate('application', '\\n {{link-to \"Index\" (query-params foo=\\'456\\' bar=\\'NAW\\') id=\\'the-link\\'}}\\n ');\n\n this.visit('/');\n\n assert.equal(this.$('#the-link').attr('href'), '/?bar=NAW&foo=456', 'link has right href');\n\n this.visit('/about');\n\n assert.equal(this.$('#the-link').attr('href'), '/about?bar=NAW&foo=456', 'link has right href');\n };\n\n _class4.prototype['@test The {{link-to}} helper can use dynamic params'] = function (assert) {\n this.router.map(function () {\n this.route('foo', { path: 'foo/:some/:thing' });\n this.route('bar', { path: 'bar/:some/:thing/:else' });\n });\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n init: function () {\n this._super.apply(this, arguments);\n this.dynamicLinkParams = ['foo', 'one', 'two'];\n }\n }));\n\n this.addTemplate('index', '\\n
Home
\\n {{#link-to params=dynamicLinkParams id=\"dynamic-link\"}}Dynamic{{/link-to}}\\n ');\n\n this.visit('/');\n\n var link = this.$('#dynamic-link');\n\n assert.equal(link.attr('href'), '/foo/one/two');\n\n var controller = this.applicationInstance.lookup('controller:index');\n this.runTask(function () {\n controller.set('dynamicLinkParams', ['bar', 'one', 'two', 'three']);\n });\n\n assert.equal(link.attr('href'), '/bar/one/two/three');\n };\n\n _class4.prototype['@test GJ: {{link-to}} to a parent root model hook which performs a \\'transitionTo\\' has correct active class #13256'] = function (assert) {\n assert.expect(1);\n\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n\n this.add('route:parent', _emberRouting.Route.extend({\n afterModel: function (transition) {\n this.transitionTo('parent.child');\n }\n }));\n\n this.addTemplate('application', '\\n {{link-to \\'Parent\\' \\'parent\\' id=\\'parent-link\\'}}\\n ');\n\n this.visit('/');\n\n this.click('#parent-link');\n\n shouldBeActive(assert, this.$('#parent-link'));\n };\n\n return _class4;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper - loading states and warnings', function (_ApplicationTestCase6) {\n (0, _emberBabel.inherits)(_class5, _ApplicationTestCase6);\n\n function _class5() {\n (0, _emberBabel.classCallCheck)(this, _class5);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase6.apply(this, arguments));\n }\n\n _class5.prototype['@test link-to with null/undefined dynamic parameters are put in a loading state'] = function (assert) {\n var _this9 = this;\n\n assert.expect(19);\n var warningMessage = 'This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.';\n\n this.router.map(function () {\n this.route('thing', { path: '/thing/:thing_id' });\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{#link-to destinationRoute routeContext loadingClass=\\'i-am-loading\\' id=\\'context-link\\'}}\\n string\\n {{/link-to}}\\n {{#link-to secondRoute loadingClass=loadingClass id=\\'static-link\\'}}\\n string\\n {{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n destinationRoute: null,\n routeContext: null,\n loadingClass: 'i-am-loading'\n }));\n\n this.add('route:about', _emberRouting.Route.extend({\n activate: function () {\n assert.ok(true, 'About was entered');\n }\n }));\n\n this.visit('/');\n\n function assertLinkStatus(link, url) {\n if (url) {\n assert.equal(normalizeUrl(link.attr('href')), url, 'loaded link-to has expected href');\n assert.ok(!link.hasClass('i-am-loading'), 'loaded linkComponent has no loadingClass');\n } else {\n assert.equal(normalizeUrl(link.attr('href')), '#', \"unloaded link-to has href='#'\");\n assert.ok(link.hasClass('i-am-loading'), 'loading linkComponent has loadingClass');\n }\n }\n\n var contextLink = this.$('#context-link');\n var staticLink = this.$('#static-link');\n var controller = this.applicationInstance.lookup('controller:index');\n\n assertLinkStatus(contextLink);\n assertLinkStatus(staticLink);\n\n expectWarning(function () {\n _this9.click(contextLink);\n }, warningMessage);\n\n // Set the destinationRoute (context is still null).\n this.runTask(function () {\n return controller.set('destinationRoute', 'thing');\n });\n assertLinkStatus(contextLink);\n\n // Set the routeContext to an id\n this.runTask(function () {\n return controller.set('routeContext', '456');\n });\n assertLinkStatus(contextLink, '/thing/456');\n\n // Test that 0 isn't interpreted as falsy.\n this.runTask(function () {\n return controller.set('routeContext', 0);\n });\n assertLinkStatus(contextLink, '/thing/0');\n\n // Set the routeContext to an object\n this.runTask(function () {\n controller.set('routeContext', { id: 123 });\n });\n assertLinkStatus(contextLink, '/thing/123');\n\n // Set the destinationRoute back to null.\n this.runTask(function () {\n return controller.set('destinationRoute', null);\n });\n assertLinkStatus(contextLink);\n\n expectWarning(function () {\n _this9.click(staticLink);\n }, warningMessage);\n\n this.runTask(function () {\n return controller.set('secondRoute', 'about');\n });\n assertLinkStatus(staticLink, '/about');\n\n // Click the now-active link\n this.click(staticLink);\n };\n\n return _class5;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper - globals mode app', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class6, _AutobootApplicationT);\n\n function _class6() {\n (0, _emberBabel.classCallCheck)(this, _class6);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.apply(this, arguments));\n }\n\n _class6.prototype['@test the {{link-to}} helper throws a useful error if you invoke it wrong'] = function (assert) {\n var _this11 = this;\n\n assert.expect(1);\n\n assert.throws(function () {\n _this11.runTask(function () {\n _this11.createApplication();\n\n _this11.add('router:main', _emberRouting.Router.extend({\n location: 'none'\n }));\n\n _this11.router.map(function () {\n this.route('post', { path: 'post/:post_id' });\n });\n\n _this11.addTemplate('application', '{{#link-to \\'post\\'}}Post{{/link-to}}');\n });\n }, /(You attempted to define a `\\{\\{link-to \"post\"\\}\\}` but did not pass the parameters required for generating its dynamic segments.|You must provide param `post_id` to `generate`)/);\n };\n\n return _class6;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/helpers/link_to_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/helpers/link_to_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['ember-babel', 'ember-runtime', 'ember-routing', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberRouting, _internalTestHelpers) {\n 'use strict';\n\n function assertHasClass(assert, selector, label) {\n var testLabel = selector.attr('id') + ' should have class ' + label;\n\n assert.equal(selector.hasClass(label), true, testLabel);\n }\n\n function assertHasNoClass(assert, selector, label) {\n var testLabel = selector.attr('id') + ' should not have class ' + label;\n\n assert.equal(selector.hasClass(label), false, testLabel);\n }\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper: .transitioning-in .transitioning-out CSS classes', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this2 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n\n _this2.aboutDefer = _emberRuntime.RSVP.defer();\n _this2.otherDefer = _emberRuntime.RSVP.defer();\n _this2.newsDefer = _emberRuntime.RSVP.defer();\n var _this = _this2;\n\n _this2.router.map(function () {\n this.route('about');\n this.route('other');\n this.route('news');\n });\n\n _this2.add('route:about', _emberRouting.Route.extend({\n model: function () {\n return _this.aboutDefer.promise;\n }\n }));\n\n _this2.add('route:other', _emberRouting.Route.extend({\n model: function () {\n return _this.otherDefer.promise;\n }\n }));\n\n _this2.add('route:news', _emberRouting.Route.extend({\n model: function () {\n return _this.newsDefer.promise;\n }\n }));\n\n _this2.addTemplate('application', '\\n {{outlet}}\\n {{link-to \\'Index\\' \\'index\\' id=\\'index-link\\'}}\\n {{link-to \\'About\\' \\'about\\' id=\\'about-link\\'}}\\n {{link-to \\'Other\\' \\'other\\' id=\\'other-link\\'}}\\n {{link-to \\'News\\' \\'news\\' activeClass=false id=\\'news-link\\'}}\\n ');\n\n _this2.visit('/');\n return _this2;\n }\n\n _class.prototype.teardown = function teardown() {\n _ApplicationTestCase.prototype.teardown.call(this);\n this.aboutDefer = null;\n this.otherDefer = null;\n this.newsDefer = null;\n };\n\n _class.prototype['@test while a transition is underway'] = function testWhileATransitionIsUnderway(assert) {\n var _this3 = this;\n\n var $index = this.$('#index-link');\n var $about = this.$('#about-link');\n var $other = this.$('#other-link');\n\n $about.click();\n\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n\n this.runTask(function () {\n return _this3.aboutDefer.resolve();\n });\n\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n _class.prototype['@test while a transition is underway with activeClass is false'] = function testWhileATransitionIsUnderwayWithActiveClassIsFalse(assert) {\n var _this4 = this;\n\n var $index = this.$('#index-link');\n var $news = this.$('#news-link');\n var $other = this.$('#other-link');\n\n $news.click();\n\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $news, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $news, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $news, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n\n this.runTask(function () {\n return _this4.newsDefer.resolve();\n });\n\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $news, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $news, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $news, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper: .transitioning-in .transitioning-out CSS classes - nested link-to\\'s', function (_ApplicationTestCase2) {\n (0, _emberBabel.inherits)(_class2, _ApplicationTestCase2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n\n var _this5 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase2.call(this));\n\n _this5.aboutDefer = _emberRuntime.RSVP.defer();\n _this5.otherDefer = _emberRuntime.RSVP.defer();\n var _this = _this5;\n\n _this5.router.map(function () {\n this.route('parent-route', function () {\n this.route('about');\n this.route('other');\n });\n });\n _this5.add('route:parent-route.about', _emberRouting.Route.extend({\n model: function () {\n return _this.aboutDefer.promise;\n }\n }));\n\n _this5.add('route:parent-route.other', _emberRouting.Route.extend({\n model: function () {\n return _this.otherDefer.promise;\n }\n }));\n\n _this5.addTemplate('application', '\\n {{outlet}}\\n {{#link-to \\'index\\' tagName=\\'li\\'}}\\n {{link-to \\'Index\\' \\'index\\' id=\\'index-link\\'}}\\n {{/link-to}}\\n {{#link-to \\'parent-route.about\\' tagName=\\'li\\'}}\\n {{link-to \\'About\\' \\'parent-route.about\\' id=\\'about-link\\'}}\\n {{/link-to}}\\n {{#link-to \\'parent-route.other\\' tagName=\\'li\\'}}\\n {{link-to \\'Other\\' \\'parent-route.other\\' id=\\'other-link\\'}}\\n {{/link-to}}\\n ');\n\n _this5.visit('/');\n return _this5;\n }\n\n _class2.prototype.resolveAbout = function resolveAbout() {\n var _this6 = this;\n\n return this.runTask(function () {\n _this6.aboutDefer.resolve();\n _this6.aboutDefer = _emberRuntime.RSVP.defer();\n });\n };\n\n _class2.prototype.resolveOther = function resolveOther() {\n var _this7 = this;\n\n return this.runTask(function () {\n _this7.otherDefer.resolve();\n _this7.otherDefer = _emberRuntime.RSVP.defer();\n });\n };\n\n _class2.prototype.teardown = function teardown() {\n _ApplicationTestCase2.prototype.teardown.call(this);\n this.aboutDefer = null;\n this.otherDefer = null;\n };\n\n _class2.prototype['@test while a transition is underway with nested link-to\\'s'] = function (assert) {\n var $index = this.$('#index-link');\n var $about = this.$('#about-link');\n var $other = this.$('#other-link');\n\n $about.click();\n\n assertHasClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasNoClass(assert, $about, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n\n this.resolveAbout();\n\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n\n $other.click();\n\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n\n this.resolveOther();\n\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n\n $about.click();\n\n assertHasNoClass(assert, $index, 'active');\n assertHasNoClass(assert, $about, 'active');\n assertHasClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasClass(assert, $other, 'ember-transitioning-out');\n\n this.resolveAbout();\n\n assertHasNoClass(assert, $index, 'active');\n assertHasClass(assert, $about, 'active');\n assertHasNoClass(assert, $other, 'active');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-in');\n assertHasNoClass(assert, $about, 'ember-transitioning-in');\n assertHasNoClass(assert, $other, 'ember-transitioning-in');\n\n assertHasNoClass(assert, $index, 'ember-transitioning-out');\n assertHasNoClass(assert, $about, 'ember-transitioning-out');\n assertHasNoClass(assert, $other, 'ember-transitioning-out');\n };\n\n return _class2;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/helpers/link_to_test/link_to_transitioning_classes_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/helpers/link_to_test/link_to_transitioning_classes_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/helpers/link_to_test/link_to_with_query_params_test', ['ember-babel', 'ember-runtime', 'ember-routing', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberRouting, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper: invoking with query params', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n\n var indexProperties = {\n foo: '123',\n bar: 'abc'\n };\n _this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['foo', 'bar', 'abool'],\n foo: indexProperties.foo,\n bar: indexProperties.bar,\n boundThing: 'OMG',\n abool: true\n }));\n _this.add('controller:about', _emberRuntime.Controller.extend({\n queryParams: ['baz', 'bat'],\n baz: 'alex',\n bat: 'borf'\n }));\n _this.indexProperties = indexProperties;\n return _this;\n }\n\n _class.prototype.shouldNotBeActive = function shouldNotBeActive(assert, selector) {\n this.checkActive(assert, selector, false);\n };\n\n _class.prototype.shouldBeActive = function shouldBeActive(assert, selector) {\n this.checkActive(assert, selector, true);\n };\n\n _class.prototype.getController = function getController(name) {\n return this.applicationInstance.lookup('controller:' + name);\n };\n\n _class.prototype.checkActive = function checkActive(assert, selector, active) {\n var classList = this.$(selector)[0].className;\n assert.equal(classList.indexOf('active') > -1, active, selector + ' active should be ' + active.toString());\n };\n\n _class.prototype['@test doesn\\'t update controller QP properties on current route when invoked'] = function (assert) {\n var _this2 = this;\n\n this.addTemplate('index', '\\n {{#link-to \\'index\\' id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n _this2.click('#the-link');\n var indexController = _this2.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this2.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _class.prototype['@test doesn\\'t update controller QP properties on current route when invoked (empty query-params obj)'] = function (assert) {\n var _this3 = this;\n\n this.addTemplate('index', '\\n {{#link-to \\'index\\' (query-params) id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n _this3.click('#the-link');\n var indexController = _this3.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this3.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _class.prototype['@test doesn\\'t update controller QP properties on current route when invoked (empty query-params obj, inferred route)'] = function (assert) {\n var _this4 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params) id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n _this4.click('#the-link');\n var indexController = _this4.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), _this4.indexProperties, 'controller QP properties do not update');\n });\n };\n\n _class.prototype['@test updates controller QP properties on current route when invoked'] = function testUpdatesControllerQPPropertiesOnCurrentRouteWhenInvoked(assert) {\n var _this5 = this;\n\n this.addTemplate('index', '\\n {{#link-to \\'index\\' (query-params foo=\\'456\\') id=\"the-link\"}}\\n Index\\n {{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n _this5.click('#the-link');\n var indexController = _this5.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), { foo: '456', bar: 'abc' }, 'controller QP properties updated');\n });\n };\n\n _class.prototype['@test updates controller QP properties on current route when invoked (inferred route)'] = function testUpdatesControllerQPPropertiesOnCurrentRouteWhenInvokedInferredRoute(assert) {\n var _this6 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params foo=\\'456\\') id=\"the-link\"}}\\n Index\\n {{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n _this6.click('#the-link');\n var indexController = _this6.getController('index');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar'), { foo: '456', bar: 'abc' }, 'controller QP properties updated');\n });\n };\n\n _class.prototype['@test updates controller QP properties on other route after transitioning to that route'] = function testUpdatesControllerQPPropertiesOnOtherRouteAfterTransitioningToThatRoute(assert) {\n var _this7 = this;\n\n this.router.map(function () {\n this.route('about');\n });\n\n this.addTemplate('index', '\\n {{#link-to \\'about\\' (query-params baz=\\'lol\\') id=\\'the-link\\'}}\\n About\\n {{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n var theLink = _this7.$('#the-link');\n assert.equal(theLink.attr('href'), '/about?baz=lol');\n\n _this7.runTask(function () {\n return _this7.click('#the-link');\n });\n\n var aboutController = _this7.getController('about');\n\n assert.deepEqual(aboutController.getProperties('baz', 'bat'), { baz: 'lol', bat: 'borf' }, 'about controller QP properties updated');\n });\n };\n\n _class.prototype['@test supplied QP properties can be bound'] = function testSuppliedQPPropertiesCanBeBound(assert) {\n var _this8 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params foo=boundThing) id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n var indexController = _this8.getController('index');\n var theLink = _this8.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?foo=OMG');\n\n _this8.runTask(function () {\n return indexController.set('boundThing', 'ASL');\n });\n\n assert.equal(theLink.attr('href'), '/?foo=ASL');\n });\n };\n\n _class.prototype['@test supplied QP properties can be bound (booleans)'] = function testSuppliedQPPropertiesCanBeBoundBooleans(assert) {\n var _this9 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params abool=boundThing) id=\\'the-link\\'}}\\n Index\\n {{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n var indexController = _this9.getController('index');\n var theLink = _this9.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?abool=OMG');\n\n _this9.runTask(function () {\n return indexController.set('boundThing', false);\n });\n\n assert.equal(theLink.attr('href'), '/?abool=false');\n\n _this9.click('#the-link');\n\n assert.deepEqual(indexController.getProperties('foo', 'bar', 'abool'), { foo: '123', bar: 'abc', abool: false }, 'bound bool QP properties update');\n });\n };\n\n _class.prototype['@test href updates when unsupplied controller QP props change'] = function testHrefUpdatesWhenUnsuppliedControllerQPPropsChange(assert) {\n var _this10 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params foo=\\'lol\\') id=\\'the-link\\'}}Index{{/link-to}}\\n ');\n\n return this.visit('/').then(function () {\n var indexController = _this10.getController('index');\n var theLink = _this10.$('#the-link');\n\n assert.equal(theLink.attr('href'), '/?foo=lol');\n\n _this10.runTask(function () {\n return indexController.set('bar', 'BORF');\n });\n\n assert.equal(theLink.attr('href'), '/?bar=BORF&foo=lol');\n\n _this10.runTask(function () {\n return indexController.set('foo', 'YEAH');\n });\n\n assert.equal(theLink.attr('href'), '/?bar=BORF&foo=lol');\n });\n };\n\n _class.prototype['@test The {{link-to}} with only query params always transitions to the current route with the query params applied'] = function testTheLinkToWithOnlyQueryParamsAlwaysTransitionsToTheCurrentRouteWithTheQueryParamsApplied(assert) {\n var _this11 = this;\n\n // Test harness for bug #12033\n this.addTemplate('cars', '\\n {{#link-to \\'cars.create\\' id=\\'create-link\\'}}Create new car{{/link-to}}\\n {{#link-to (query-params page=\\'2\\') id=\\'page2-link\\'}}Page 2{{/link-to}}\\n {{outlet}}\\n ');\n this.addTemplate('cars.create', '{{#link-to \\'cars\\' id=\\'close-link\\'}}Close create form{{/link-to}}');\n\n this.router.map(function () {\n this.route('cars', function () {\n this.route('create');\n });\n });\n\n this.add('controller:cars', _emberRuntime.Controller.extend({\n queryParams: ['page'],\n page: 1\n }));\n\n return this.visit('/cars/create').then(function () {\n var router = _this11.appRouter;\n var carsController = _this11.getController('cars');\n\n assert.equal(router.currentRouteName, 'cars.create');\n\n _this11.runTask(function () {\n return _this11.click('#close-link');\n });\n\n assert.equal(router.currentRouteName, 'cars.index');\n assert.equal(router.get('url'), '/cars');\n assert.equal(carsController.get('page'), 1, 'The page query-param is 1');\n\n _this11.runTask(function () {\n return _this11.click('#page2-link');\n });\n\n assert.equal(router.currentRouteName, 'cars.index', 'The active route is still cars');\n assert.equal(router.get('url'), '/cars?page=2', 'The url has been updated');\n assert.equal(carsController.get('page'), 2, 'The query params have been updated');\n });\n };\n\n _class.prototype['@test the {{link-to}} applies activeClass when query params are not changed'] = function testTheLinkToAppliesActiveClassWhenQueryParamsAreNotChanged(assert) {\n var _this12 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params foo=\\'cat\\') id=\\'cat-link\\'}}Index{{/link-to}}\\n {{#link-to (query-params foo=\\'dog\\') id=\\'dog-link\\'}}Index{{/link-to}}\\n {{#link-to \\'index\\' id=\\'change-nothing\\'}}Index{{/link-to}}\\n ');\n this.addTemplate('search', '\\n {{#link-to (query-params search=\\'same\\') id=\\'same-search\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'change\\') id=\\'change-search\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'same\\' archive=true) id=\\'same-search-add-archive\\'}}Index{{/link-to}}\\n {{#link-to (query-params archive=true) id=\\'only-add-archive\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'same\\' archive=true) id=\\'both-same\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'different\\' archive=true) id=\\'change-one\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'different\\' archive=false) id=\\'remove-one\\'}}Index{{/link-to}}\\n {{outlet}}\\n ');\n this.addTemplate('search.results', '\\n {{#link-to (query-params sort=\\'title\\') id=\\'same-sort-child-only\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'same\\') id=\\'same-search-parent-only\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'change\\') id=\\'change-search-parent-only\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'same\\' sort=\\'title\\') id=\\'same-search-same-sort-child-and-parent\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'same\\' sort=\\'author\\') id=\\'same-search-different-sort-child-and-parent\\'}}Index{{/link-to}}\\n {{#link-to (query-params search=\\'change\\' sort=\\'title\\') id=\\'change-search-same-sort-child-and-parent\\'}}Index{{/link-to}}\\n {{#link-to (query-params foo=\\'dog\\') id=\\'dog-link\\'}}Index{{/link-to}}\\n ');\n\n this.router.map(function () {\n this.route('search', function () {\n this.route('results');\n });\n });\n\n this.add('controller:search', _emberRuntime.Controller.extend({\n queryParams: ['search', 'archive'],\n search: '',\n archive: false\n }));\n\n this.add('controller:search.results', _emberRuntime.Controller.extend({\n queryParams: ['sort', 'showDetails'],\n sort: 'title',\n showDetails: true\n }));\n\n return this.visit('/').then(function () {\n _this12.shouldNotBeActive(assert, '#cat-link');\n _this12.shouldNotBeActive(assert, '#dog-link');\n\n return _this12.visit('/?foo=cat');\n }).then(function () {\n _this12.shouldBeActive(assert, '#cat-link');\n _this12.shouldNotBeActive(assert, '#dog-link');\n\n return _this12.visit('/?foo=dog');\n }).then(function () {\n _this12.shouldBeActive(assert, '#dog-link');\n _this12.shouldNotBeActive(assert, '#cat-link');\n _this12.shouldBeActive(assert, '#change-nothing');\n\n return _this12.visit('/search?search=same');\n }).then(function () {\n _this12.shouldBeActive(assert, '#same-search');\n _this12.shouldNotBeActive(assert, '#change-search');\n _this12.shouldNotBeActive(assert, '#same-search-add-archive');\n _this12.shouldNotBeActive(assert, '#only-add-archive');\n _this12.shouldNotBeActive(assert, '#remove-one');\n\n return _this12.visit('/search?search=same&archive=true');\n }).then(function () {\n _this12.shouldBeActive(assert, '#both-same');\n _this12.shouldNotBeActive(assert, '#change-one');\n\n return _this12.visit('/search/results?search=same&sort=title&showDetails=true');\n }).then(function () {\n _this12.shouldBeActive(assert, '#same-sort-child-only');\n _this12.shouldBeActive(assert, '#same-search-parent-only');\n _this12.shouldNotBeActive(assert, '#change-search-parent-only');\n _this12.shouldBeActive(assert, '#same-search-same-sort-child-and-parent');\n _this12.shouldNotBeActive(assert, '#same-search-different-sort-child-and-parent');\n _this12.shouldNotBeActive(assert, '#change-search-same-sort-child-and-parent');\n });\n };\n\n _class.prototype['@test the {{link-to}} applies active class when query-param is a number'] = function testTheLinkToAppliesActiveClassWhenQueryParamIsANumber(assert) {\n var _this13 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params page=pageNumber) id=\\'page-link\\'}}\\n Index\\n {{/link-to}}\\n ');\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['page'],\n page: 1,\n pageNumber: 5\n }));\n\n return this.visit('/').then(function () {\n _this13.shouldNotBeActive(assert, '#page-link');\n return _this13.visit('/?page=5');\n }).then(function () {\n _this13.shouldBeActive(assert, '#page-link');\n });\n };\n\n _class.prototype['@test the {{link-to}} applies active class when query-param is an array'] = function testTheLinkToAppliesActiveClassWhenQueryParamIsAnArray(assert) {\n var _this14 = this;\n\n this.addTemplate('index', '\\n {{#link-to (query-params pages=pagesArray) id=\\'array-link\\'}}Index{{/link-to}}\\n {{#link-to (query-params pages=biggerArray) id=\\'bigger-link\\'}}Index{{/link-to}}\\n {{#link-to (query-params pages=emptyArray) id=\\'empty-link\\'}}Index{{/link-to}}\\n ');\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['pages'],\n pages: [],\n pagesArray: [1, 2],\n biggerArray: [1, 2, 3],\n emptyArray: []\n }));\n\n return this.visit('/').then(function () {\n _this14.shouldNotBeActive(assert, '#array-link');\n\n return _this14.visit('/?pages=%5B1%2C2%5D');\n }).then(function () {\n _this14.shouldBeActive(assert, '#array-link');\n _this14.shouldNotBeActive(assert, '#bigger-link');\n _this14.shouldNotBeActive(assert, '#empty-link');\n\n return _this14.visit('/?pages=%5B2%2C1%5D');\n }).then(function () {\n _this14.shouldNotBeActive(assert, '#array-link');\n _this14.shouldNotBeActive(assert, '#bigger-link');\n _this14.shouldNotBeActive(assert, '#empty-link');\n\n return _this14.visit('/?pages=%5B1%2C2%2C3%5D');\n }).then(function () {\n _this14.shouldBeActive(assert, '#bigger-link');\n _this14.shouldNotBeActive(assert, '#array-link');\n _this14.shouldNotBeActive(assert, '#empty-link');\n });\n };\n\n _class.prototype['@test the {{link-to}} helper applies active class to the parent route'] = function testTheLinkToHelperAppliesActiveClassToTheParentRoute(assert) {\n var _this15 = this;\n\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n\n this.addTemplate('application', '\\n {{#link-to \\'parent\\' id=\\'parent-link\\'}}Parent{{/link-to}}\\n {{#link-to \\'parent.child\\' id=\\'parent-child-link\\'}}Child{{/link-to}}\\n {{#link-to \\'parent\\' (query-params foo=cat) id=\\'parent-link-qp\\'}}Parent{{/link-to}}\\n {{outlet}}\\n ');\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['foo'],\n foo: 'bar'\n }));\n\n return this.visit('/').then(function () {\n _this15.shouldNotBeActive(assert, '#parent-link');\n _this15.shouldNotBeActive(assert, '#parent-child-link');\n _this15.shouldNotBeActive(assert, '#parent-link-qp');\n return _this15.visit('/parent/child?foo=dog');\n }).then(function () {\n _this15.shouldBeActive(assert, '#parent-link');\n _this15.shouldNotBeActive(assert, '#parent-link-qp');\n });\n };\n\n _class.prototype['@test The {{link-to}} helper disregards query-params in activeness computation when current-when is specified'] = function testTheLinkToHelperDisregardsQueryParamsInActivenessComputationWhenCurrentWhenIsSpecified(assert) {\n var _this16 = this;\n\n var appLink = void 0;\n\n this.router.map(function () {\n this.route('parent');\n });\n this.addTemplate('application', '\\n {{#link-to \\'parent\\' (query-params page=1) current-when=\\'parent\\' id=\\'app-link\\'}}\\n Parent\\n {{/link-to}}\\n {{outlet}}\\n ');\n this.addTemplate('parent', '\\n {{#link-to \\'parent\\' (query-params page=1) current-when=\\'parent\\' id=\\'parent-link\\'}}\\n Parent\\n {{/link-to}}\\n {{outlet}}\\n ');\n this.add('controller:parent', _emberRuntime.Controller.extend({\n queryParams: ['page'],\n page: 1\n }));\n\n return this.visit('/').then(function () {\n appLink = _this16.$('#app-link');\n\n assert.equal(appLink.attr('href'), '/parent');\n _this16.shouldNotBeActive(assert, '#app-link');\n\n return _this16.visit('/parent?page=2');\n }).then(function () {\n appLink = _this16.$('#app-link');\n var router = _this16.appRouter;\n\n assert.equal(appLink.attr('href'), '/parent');\n _this16.shouldBeActive(assert, '#app-link');\n assert.equal(_this16.$('#parent-link').attr('href'), '/parent');\n _this16.shouldBeActive(assert, '#parent-link');\n\n var parentController = _this16.getController('parent');\n\n assert.equal(parentController.get('page'), 2);\n\n _this16.runTask(function () {\n return parentController.set('page', 3);\n });\n\n assert.equal(router.get('location.path'), '/parent?page=3');\n _this16.shouldBeActive(assert, '#app-link');\n _this16.shouldBeActive(assert, '#parent-link');\n\n _this16.runTask(function () {\n return _this16.click('#app-link');\n });\n\n assert.equal(router.get('location.path'), '/parent');\n });\n };\n\n _class.prototype['@test link-to default query params while in active transition regression test'] = function testLinkToDefaultQueryParamsWhileInActiveTransitionRegressionTest(assert) {\n var _this17 = this;\n\n this.router.map(function () {\n this.route('foos');\n this.route('bars');\n });\n var foos = _emberRuntime.RSVP.defer();\n var bars = _emberRuntime.RSVP.defer();\n\n this.addTemplate('application', '\\n {{link-to \\'Foos\\' \\'foos\\' id=\\'foos-link\\'}}\\n {{link-to \\'Baz Foos\\' \\'foos\\' (query-params baz=true) id=\\'baz-foos-link\\'}}\\n {{link-to \\'Quux Bars\\' \\'bars\\' (query-params quux=true) id=\\'bars-link\\'}}\\n ');\n this.add('controller:foos', _emberRuntime.Controller.extend({\n queryParams: ['status'],\n baz: false\n }));\n this.add('route:foos', _emberRouting.Route.extend({\n model: function () {\n return foos.promise;\n }\n }));\n this.add('controller:bars', _emberRuntime.Controller.extend({\n queryParams: ['status'],\n quux: false\n }));\n this.add('route:bars', _emberRouting.Route.extend({\n model: function () {\n return bars.promise;\n }\n }));\n\n return this.visit('/').then(function () {\n var router = _this17.appRouter;\n var foosLink = _this17.$('#foos-link');\n var barsLink = _this17.$('#bars-link');\n var bazLink = _this17.$('#baz-foos-link');\n\n assert.equal(foosLink.attr('href'), '/foos');\n assert.equal(bazLink.attr('href'), '/foos?baz=true');\n assert.equal(barsLink.attr('href'), '/bars?quux=true');\n assert.equal(router.get('location.path'), '/');\n _this17.shouldNotBeActive(assert, '#foos-link');\n _this17.shouldNotBeActive(assert, '#baz-foos-link');\n _this17.shouldNotBeActive(assert, '#bars-link');\n\n _this17.runTask(function () {\n return barsLink.click();\n });\n _this17.shouldNotBeActive(assert, '#bars-link');\n\n _this17.runTask(function () {\n return foosLink.click();\n });\n _this17.shouldNotBeActive(assert, '#foos-link');\n\n _this17.runTask(function () {\n return foos.resolve();\n });\n\n assert.equal(router.get('location.path'), '/foos');\n _this17.shouldBeActive(assert, '#foos-link');\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('The {{link-to}} helper + query params - globals mode app', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class2, _AutobootApplicationT);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.apply(this, arguments));\n }\n\n _class2.prototype['@test the {{link-to}} helper throws a useful error if you invoke it wrong'] = function (assert) {\n var _this19 = this;\n\n assert.expect(1);\n\n expectAssertion(function () {\n _this19.runTask(function () {\n _this19.createApplication();\n\n _this19.add('router:main', _emberRouting.Router.extend({\n location: 'none'\n }));\n\n _this19.addTemplate('application', '{{#link-to id=\\'the-link\\'}}Index{{/link-to}}');\n });\n }, /You must provide one or more parameters to the link-to component/);\n };\n\n return _class2;\n }(_internalTestHelpers.AutobootApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/helpers/link_to_test/link_to_with_query_params_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/helpers/link_to_test/link_to_with_query_params_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/homepage_example_test', ['ember-babel', 'ember-routing', 'ember-metal', 'ember-runtime', 'internal-test-helpers'], function (_emberBabel, _emberRouting, _emberMetal, _emberRuntime, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('The example renders correctly', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test Render index template into application outlet'] = function testRenderIndexTemplateIntoApplicationOutlet(assert) {\n var _this2 = this;\n\n this.addTemplate('application', '{{outlet}}');\n this.addTemplate('index', '
'));\n\n originalLoggerError = _emberConsole.default.error;\n });\n },\n teardown: function () {\n (0, _emberMetal.run)(function () {\n App.destroy();\n App = null;\n\n (0, _emberGlimmer.setTemplates)({});\n _emberConsole.default.error = originalLoggerError;\n });\n }\n });\n\n QUnit.test('The route controller specified via controllerName is used in render', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n });\n\n (0, _emberGlimmer.setTemplate)('alternative_home', (0, _emberTemplateCompiler.compile)('
alternative home: {{myValue}}
'));\n\n App.HomeRoute = _emberRouting.Route.extend({\n controllerName: 'myController',\n renderTemplate: function () {\n this.render('alternative_home');\n }\n });\n\n registry.register('controller:myController', _emberRuntime.Controller.extend({\n myValue: 'foo'\n }));\n\n bootApplication();\n\n deepEqual(container.lookup('route:home').controller, container.lookup('controller:myController'), 'route controller is set by controllerName');\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'alternative home: foo', 'The homepage template was rendered with data from the custom controller');\n });\n\n QUnit.test('The route controller specified via controllerName is used in render even when a controller with the routeName is available', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n });\n\n (0, _emberGlimmer.setTemplate)('home', (0, _emberTemplateCompiler.compile)('
home: {{myValue}}
'));\n\n App.HomeRoute = _emberRouting.Route.extend({\n controllerName: 'myController'\n });\n\n registry.register('controller:home', _emberRuntime.Controller.extend({\n myValue: 'home'\n }));\n\n registry.register('controller:myController', _emberRuntime.Controller.extend({\n myValue: 'myController'\n }));\n\n bootApplication();\n\n deepEqual(container.lookup('route:home').controller, container.lookup('controller:myController'), 'route controller is set by controllerName');\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'home: myController', 'The homepage template was rendered with data from the custom controller');\n });\n\n QUnit.test('The Homepage with a `setupController` hook modifying other controllers', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n });\n\n App.HomeRoute = _emberRouting.Route.extend({\n setupController: function (controller) {\n (0, _emberMetal.set)(this.controllerFor('home'), 'hours', (0, _emberRuntime.A)(['Monday through Friday: 9am to 5pm', 'Saturday: Noon to Midnight', 'Sunday: Noon to 6pm']));\n }\n });\n\n (0, _emberGlimmer.setTemplate)('home', (0, _emberTemplateCompiler.compile)('
{{#each hours as |entry|}}
{{entry}}
{{/each}}
'));\n\n bootApplication();\n\n equal((0, _emberViews.jQuery)('ul li', '#qunit-fixture').eq(2).text(), 'Sunday: Noon to 6pm', 'The template was rendered with the hours context');\n });\n\n QUnit.test('The Homepage with a computed context that does not get overridden', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n });\n\n App.HomeController = _emberRuntime.Controller.extend({\n model: (0, _emberMetal.computed)(function () {\n return (0, _emberRuntime.A)(['Monday through Friday: 9am to 5pm', 'Saturday: Noon to Midnight', 'Sunday: Noon to 6pm']);\n })\n });\n\n (0, _emberGlimmer.setTemplate)('home', (0, _emberTemplateCompiler.compile)('
{{#each model as |passage|}}
{{passage}}
{{/each}}
'));\n\n bootApplication();\n\n equal((0, _emberViews.jQuery)('ul li', '#qunit-fixture').eq(2).text(), 'Sunday: Noon to 6pm', 'The template was rendered with the context intact');\n });\n\n QUnit.test('The Homepage getting its controller context via model', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n });\n\n App.HomeRoute = _emberRouting.Route.extend({\n model: function () {\n return (0, _emberRuntime.A)(['Monday through Friday: 9am to 5pm', 'Saturday: Noon to Midnight', 'Sunday: Noon to 6pm']);\n },\n setupController: function (controller, model) {\n equal(this.controllerFor('home'), controller);\n\n (0, _emberMetal.set)(this.controllerFor('home'), 'hours', model);\n }\n });\n\n (0, _emberGlimmer.setTemplate)('home', (0, _emberTemplateCompiler.compile)('
{{#each hours as |entry|}}
{{entry}}
{{/each}}
'));\n\n bootApplication();\n\n equal((0, _emberViews.jQuery)('ul li', '#qunit-fixture').eq(2).text(), 'Sunday: Noon to 6pm', 'The template was rendered with the hours context');\n });\n\n QUnit.test('The Specials Page getting its controller context by deserializing the params hash', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n this.route('special', { path: '/specials/:menu_item_id' });\n });\n\n App.SpecialRoute = _emberRouting.Route.extend({\n model: function (params) {\n return _emberRuntime.Object.create({\n menuItemId: params.menu_item_id\n });\n },\n setupController: function (controller, model) {\n (0, _emberMetal.set)(controller, 'model', model);\n }\n });\n\n (0, _emberGlimmer.setTemplate)('special', (0, _emberTemplateCompiler.compile)('
{{model.menuItemId}}
'));\n\n bootApplication();\n\n registry.register('controller:special', _emberRuntime.Controller.extend());\n\n handleURL('/specials/1');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), '1', 'The model was used to render the template');\n });\n\n QUnit.test('The Specials Page defaults to looking models up via `find`', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n this.route('special', { path: '/specials/:menu_item_id' });\n });\n\n App.MenuItem = _emberRuntime.Object.extend();\n App.MenuItem.reopenClass({\n find: function (id) {\n return App.MenuItem.create({\n id: id\n });\n }\n });\n\n App.SpecialRoute = _emberRouting.Route.extend({\n setupController: function (controller, model) {\n (0, _emberMetal.set)(controller, 'model', model);\n }\n });\n\n (0, _emberGlimmer.setTemplate)('special', (0, _emberTemplateCompiler.compile)('
{{model.id}}
'));\n\n bootApplication();\n\n registry.register('controller:special', _emberRuntime.Controller.extend());\n\n handleURL('/specials/1');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), '1', 'The model was used to render the template');\n });\n\n QUnit.test('The Special Page returning a promise puts the app into a loading state until the promise is resolved', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n this.route('special', { path: '/specials/:menu_item_id' });\n });\n\n var menuItem = void 0,\n resolve = void 0;\n\n App.MenuItem = _emberRuntime.Object.extend();\n App.MenuItem.reopenClass({\n find: function (id) {\n menuItem = App.MenuItem.create({ id: id });\n\n return new _emberRuntime.RSVP.Promise(function (res) {\n resolve = res;\n });\n }\n });\n\n App.LoadingRoute = _emberRouting.Route.extend({});\n\n App.SpecialRoute = _emberRouting.Route.extend({\n setupController: function (controller, model) {\n (0, _emberMetal.set)(controller, 'model', model);\n }\n });\n\n (0, _emberGlimmer.setTemplate)('special', (0, _emberTemplateCompiler.compile)('
'));\n\n bootApplication();\n\n registry.register('controller:special', _emberRuntime.Controller.extend());\n\n handleURL('/specials/1');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'LOADING!', 'The app is in the loading state');\n\n (0, _emberMetal.run)(function () {\n return resolve(menuItem);\n });\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), '1', 'The app is now in the specials state');\n });\n\n QUnit.test('The loading state doesn\\'t get entered for promises that resolve on the same run loop', function () {\n Router.map(function () {\n this.route('home', { path: '/' });\n this.route('special', { path: '/specials/:menu_item_id' });\n });\n\n App.MenuItem = _emberRuntime.Object.extend();\n App.MenuItem.reopenClass({\n find: function (id) {\n return { id: id };\n }\n });\n\n App.LoadingRoute = _emberRouting.Route.extend({\n enter: function () {\n ok(false, 'LoadingRoute shouldn\\'t have been entered.');\n }\n });\n\n App.SpecialRoute = _emberRouting.Route.extend({\n setupController: function (controller, model) {\n (0, _emberMetal.set)(controller, 'model', model);\n }\n });\n\n (0, _emberGlimmer.setTemplate)('special', (0, _emberTemplateCompiler.compile)('
'));\n\n Router.map(function () {\n this.route('posts', function () {});\n });\n\n App.PostsRoute = _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render();\n this.render('posts/menu', {\n into: 'application',\n outlet: 'menu'\n });\n }\n });\n\n bootApplication();\n\n handleURL('/posts');\n\n equal((0, _emberViews.jQuery)('div.posts-menu:contains(postsMenu)', '#qunit-fixture').length, 1, 'The posts/menu template was rendered');\n equal((0, _emberViews.jQuery)('p.posts-index:contains(postsIndex)', '#qunit-fixture').length, 1, 'The posts/index template was rendered');\n });\n\n QUnit.test('Generating a URL should not affect currentModel', function () {\n Router.map(function () {\n this.route('post', { path: '/posts/:post_id' });\n });\n\n var posts = {\n 1: { id: 1 },\n 2: { id: 2 }\n };\n\n App.PostRoute = _emberRouting.Route.extend({\n model: function (params) {\n return posts[params.post_id];\n }\n });\n\n bootApplication();\n\n handleURL('/posts/1');\n\n var route = container.lookup('route:post');\n equal(route.modelFor('post'), posts[1]);\n\n var url = router.generate('post', posts[2]);\n equal(url, '/posts/2');\n\n equal(route.modelFor('post'), posts[1]);\n });\n\n QUnit.test('Generated route should be an instance of App.Route if provided', function () {\n var generatedRoute = void 0;\n\n Router.map(function () {\n this.route('posts');\n });\n\n App.Route = _emberRouting.Route.extend();\n\n bootApplication();\n\n handleURL('/posts');\n\n generatedRoute = container.lookup('route:posts');\n\n ok(generatedRoute instanceof App.Route, 'should extend the correct route');\n });\n\n QUnit.test('Nested index route is not overridden by parent\\'s implicit index route', function () {\n Router.map(function () {\n this.route('posts', function () {\n this.route('index', { path: ':category' });\n });\n });\n\n bootApplication();\n\n (0, _emberMetal.run)(function () {\n return router.transitionTo('posts', { category: 'emberjs' });\n });\n\n deepEqual(router.location.path, '/posts/emberjs');\n });\n\n QUnit.test('Application template does not duplicate when re-rendered', function () {\n (0, _emberGlimmer.setTemplate)('application', (0, _emberTemplateCompiler.compile)('
I Render Once
{{outlet}}'));\n\n Router.map(function () {\n this.route('posts');\n });\n\n App.ApplicationRoute = _emberRouting.Route.extend({\n model: function () {\n return (0, _emberRuntime.A)();\n }\n });\n\n bootApplication();\n\n // should cause application template to re-render\n handleURL('/posts');\n\n equal((0, _emberViews.jQuery)('h3:contains(I Render Once)').length, 1);\n });\n\n QUnit.test('Child routes should render inside the application template if the application template causes a redirect', function () {\n (0, _emberGlimmer.setTemplate)('application', (0, _emberTemplateCompiler.compile)('
App
{{outlet}}'));\n (0, _emberGlimmer.setTemplate)('posts', (0, _emberTemplateCompiler.compile)('posts'));\n\n Router.map(function () {\n this.route('posts');\n this.route('photos');\n });\n\n App.ApplicationRoute = _emberRouting.Route.extend({\n afterModel: function () {\n this.transitionTo('posts');\n }\n });\n\n bootApplication();\n\n equal((0, _emberViews.jQuery)('#qunit-fixture > div').text(), 'App posts');\n });\n\n QUnit.test('The template is not re-rendered when the route\\'s context changes', function () {\n Router.map(function () {\n this.route('page', { path: '/page/:name' });\n });\n\n App.PageRoute = _emberRouting.Route.extend({\n model: function (params) {\n return _emberRuntime.Object.create({ name: params.name });\n }\n });\n\n var insertionCount = 0;\n App.FooBarComponent = _emberGlimmer.Component.extend({\n didInsertElement: function () {\n insertionCount += 1;\n }\n });\n\n (0, _emberGlimmer.setTemplate)('page', (0, _emberTemplateCompiler.compile)('
{{model.name}}{{foo-bar}}
'));\n\n bootApplication();\n\n handleURL('/page/first');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'first');\n equal(insertionCount, 1);\n\n handleURL('/page/second');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'second');\n equal(insertionCount, 1, 'view should have inserted only once');\n\n (0, _emberMetal.run)(function () {\n return router.transitionTo('page', _emberRuntime.Object.create({ name: 'third' }));\n });\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'third');\n equal(insertionCount, 1, 'view should still have inserted only once');\n });\n\n QUnit.test('The template is not re-rendered when two routes present the exact same template & controller', function () {\n Router.map(function () {\n this.route('first');\n this.route('second');\n this.route('third');\n this.route('fourth');\n });\n\n // Note add a component to test insertion\n\n var insertionCount = 0;\n App.XInputComponent = _emberGlimmer.Component.extend({\n didInsertElement: function () {\n insertionCount += 1;\n }\n });\n\n App.SharedRoute = _emberRouting.Route.extend({\n setupController: function (controller) {\n this.controllerFor('shared').set('message', 'This is the ' + this.routeName + ' message');\n },\n renderTemplate: function (controller, context) {\n this.render('shared', { controller: 'shared' });\n }\n });\n\n App.FirstRoute = App.SharedRoute.extend();\n App.SecondRoute = App.SharedRoute.extend();\n App.ThirdRoute = App.SharedRoute.extend();\n App.FourthRoute = App.SharedRoute.extend();\n\n App.SharedController = _emberRuntime.Controller.extend();\n\n (0, _emberGlimmer.setTemplate)('shared', (0, _emberTemplateCompiler.compile)('
{{message}}{{x-input}}
'));\n\n bootApplication();\n\n handleURL('/first');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'This is the first message');\n equal(insertionCount, 1, 'expected one assertion');\n\n // Transition by URL\n handleURL('/second');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'This is the second message');\n equal(insertionCount, 1, 'expected one assertion');\n\n // Then transition directly by route name\n (0, _emberMetal.run)(function () {\n router.transitionTo('third').then(function (value) {\n ok(true, 'expected transition');\n }, function (reason) {\n ok(false, 'unexpected transition failure: ', QUnit.jsDump.parse(reason));\n });\n });\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'This is the third message');\n equal(insertionCount, 1, 'expected one assertion');\n\n // Lastly transition to a different view, with the same controller and template\n handleURL('/fourth');\n equal(insertionCount, 1, 'expected one assertion');\n\n equal((0, _emberViews.jQuery)('p', '#qunit-fixture').text(), 'This is the fourth message');\n });\n\n QUnit.test('ApplicationRoute with model does not proxy the currentPath', function () {\n var model = {};\n var currentPath = void 0;\n\n App.ApplicationRoute = _emberRouting.Route.extend({\n model: function () {\n return model;\n }\n });\n\n App.ApplicationController = _emberRuntime.Controller.extend({\n currentPathDidChange: (0, _emberMetal.observer)('currentPath', function () {\n currentPath = (0, _emberMetal.get)(this, 'currentPath');\n })\n });\n\n bootApplication();\n\n equal(currentPath, 'index', 'currentPath is index');\n equal('currentPath' in model, false, 'should have defined currentPath on controller');\n });\n\n QUnit.test('Promises encountered on app load put app into loading state until resolved', function () {\n expect(2);\n\n var deferred = _emberRuntime.RSVP.defer();\n\n App.IndexRoute = _emberRouting.Route.extend({\n model: function () {\n return deferred.promise;\n }\n });\n\n (0, _emberGlimmer.setTemplate)('index', (0, _emberTemplateCompiler.compile)('
'));\n (0, _emberGlimmer.setTemplate)('other', (0, _emberTemplateCompiler.compile)('other'));\n\n App.IndexRoute = _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render({ into: 'sidebar' });\n this.render('other', { into: 'index' });\n },\n\n actions: {\n disconnect: function () {\n this.disconnectOutlet({\n parentView: 'index',\n outlet: 'main'\n });\n }\n }\n });\n\n bootApplication();\n equal((0, _emberViews.jQuery)('#qunit-fixture .sidebar .index').text(), 'other');\n (0, _emberMetal.run)(router, 'send', 'disconnect');\n equal((0, _emberViews.jQuery)('#qunit-fixture .sidebar .index').text(), '');\n });\n\n QUnit.test('Can this.render({into:...}) nested render helpers', function () {\n expectDeprecation(/Rendering into a {{render}} helper that resolves to an {{outlet}} is deprecated./);\n\n expectDeprecation(function () {\n (0, _emberGlimmer.setTemplate)('application', (0, _emberTemplateCompiler.compile)('{{render \"sidebar\"}}'));\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n expectDeprecation(function () {\n (0, _emberGlimmer.setTemplate)('sidebar', (0, _emberTemplateCompiler.compile)('
{{render \"cart\"}}
'));\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n (0, _emberGlimmer.setTemplate)('cart', (0, _emberTemplateCompiler.compile)('
{{outlet}}
'));\n (0, _emberGlimmer.setTemplate)('index', (0, _emberTemplateCompiler.compile)('other'));\n (0, _emberGlimmer.setTemplate)('baz', (0, _emberTemplateCompiler.compile)('baz'));\n\n App.IndexRoute = _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render({ into: 'cart' });\n },\n\n actions: {\n changeToBaz: function () {\n this.disconnectOutlet({\n parentView: 'cart',\n outlet: 'main'\n });\n this.render('baz', { into: 'cart' });\n }\n }\n });\n\n bootApplication();\n equal((0, _emberViews.jQuery)('#qunit-fixture .cart').text(), 'other');\n (0, _emberMetal.run)(router, 'send', 'changeToBaz');\n equal((0, _emberViews.jQuery)('#qunit-fixture .cart').text(), 'baz');\n });\n\n QUnit.test('Can disconnect from nested render helpers', function () {\n expectDeprecation(/Rendering into a {{render}} helper that resolves to an {{outlet}} is deprecated./);\n\n expectDeprecation(function () {\n (0, _emberGlimmer.setTemplate)('application', (0, _emberTemplateCompiler.compile)('{{render \"sidebar\"}}'));\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n expectDeprecation(function () {\n (0, _emberGlimmer.setTemplate)('sidebar', (0, _emberTemplateCompiler.compile)('
{{render \"cart\"}}
'));\n }, /Please refactor [\\w\\{\\}\"` ]+ to a component/);\n\n (0, _emberGlimmer.setTemplate)('cart', (0, _emberTemplateCompiler.compile)('
{{outlet}}
'));\n (0, _emberGlimmer.setTemplate)('index', (0, _emberTemplateCompiler.compile)('other'));\n\n App.IndexRoute = _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render({ into: 'cart' });\n },\n\n actions: {\n disconnect: function () {\n this.disconnectOutlet({\n parentView: 'cart',\n outlet: 'main'\n });\n }\n }\n });\n\n bootApplication();\n equal((0, _emberViews.jQuery)('#qunit-fixture .cart').text(), 'other');\n (0, _emberMetal.run)(router, 'send', 'disconnect');\n equal((0, _emberViews.jQuery)('#qunit-fixture .cart').text(), '');\n });\n\n QUnit.test('Components inside an outlet have their didInsertElement hook invoked when the route is displayed', function (assert) {\n (0, _emberGlimmer.setTemplate)('index', (0, _emberTemplateCompiler.compile)('{{#if showFirst}}{{my-component}}{{else}}{{other-component}}{{/if}}'));\n\n var myComponentCounter = 0;\n var otherComponentCounter = 0;\n var indexController = void 0;\n\n App.IndexController = _emberRuntime.Controller.extend({\n showFirst: true\n });\n\n App.IndexRoute = _emberRouting.Route.extend({\n setupController: function (controller) {\n indexController = controller;\n }\n });\n\n App.MyComponentComponent = _emberGlimmer.Component.extend({\n didInsertElement: function () {\n myComponentCounter++;\n }\n });\n\n App.OtherComponentComponent = _emberGlimmer.Component.extend({\n didInsertElement: function () {\n otherComponentCounter++;\n }\n });\n\n bootApplication();\n\n assert.strictEqual(myComponentCounter, 1, 'didInsertElement invoked on displayed component');\n assert.strictEqual(otherComponentCounter, 0, 'didInsertElement not invoked on displayed component');\n\n (0, _emberMetal.run)(function () {\n return indexController.set('showFirst', false);\n });\n\n assert.strictEqual(myComponentCounter, 1, 'didInsertElement not invoked on displayed component');\n assert.strictEqual(otherComponentCounter, 1, 'didInsertElement invoked on displayed component');\n });\n\n QUnit.test('Doesnt swallow exception thrown from willTransition', function () {\n expect(1);\n (0, _emberGlimmer.setTemplate)('application', (0, _emberTemplateCompiler.compile)('{{outlet}}'));\n (0, _emberGlimmer.setTemplate)('index', (0, _emberTemplateCompiler.compile)('index'));\n (0, _emberGlimmer.setTemplate)('other', (0, _emberTemplateCompiler.compile)('other'));\n\n Router.map(function () {\n this.route('other', function () {});\n });\n\n App.IndexRoute = _emberRouting.Route.extend({\n actions: {\n willTransition: function () {\n throw new Error('boom');\n }\n }\n });\n\n bootApplication();\n\n throws(function () {\n (0, _emberMetal.run)(function () {\n return router.handleURL('/other');\n });\n }, /boom/, 'expected an exception but none was thrown');\n });\n\n QUnit.test('Exception if outlet name is undefined in render and disconnectOutlet', function (assert) {\n App.ApplicationRoute = _emberRouting.Route.extend({\n actions: {\n showModal: function () {\n this.render({\n outlet: undefined,\n parentView: 'application'\n });\n },\n hideModal: function () {\n this.disconnectOutlet({\n outlet: undefined,\n parentView: 'application'\n });\n }\n }\n });\n\n bootApplication();\n\n expectAssertion(function () {\n (0, _emberMetal.run)(function () {\n return router.send('showModal');\n });\n }, /You passed undefined as the outlet name/);\n\n expectAssertion(function () {\n (0, _emberMetal.run)(function () {\n return router.send('hideModal');\n });\n }, /You passed undefined as the outlet name/);\n });\n\n QUnit.test('Route serializers work for Engines', function () {\n expect(2);\n\n // Register engine\n var BlogEngine = _emberApplication.Engine.extend();\n registry.register('engine:blog', BlogEngine);\n\n // Register engine route map\n var postSerialize = function (params) {\n ok(true, 'serialize hook runs');\n return {\n post_id: params.id\n };\n };\n var BlogMap = function () {\n this.route('post', { path: '/post/:post_id', serialize: postSerialize });\n };\n registry.register('route-map:blog', BlogMap);\n\n Router.map(function () {\n this.mount('blog');\n });\n\n bootApplication();\n\n equal(router._routerMicrolib.generate('blog.post', { id: '13' }), '/blog/post/13', 'url is generated properly');\n });\n\n QUnit.test('Defining a Route#serialize method in an Engine throws an error', function () {\n expect(1);\n\n // Register engine\n var BlogEngine = _emberApplication.Engine.extend();\n registry.register('engine:blog', BlogEngine);\n\n // Register engine route map\n var BlogMap = function () {\n this.route('post');\n };\n registry.register('route-map:blog', BlogMap);\n\n Router.map(function () {\n this.mount('blog');\n });\n\n bootApplication();\n\n var PostRoute = _emberRouting.Route.extend({\n serialize: function () {}\n });\n container.lookup('engine:blog').register('route:post', PostRoute);\n\n throws(function () {\n return router.transitionTo('blog.post');\n }, /Defining a custom serialize method on an Engine route is not supported/);\n });\n\n QUnit.test('App.destroy does not leave undestroyed views after clearing engines', function () {\n expect(4);\n\n var engineInstance = void 0;\n // Register engine\n var BlogEngine = _emberApplication.Engine.extend();\n registry.register('engine:blog', BlogEngine);\n var EngineIndexRoute = _emberRouting.Route.extend({\n init: function () {\n this._super.apply(this, arguments);\n engineInstance = (0, _emberUtils.getOwner)(this);\n }\n });\n\n // Register engine route map\n var BlogMap = function () {\n this.route('post');\n };\n registry.register('route-map:blog', BlogMap);\n\n Router.map(function () {\n this.mount('blog');\n });\n\n bootApplication();\n\n var engine = container.lookup('engine:blog');\n engine.register('route:index', EngineIndexRoute);\n engine.register('template:index', (0, _emberTemplateCompiler.compile)('Engine Post!'));\n\n handleURL('/blog');\n\n var route = engineInstance.lookup('route:index');\n\n (0, _emberMetal.run)(router, 'destroy');\n equal(router._toplevelView, null, 'the toplevelView was cleared');\n\n (0, _emberMetal.run)(route, 'destroy');\n equal(router._toplevelView, null, 'the toplevelView was not reinitialized');\n\n (0, _emberMetal.run)(App, 'destroy');\n equal(router._toplevelView, null, 'the toplevelView was not reinitialized');\n });\n});","QUnit.module('ESLint | ember/tests/routing/basic_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/basic_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/decoupled_basic_test', ['ember-babel', 'ember-routing', 'ember-runtime', 'internal-test-helpers'], function (_emberBabel, _emberRouting, _emberRuntime, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Basic Routing - Decoupled from global resovler', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n\n _this.addTemplate('home', '
Hours
');\n _this.addTemplate('camelot', '
Is a silly place
');\n _this.addTemplate('homepage', '
Megatroll
{{model.home}}
');\n\n _this.router.map(function () {\n this.route('home', { path: '/' });\n });\n return _this;\n }\n\n _class.prototype.getController = function getController(name) {\n return this.applicationInstance.lookup('controller:' + name);\n };\n\n _class.prototype['@test warn on URLs not included in the route set'] = function testWarnOnURLsNotIncludedInTheRouteSet(assert) {\n var _this2 = this;\n\n return this.visit('/').then(function () {\n expectAssertion(function () {\n _this2.visit('/what-is-this-i-dont-even');\n }, /'\\/what-is-this-i-dont-even' did not match any routes/);\n });\n };\n\n _class.prototype['@test The Homepage'] = function testTheHomepage(assert) {\n var _this3 = this;\n\n return this.visit('/').then(function () {\n assert.equal(_this3.currentPath, 'home', 'currently on the home route');\n\n var text = _this3.$('#app').text();\n assert.equal(text, \"Hours\", 'the home template was rendered');\n });\n };\n\n _class.prototype['@test The Homepage and the Camelot page with multiple Router.map calls'] = function (assert) {\n var _this4 = this;\n\n this.router.map(function () {\n this.route('camelot', { path: '/camelot' });\n });\n\n return this.visit('/camelot').then(function () {\n assert.equal(_this4.currentPath, 'camelot');\n\n var text = _this4.$('#camelot').text();\n assert.equal(text, \"Is a silly place\", 'the camelot template was rendered');\n\n return _this4.visit('/');\n }).then(function () {\n assert.equal(_this4.currentPath, 'home');\n\n var text = _this4.$('#app').text();\n assert.equal(text, \"Hours\", 'the home template was rendered');\n });\n };\n\n _class.prototype['@test The Homepage with explicit template name in renderTemplate'] = function (assert) {\n var _this5 = this;\n\n this.add('route:home', _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render('homepage');\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this5.$('#troll').text();\n assert.equal(text, \"Megatroll\", 'the homepage template was rendered');\n });\n };\n\n _class.prototype['@test an alternate template will pull in an alternate controller'] = function (assert) {\n var _this6 = this;\n\n this.add('route:home', _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render('homepage');\n }\n }));\n this.add('controller:homepage', _emberRuntime.Controller.extend({\n model: {\n home: 'Comes from homepage'\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this6.$('p').text();\n\n assert.equal(text, 'Comes from homepage', 'the homepage template was rendered');\n });\n };\n\n _class.prototype['@test An alternate template will pull in an alternate controller instead of controllerName'] = function (assert) {\n var _this7 = this;\n\n this.add('route:home', _emberRouting.Route.extend({\n controllerName: 'foo',\n renderTemplate: function () {\n this.render('homepage');\n }\n }));\n this.add('controller:foo', _emberRuntime.Controller.extend({\n model: {\n home: 'Comes from foo'\n }\n }));\n this.add('controller:homepage', _emberRuntime.Controller.extend({\n model: {\n home: 'Comes from homepage'\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this7.$('p').text();\n\n assert.equal(text, 'Comes from homepage', 'the homepage template was rendered');\n });\n };\n\n _class.prototype['@test The template will pull in an alternate controller via key/value'] = function (assert) {\n var _this8 = this;\n\n this.router.map(function () {\n this.route('homepage', { path: '/' });\n });\n\n this.add('route:homepage', _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render({ controller: 'home' });\n }\n }));\n this.add('controller:home', _emberRuntime.Controller.extend({\n model: {\n home: 'Comes from home.'\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this8.$('p').text();\n\n assert.equal(text, 'Comes from home.', 'the homepage template was rendered from data from the HomeController');\n });\n };\n\n _class.prototype['@test The Homepage with explicit template name in renderTemplate and controller'] = function (assert) {\n var _this9 = this;\n\n this.add('controller:home', _emberRuntime.Controller.extend({\n model: {\n home: 'YES I AM HOME'\n }\n }));\n this.add('route:home', _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render('homepage');\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this9.$('p').text();\n\n assert.equal(text, 'YES I AM HOME', 'The homepage template was rendered');\n });\n };\n\n _class.prototype['@test Model passed via renderTemplate model is set as controller\\'s model'] = function (assert) {\n var _this10 = this;\n\n this.addTemplate('bio', '
{{model.name}}
');\n this.add('route:home', _emberRouting.Route.extend({\n renderTemplate: function () {\n this.render('bio', {\n model: { name: 'emberjs' }\n });\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this10.$('p').text();\n\n assert.equal(text, 'emberjs', 'Passed model was set as controller\\'s model');\n });\n };\n\n _class.prototype['@test render uses templateName from route'] = function testRenderUsesTemplateNameFromRoute(assert) {\n var _this11 = this;\n\n this.addTemplate('the_real_home_template', '
THIS IS THE REAL HOME
');\n this.add('route:home', _emberRouting.Route.extend({\n templateName: 'the_real_home_template'\n }));\n\n return this.visit('/').then(function () {\n var text = _this11.$('p').text();\n\n assert.equal(text, 'THIS IS THE REAL HOME', 'the homepage template was rendered');\n });\n };\n\n _class.prototype['@test defining templateName allows other templates to be rendered'] = function testDefiningTemplateNameAllowsOtherTemplatesToBeRendered(assert) {\n var _this12 = this;\n\n this.addTemplate('alert', '
{{outlet \\'alert\\'}}');\n this.add('route:home', _emberRouting.Route.extend({\n templateName: 'the_real_home_template',\n actions: {\n showAlert: function () {\n this.render('alert', {\n into: 'home',\n outlet: 'alert'\n });\n }\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this12.$('p').text();\n assert.equal(text, 'THIS IS THE REAL HOME', 'the homepage template was rendered');\n\n return _this12.runTask(function () {\n return _this12.appRouter.send('showAlert');\n });\n }).then(function () {\n var text = _this12.$('.alert-box').text();\n\n assert.equal(text, 'Invader!', 'Template for alert was rendered into the outlet');\n });\n };\n\n _class.prototype['@test templateName is still used when calling render with no name and options'] = function testTemplateNameIsStillUsedWhenCallingRenderWithNoNameAndOptions(assert) {\n var _this13 = this;\n\n this.addTemplate('alert', '
Invader!
');\n this.addTemplate('home', '
THIS IS THE REAL HOME
{{outlet \\'alert\\'}}');\n\n this.add('route:home', _emberRouting.Route.extend({\n templateName: 'alert',\n renderTemplate: function () {\n this.render({});\n }\n }));\n\n return this.visit('/').then(function () {\n var text = _this13.$('.alert-box').text();\n\n assert.equal(text, 'Invader!', 'default templateName was rendered into outlet');\n });\n };\n\n _class.prototype['@test The Homepage with a `setupController` hook'] = function testTheHomepageWithASetupControllerHook(assert) {\n var _this14 = this;\n\n this.addTemplate('home', '
{{#each hours as |entry|}}\\n
{{entry}}
\\n {{/each}}\\n
\\n ');\n\n this.add('route:home', _emberRouting.Route.extend({\n setupController: function (controller) {\n controller.set('hours', (0, _emberRuntime.A)(['Monday through Friday: 9am to 5pm', 'Saturday: Noon to Midnight', 'Sunday: Noon to 6pm']));\n }\n }));\n return this.visit('/').then(function () {\n var text = _this14.$('ul li').eq(2).text();\n\n assert.equal(text, 'Sunday: Noon to 6pm', 'The template was rendered with the hours context');\n });\n };\n\n _class.prototype['@test The route controller is still set when overriding the setupController hook'] = function (assert) {\n var _this15 = this;\n\n this.add('route:home', _emberRouting.Route.extend({\n setupController: function () {\n // no-op\n // importantly, we are not calling this._super\n }\n }));\n\n this.add('controller:home', _emberRuntime.Controller.extend());\n\n return this.visit('/').then(function () {\n var homeRoute = _this15.applicationInstance.lookup('route:home');\n var homeController = _this15.applicationInstance.lookup('controller:home');\n\n assert.equal(homeRoute.controller, homeController, 'route controller is the home controller');\n });\n };\n\n _class.prototype['@test the route controller can be specified via controllerName'] = function testTheRouteControllerCanBeSpecifiedViaControllerName(assert) {\n var _this16 = this;\n\n this.addTemplate('home', '
{{myValue}}
');\n this.add('route:home', _emberRouting.Route.extend({\n controllerName: 'myController'\n }));\n this.add('controller:myController', _emberRuntime.Controller.extend({\n myValue: 'foo'\n }));\n\n return this.visit('/').then(function () {\n var homeRoute = _this16.applicationInstance.lookup('route:home');\n var myController = _this16.applicationInstance.lookup('controller:myController');\n var text = _this16.$('p').text();\n\n assert.deepEqual(homeRoute.controller, myController, 'route controller is set by controllerName');\n assert.equal(text, 'foo', 'The homepage template was rendered with data from the custom controller');\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'currentPath',\n get: function () {\n return this.getController('application').get('currentPath');\n }\n }]);\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/decoupled_basic_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/decoupled_basic_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/query_params_test', ['ember-babel', 'ember-runtime', 'ember-metal', 'ember-routing', 'ember-views', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberMetal, _emberRouting, _emberViews, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Query Params - main', function (_QueryParamTestCase) {\n (0, _emberBabel.inherits)(_class, _QueryParamTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _QueryParamTestCase.apply(this, arguments));\n }\n\n _class.prototype.refreshModelWhileLoadingTest = function refreshModelWhileLoadingTest(loadingReturn) {\n var _actions,\n _this2 = this;\n\n var assert = this.assert;\n\n assert.expect(9);\n\n var appModelCount = 0;\n var promiseResolve = void 0;\n\n this.add('route:application', _emberRouting.Route.extend({\n queryParams: {\n appomg: {\n defaultValue: 'applol'\n }\n },\n model: function (params) {\n appModelCount++;\n }\n }));\n\n this.setSingleQPController('index', 'omg', undefined, {\n omg: undefined\n });\n\n var actionName = typeof loadingReturn !== 'undefined' ? 'loading' : 'ignore';\n var indexModelCount = 0;\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n omg: {\n refreshModel: true\n }\n },\n actions: (_actions = {}, _actions[actionName] = function () {\n return loadingReturn;\n }, _actions),\n model: function (params) {\n indexModelCount++;\n if (indexModelCount === 2) {\n assert.deepEqual(params, { omg: 'lex' });\n return new _emberRuntime.RSVP.Promise(function (resolve) {\n promiseResolve = resolve;\n return;\n });\n } else if (indexModelCount === 3) {\n assert.deepEqual(params, { omg: 'hello' }, 'Model hook reruns even if the previous one didn\\'t finish');\n }\n }\n }));\n\n return this.visit('/').then(function () {\n assert.equal(appModelCount, 1, 'appModelCount is 1');\n assert.equal(indexModelCount, 1);\n\n var indexController = _this2.getController('index');\n _this2.setAndFlush(indexController, 'omg', 'lex');\n\n assert.equal(appModelCount, 1, 'appModelCount is 1');\n assert.equal(indexModelCount, 2);\n\n _this2.setAndFlush(indexController, 'omg', 'hello');\n assert.equal(appModelCount, 1, 'appModelCount is 1');\n assert.equal(indexModelCount, 3);\n\n (0, _emberMetal.run)(function () {\n promiseResolve();\n });\n\n assert.equal((0, _emberMetal.get)(indexController, 'omg'), 'hello', 'At the end last value prevails');\n });\n };\n\n _class.prototype['@test No replaceURL occurs on startup because default values don\\'t show up in URL'] = function testNoReplaceURLOccursOnStartupBecauseDefaultValuesDonTShowUpInURL(assert) {\n assert.expect(1);\n\n this.setSingleQPController('index');\n\n return this.visitAndAssert('/');\n };\n\n _class.prototype['@test Calling transitionTo does not lose query params already on the activeTransition'] = function testCallingTransitionToDoesNotLoseQueryParamsAlreadyOnTheActiveTransition(assert) {\n var _this3 = this;\n\n assert.expect(2);\n\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n this.route('sibling');\n });\n });\n\n this.add('route:parent.child', _emberRouting.Route.extend({\n afterModel: function () {\n this.transitionTo('parent.sibling');\n }\n }));\n\n this.setSingleQPController('parent');\n\n return this.visit('/parent/child?foo=lol').then(function () {\n _this3.assertCurrentPath('/parent/sibling?foo=lol', 'redirected to the sibling route, instead of child route');\n assert.equal(_this3.getController('parent').get('foo'), 'lol', 'controller has value from the active transition');\n });\n };\n\n _class.prototype['@test Single query params can be set on the controller and reflected in the url'] = function testSingleQueryParamsCanBeSetOnTheControllerAndReflectedInTheUrl(assert) {\n var _this4 = this;\n\n assert.expect(3);\n\n this.router.map(function () {\n this.route('home', { path: '/' });\n });\n\n this.setSingleQPController('home');\n\n return this.visitAndAssert('/').then(function () {\n var controller = _this4.getController('home');\n\n _this4.setAndFlush(controller, 'foo', '456');\n _this4.assertCurrentPath('/?foo=456');\n\n _this4.setAndFlush(controller, 'foo', '987');\n _this4.assertCurrentPath('/?foo=987');\n });\n };\n\n _class.prototype['@test Query params can map to different url keys configured on the controller'] = function testQueryParamsCanMapToDifferentUrlKeysConfiguredOnTheController(assert) {\n var _this5 = this;\n\n assert.expect(6);\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: [{ foo: 'other_foo', bar: { as: 'other_bar' } }],\n foo: 'FOO',\n bar: 'BAR'\n }));\n\n return this.visitAndAssert('/').then(function () {\n var controller = _this5.getController('index');\n\n _this5.setAndFlush(controller, 'foo', 'LEX');\n _this5.assertCurrentPath('/?other_foo=LEX', 'QP mapped correctly without \\'as\\'');\n\n _this5.setAndFlush(controller, 'foo', 'WOO');\n _this5.assertCurrentPath('/?other_foo=WOO', 'QP updated correctly without \\'as\\'');\n\n _this5.transitionTo('/?other_foo=NAW');\n assert.equal(controller.get('foo'), 'NAW', 'QP managed correctly on URL transition');\n\n _this5.setAndFlush(controller, 'bar', 'NERK');\n _this5.assertCurrentPath('/?other_bar=NERK&other_foo=NAW', 'QP mapped correctly with \\'as\\'');\n\n _this5.setAndFlush(controller, 'bar', 'NUKE');\n _this5.assertCurrentPath('/?other_bar=NUKE&other_foo=NAW', 'QP updated correctly with \\'as\\'');\n });\n };\n\n _class.prototype['@test Routes have a private overridable serializeQueryParamKey hook'] = function testRoutesHaveAPrivateOverridableSerializeQueryParamKeyHook(assert) {\n var _this6 = this;\n\n assert.expect(2);\n\n this.add('route:index', _emberRouting.Route.extend({\n serializeQueryParamKey: _emberRuntime.String.dasherize\n }));\n\n this.setSingleQPController('index', 'funTimes', '');\n\n return this.visitAndAssert('/').then(function () {\n var controller = _this6.getController('index');\n\n _this6.setAndFlush(controller, 'funTimes', 'woot');\n _this6.assertCurrentPath('/?fun-times=woot');\n });\n };\n\n _class.prototype['@test Can override inherited QP behavior by specifying queryParams as a computed property'] = function testCanOverrideInheritedQPBehaviorBySpecifyingQueryParamsAsAComputedProperty(assert) {\n var _this7 = this;\n\n assert.expect(3);\n\n this.setSingleQPController('index', 'a', 0, {\n queryParams: (0, _emberMetal.computed)(function () {\n return ['c'];\n }),\n c: true\n });\n\n return this.visitAndAssert('/').then(function () {\n var indexController = _this7.getController('index');\n\n _this7.setAndFlush(indexController, 'a', 1);\n _this7.assertCurrentPath('/', 'QP did not update due to being overriden');\n\n _this7.setAndFlush(indexController, 'c', false);\n _this7.assertCurrentPath('/?c=false', 'QP updated with overridden param');\n });\n };\n\n _class.prototype['@test Can concatenate inherited QP behavior by specifying queryParams as an array'] = function testCanConcatenateInheritedQPBehaviorBySpecifyingQueryParamsAsAnArray(assert) {\n var _this8 = this;\n\n assert.expect(3);\n\n this.setSingleQPController('index', 'a', 0, {\n queryParams: ['c'],\n c: true\n });\n\n return this.visitAndAssert('/').then(function () {\n var indexController = _this8.getController('index');\n\n _this8.setAndFlush(indexController, 'a', 1);\n _this8.assertCurrentPath('/?a=1', 'Inherited QP did update');\n\n _this8.setAndFlush(indexController, 'c', false);\n _this8.assertCurrentPath('/?a=1&c=false', 'New QP did update');\n });\n };\n\n _class.prototype['@test model hooks receives query params'] = function testModelHooksReceivesQueryParams(assert) {\n assert.expect(2);\n\n this.setSingleQPController('index');\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { foo: 'bar' });\n }\n }));\n\n return this.visitAndAssert('/');\n };\n\n _class.prototype['@test model hooks receives query params with dynamic segment params'] = function testModelHooksReceivesQueryParamsWithDynamicSegmentParams(assert) {\n assert.expect(2);\n\n this.router.map(function () {\n this.route('index', { path: '/:id' });\n });\n\n this.setSingleQPController('index');\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { foo: 'bar', id: 'baz' });\n }\n }));\n\n return this.visitAndAssert('/baz');\n };\n\n _class.prototype['@test model hooks receives query params (overridden by incoming url value)'] = function testModelHooksReceivesQueryParamsOverriddenByIncomingUrlValue(assert) {\n assert.expect(2);\n\n this.router.map(function () {\n this.route('index', { path: '/:id' });\n });\n\n this.setSingleQPController('index');\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { foo: 'baz', id: 'boo' });\n }\n }));\n\n return this.visitAndAssert('/boo?foo=baz');\n };\n\n _class.prototype['@test error is thrown if dynamic segment and query param have same name'] = function testErrorIsThrownIfDynamicSegmentAndQueryParamHaveSameName(assert) {\n var _this9 = this;\n\n assert.expect(1);\n\n this.router.map(function () {\n this.route('index', { path: '/:foo' });\n });\n\n this.setSingleQPController('index');\n\n expectAssertion(function () {\n _this9.visitAndAssert('/boo?foo=baz');\n }, 'The route \\'index\\' has both a dynamic segment and query param with name \\'foo\\'. Please rename one to avoid collisions.');\n };\n\n _class.prototype['@test query params have been set by the time setupController is called'] = function testQueryParamsHaveBeenSetByTheTimeSetupControllerIsCalled(assert) {\n assert.expect(2);\n\n this.setSingleQPController('application');\n\n this.add('route:application', _emberRouting.Route.extend({\n setupController: function (controller) {\n assert.equal(controller.get('foo'), 'YEAH', 'controller\\'s foo QP property set before setupController called');\n }\n }));\n\n return this.visitAndAssert('/?foo=YEAH');\n };\n\n _class.prototype['@test mapped query params have been set by the time setupController is called'] = function testMappedQueryParamsHaveBeenSetByTheTimeSetupControllerIsCalled(assert) {\n assert.expect(2);\n\n this.setSingleQPController('application', { faz: 'foo' });\n\n this.add('route:application', _emberRouting.Route.extend({\n setupController: function (controller) {\n assert.equal(controller.get('faz'), 'YEAH', 'controller\\'s foo QP property set before setupController called');\n }\n }));\n\n return this.visitAndAssert('/?foo=YEAH');\n };\n\n _class.prototype['@test Route#paramsFor fetches query params with default value'] = function testRouteParamsForFetchesQueryParamsWithDefaultValue(assert) {\n assert.expect(2);\n\n this.router.map(function () {\n this.route('index', { path: '/:something' });\n });\n\n this.setSingleQPController('index');\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params, transition) {\n assert.deepEqual(this.paramsFor('index'), { something: 'baz', foo: 'bar' }, 'could retrieve params for index');\n }\n }));\n\n return this.visitAndAssert('/baz');\n };\n\n _class.prototype['@test Route#paramsFor fetches query params with non-default value'] = function testRouteParamsForFetchesQueryParamsWithNonDefaultValue(assert) {\n assert.expect(2);\n\n this.router.map(function () {\n this.route('index', { path: '/:something' });\n });\n\n this.setSingleQPController('index');\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params, transition) {\n assert.deepEqual(this.paramsFor('index'), { something: 'baz', foo: 'boo' }, 'could retrieve params for index');\n }\n }));\n\n return this.visitAndAssert('/baz?foo=boo');\n };\n\n _class.prototype['@test Route#paramsFor fetches default falsy query params'] = function testRouteParamsForFetchesDefaultFalsyQueryParams(assert) {\n assert.expect(2);\n\n this.router.map(function () {\n this.route('index', { path: '/:something' });\n });\n\n this.setSingleQPController('index', 'foo', false);\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params, transition) {\n assert.deepEqual(this.paramsFor('index'), { something: 'baz', foo: false }, 'could retrieve params for index');\n }\n }));\n\n return this.visitAndAssert('/baz');\n };\n\n _class.prototype['@test Route#paramsFor fetches non-default falsy query params'] = function testRouteParamsForFetchesNonDefaultFalsyQueryParams(assert) {\n assert.expect(2);\n\n this.router.map(function () {\n this.route('index', { path: '/:something' });\n });\n\n this.setSingleQPController('index', 'foo', true);\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params, transition) {\n assert.deepEqual(this.paramsFor('index'), { something: 'baz', foo: false }, 'could retrieve params for index');\n }\n }));\n\n return this.visitAndAssert('/baz?foo=false');\n };\n\n _class.prototype['@test model hook can query prefix-less application params'] = function testModelHookCanQueryPrefixLessApplicationParams(assert) {\n assert.expect(4);\n\n this.setSingleQPController('application', 'appomg', 'applol');\n this.setSingleQPController('index', 'omg', 'lol');\n\n this.add('route:application', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { appomg: 'applol' });\n }\n }));\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { omg: 'lol' });\n assert.deepEqual(this.paramsFor('application'), { appomg: 'applol' });\n }\n }));\n\n return this.visitAndAssert('/');\n };\n\n _class.prototype['@test model hook can query prefix-less application params (overridden by incoming url value)'] = function testModelHookCanQueryPrefixLessApplicationParamsOverriddenByIncomingUrlValue(assert) {\n assert.expect(4);\n\n this.setSingleQPController('application', 'appomg', 'applol');\n this.setSingleQPController('index', 'omg', 'lol');\n\n this.add('route:application', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { appomg: 'appyes' });\n }\n }));\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { omg: 'yes' });\n assert.deepEqual(this.paramsFor('application'), { appomg: 'appyes' });\n }\n }));\n\n return this.visitAndAssert('/?appomg=appyes&omg=yes');\n };\n\n _class.prototype['@test can opt into full transition by setting refreshModel in route queryParams'] = function testCanOptIntoFullTransitionBySettingRefreshModelInRouteQueryParams(assert) {\n var _this10 = this;\n\n assert.expect(7);\n\n this.setSingleQPController('application', 'appomg', 'applol');\n this.setSingleQPController('index', 'omg', 'lol');\n\n var appModelCount = 0;\n this.add('route:application', _emberRouting.Route.extend({\n model: function (params) {\n appModelCount++;\n }\n }));\n\n var indexModelCount = 0;\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n omg: {\n refreshModel: true\n }\n },\n model: function (params) {\n indexModelCount++;\n\n if (indexModelCount === 1) {\n assert.deepEqual(params, { omg: 'lol' }, 'params are correct on first pass');\n } else if (indexModelCount === 2) {\n assert.deepEqual(params, { omg: 'lex' }, 'params are correct on second pass');\n }\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(appModelCount, 1, 'app model hook ran');\n assert.equal(indexModelCount, 1, 'index model hook ran');\n\n var indexController = _this10.getController('index');\n _this10.setAndFlush(indexController, 'omg', 'lex');\n\n assert.equal(appModelCount, 1, 'app model hook did not run again');\n assert.equal(indexModelCount, 2, 'index model hook ran again due to refreshModel');\n });\n };\n\n _class.prototype['@test refreshModel and replace work together'] = function testRefreshModelAndReplaceWorkTogether(assert) {\n var _this11 = this;\n\n assert.expect(8);\n\n this.setSingleQPController('application', 'appomg', 'applol');\n this.setSingleQPController('index', 'omg', 'lol');\n\n var appModelCount = 0;\n this.add('route:application', _emberRouting.Route.extend({\n model: function (params) {\n appModelCount++;\n }\n }));\n\n var indexModelCount = 0;\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n omg: {\n refreshModel: true,\n replace: true\n }\n },\n model: function (params) {\n indexModelCount++;\n\n if (indexModelCount === 1) {\n assert.deepEqual(params, { omg: 'lol' }, 'params are correct on first pass');\n } else if (indexModelCount === 2) {\n assert.deepEqual(params, { omg: 'lex' }, 'params are correct on second pass');\n }\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(appModelCount, 1, 'app model hook ran');\n assert.equal(indexModelCount, 1, 'index model hook ran');\n\n var indexController = _this11.getController('index');\n _this11.expectedReplaceURL = '/?omg=lex';\n _this11.setAndFlush(indexController, 'omg', 'lex');\n\n assert.equal(appModelCount, 1, 'app model hook did not run again');\n assert.equal(indexModelCount, 2, 'index model hook ran again due to refreshModel');\n });\n };\n\n _class.prototype['@test multiple QP value changes only cause a single model refresh'] = function testMultipleQPValueChangesOnlyCauseASingleModelRefresh(assert) {\n var _this12 = this;\n\n assert.expect(2);\n\n this.setSingleQPController('index', 'alex', 'lol');\n this.setSingleQPController('index', 'steely', 'lel');\n\n var refreshCount = 0;\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n alex: {\n refreshModel: true\n },\n steely: {\n refreshModel: true\n }\n },\n refresh: function () {\n refreshCount++;\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n var indexController = _this12.getController('index');\n (0, _emberMetal.run)(indexController, 'setProperties', { alex: 'fran', steely: 'david' });\n assert.equal(refreshCount, 1, 'index refresh hook only run once');\n });\n };\n\n _class.prototype['@test refreshModel does not cause a second transition during app boot '] = function testRefreshModelDoesNotCauseASecondTransitionDuringAppBoot(assert) {\n assert.expect(1);\n\n this.setSingleQPController('application', 'appomg', 'applol');\n this.setSingleQPController('index', 'omg', 'lol');\n\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n omg: {\n refreshModel: true\n }\n },\n refresh: function () {\n assert.ok(false);\n }\n }));\n\n return this.visitAndAssert('/?appomg=hello&omg=world');\n };\n\n _class.prototype['@test queryParams are updated when a controller property is set and the route is refreshed. Issue #13263 '] = function testQueryParamsAreUpdatedWhenAControllerPropertyIsSetAndTheRouteIsRefreshedIssue13263(assert) {\n var _this13 = this;\n\n this.addTemplate('application', '{{foo}}{{outlet}}');\n\n this.setSingleQPController('application', 'foo', 1, {\n actions: {\n increment: function () {\n this.incrementProperty('foo');\n this.send('refreshRoute');\n }\n }\n });\n\n this.add('route:application', _emberRouting.Route.extend({\n actions: {\n refreshRoute: function () {\n this.refresh();\n }\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal((0, _emberViews.jQuery)('#test-value').text().trim(), '1');\n\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#test-button'), 'click');\n assert.equal((0, _emberViews.jQuery)('#test-value').text().trim(), '2');\n _this13.assertCurrentPath('/?foo=2');\n\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#test-button'), 'click');\n assert.equal((0, _emberViews.jQuery)('#test-value').text().trim(), '3');\n _this13.assertCurrentPath('/?foo=3');\n });\n };\n\n _class.prototype['@test Use Ember.get to retrieve query params \\'refreshModel\\' configuration'] = function testUseEmberGetToRetrieveQueryParamsRefreshModelConfiguration(assert) {\n var _this14 = this;\n\n assert.expect(7);\n\n this.setSingleQPController('application', 'appomg', 'applol');\n this.setSingleQPController('index', 'omg', 'lol');\n\n var appModelCount = 0;\n this.add('route:application', _emberRouting.Route.extend({\n model: function (params) {\n appModelCount++;\n }\n }));\n\n var indexModelCount = 0;\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: _emberRuntime.Object.create({\n unknownProperty: function (keyName) {\n return { refreshModel: true };\n }\n }),\n model: function (params) {\n indexModelCount++;\n\n if (indexModelCount === 1) {\n assert.deepEqual(params, { omg: 'lol' });\n } else if (indexModelCount === 2) {\n assert.deepEqual(params, { omg: 'lex' });\n }\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(appModelCount, 1);\n assert.equal(indexModelCount, 1);\n\n var indexController = _this14.getController('index');\n _this14.setAndFlush(indexController, 'omg', 'lex');\n\n assert.equal(appModelCount, 1);\n assert.equal(indexModelCount, 2);\n });\n };\n\n _class.prototype['@test can use refreshModel even with URL changes that remove QPs from address bar'] = function testCanUseRefreshModelEvenWithURLChangesThatRemoveQPsFromAddressBar(assert) {\n var _this15 = this;\n\n assert.expect(4);\n\n this.setSingleQPController('index', 'omg', 'lol');\n\n var indexModelCount = 0;\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n omg: {\n refreshModel: true\n }\n },\n model: function (params) {\n indexModelCount++;\n\n var data = void 0;\n if (indexModelCount === 1) {\n data = 'foo';\n } else if (indexModelCount === 2) {\n data = 'lol';\n }\n\n assert.deepEqual(params, { omg: data }, 'index#model receives right data');\n }\n }));\n\n return this.visitAndAssert('/?omg=foo').then(function () {\n _this15.transitionTo('/');\n\n var indexController = _this15.getController('index');\n assert.equal(indexController.get('omg'), 'lol');\n });\n };\n\n _class.prototype['@test can opt into a replace query by specifying replace:true in the Route config hash'] = function testCanOptIntoAReplaceQueryBySpecifyingReplaceTrueInTheRouteConfigHash(assert) {\n var _this16 = this;\n\n assert.expect(2);\n\n this.setSingleQPController('application', 'alex', 'matchneer');\n\n this.add('route:application', _emberRouting.Route.extend({\n queryParams: {\n alex: {\n replace: true\n }\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n var appController = _this16.getController('application');\n _this16.expectedReplaceURL = '/?alex=wallace';\n _this16.setAndFlush(appController, 'alex', 'wallace');\n });\n };\n\n _class.prototype['@test Route query params config can be configured using property name instead of URL key'] = function testRouteQueryParamsConfigCanBeConfiguredUsingPropertyNameInsteadOfURLKey(assert) {\n var _this17 = this;\n\n assert.expect(2);\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n queryParams: [{ commitBy: 'commit_by' }]\n }));\n\n this.add('route:application', _emberRouting.Route.extend({\n queryParams: {\n commitBy: {\n replace: true\n }\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n var appController = _this17.getController('application');\n _this17.expectedReplaceURL = '/?commit_by=igor_seb';\n _this17.setAndFlush(appController, 'commitBy', 'igor_seb');\n });\n };\n\n _class.prototype['@test An explicit replace:false on a changed QP always wins and causes a pushState'] = function testAnExplicitReplaceFalseOnAChangedQPAlwaysWinsAndCausesAPushState(assert) {\n var _this18 = this;\n\n assert.expect(3);\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n queryParams: ['alex', 'steely'],\n alex: 'matchneer',\n steely: 'dan'\n }));\n\n this.add('route:application', _emberRouting.Route.extend({\n queryParams: {\n alex: {\n replace: true\n },\n steely: {\n replace: false\n }\n }\n }));\n\n return this.visit('/').then(function () {\n var appController = _this18.getController('application');\n _this18.expectedPushURL = '/?alex=wallace&steely=jan';\n (0, _emberMetal.run)(appController, 'setProperties', { alex: 'wallace', steely: 'jan' });\n\n _this18.expectedPushURL = '/?alex=wallace&steely=fran';\n (0, _emberMetal.run)(appController, 'setProperties', { steely: 'fran' });\n\n _this18.expectedReplaceURL = '/?alex=sriracha&steely=fran';\n (0, _emberMetal.run)(appController, 'setProperties', { alex: 'sriracha' });\n });\n };\n\n _class.prototype['@test can opt into full transition by setting refreshModel in route queryParams when transitioning from child to parent'] = function testCanOptIntoFullTransitionBySettingRefreshModelInRouteQueryParamsWhenTransitioningFromChildToParent(assert) {\n this.addTemplate('parent', '{{outlet}}');\n this.addTemplate('parent.child', '{{link-to \\'Parent\\' \\'parent\\' (query-params foo=\\'change\\') id=\\'parent-link\\'}}');\n\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n\n var parentModelCount = 0;\n this.add('route:parent', _emberRouting.Route.extend({\n model: function () {\n parentModelCount++;\n },\n\n queryParams: {\n foo: {\n refreshModel: true\n }\n }\n }));\n\n this.setSingleQPController('parent', 'foo', 'abc');\n\n return this.visit('/parent/child?foo=lol').then(function () {\n assert.equal(parentModelCount, 1);\n\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#parent-link'), 'click');\n assert.equal(parentModelCount, 2);\n });\n };\n\n _class.prototype['@test Use Ember.get to retrieve query params \\'replace\\' configuration'] = function testUseEmberGetToRetrieveQueryParamsReplaceConfiguration(assert) {\n var _this19 = this;\n\n assert.expect(2);\n\n this.setSingleQPController('application', 'alex', 'matchneer');\n\n this.add('route:application', _emberRouting.Route.extend({\n queryParams: _emberRuntime.Object.create({\n unknownProperty: function (keyName) {\n // We are simulating all qps requiring refresh\n return { replace: true };\n }\n })\n }));\n\n return this.visitAndAssert('/').then(function () {\n var appController = _this19.getController('application');\n _this19.expectedReplaceURL = '/?alex=wallace';\n _this19.setAndFlush(appController, 'alex', 'wallace');\n });\n };\n\n _class.prototype['@test can override incoming QP values in setupController'] = function testCanOverrideIncomingQPValuesInSetupController(assert) {\n var _this20 = this;\n\n assert.expect(3);\n\n this.router.map(function () {\n this.route('about');\n });\n\n this.setSingleQPController('index', 'omg', 'lol');\n\n this.add('route:index', _emberRouting.Route.extend({\n setupController: function (controller) {\n assert.ok(true, 'setupController called');\n controller.set('omg', 'OVERRIDE');\n },\n\n actions: {\n queryParamsDidChange: function () {\n assert.ok(false, 'queryParamsDidChange shouldn\\'t fire');\n }\n }\n }));\n\n return this.visitAndAssert('/about').then(function () {\n _this20.transitionTo('index');\n _this20.assertCurrentPath('/?omg=OVERRIDE');\n });\n };\n\n _class.prototype['@test can override incoming QP array values in setupController'] = function testCanOverrideIncomingQPArrayValuesInSetupController(assert) {\n var _this21 = this;\n\n assert.expect(3);\n\n this.router.map(function () {\n this.route('about');\n });\n\n this.setSingleQPController('index', 'omg', ['lol']);\n\n this.add('route:index', _emberRouting.Route.extend({\n setupController: function (controller) {\n assert.ok(true, 'setupController called');\n controller.set('omg', ['OVERRIDE']);\n },\n\n actions: {\n queryParamsDidChange: function () {\n assert.ok(false, 'queryParamsDidChange shouldn\\'t fire');\n }\n }\n }));\n\n return this.visitAndAssert('/about').then(function () {\n _this21.transitionTo('index');\n _this21.assertCurrentPath('/?omg=' + encodeURIComponent(JSON.stringify(['OVERRIDE'])));\n });\n };\n\n _class.prototype['@test URL transitions that remove QPs still register as QP changes'] = function testURLTransitionsThatRemoveQPsStillRegisterAsQPChanges(assert) {\n var _this22 = this;\n\n assert.expect(2);\n\n this.setSingleQPController('index', 'omg', 'lol');\n\n return this.visit('/?omg=borf').then(function () {\n var indexController = _this22.getController('index');\n assert.equal(indexController.get('omg'), 'borf');\n\n _this22.transitionTo('/');\n assert.equal(indexController.get('omg'), 'lol');\n });\n };\n\n _class.prototype['@test Subresource naming style is supported'] = function testSubresourceNamingStyleIsSupported(assert) {\n var _this23 = this;\n\n assert.expect(5);\n\n this.router.map(function () {\n this.route('abc.def', { path: '/abcdef' }, function () {\n this.route('zoo');\n });\n });\n\n this.addTemplate('application', '{{link-to \\'A\\' \\'abc.def\\' (query-params foo=\\'123\\') id=\\'one\\'}}{{link-to \\'B\\' \\'abc.def.zoo\\' (query-params foo=\\'123\\' bar=\\'456\\') id=\\'two\\'}}{{outlet}}');\n\n this.setSingleQPController('abc.def', 'foo', 'lol');\n this.setSingleQPController('abc.def.zoo', 'bar', 'haha');\n\n return this.visitAndAssert('/').then(function () {\n assert.equal((0, _emberViews.jQuery)('#one').attr('href'), '/abcdef?foo=123');\n assert.equal((0, _emberViews.jQuery)('#two').attr('href'), '/abcdef/zoo?bar=456&foo=123');\n\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#one'), 'click');\n _this23.assertCurrentPath('/abcdef?foo=123');\n\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#two'), 'click');\n _this23.assertCurrentPath('/abcdef/zoo?bar=456&foo=123');\n });\n };\n\n _class.prototype['@test transitionTo supports query params'] = function testTransitionToSupportsQueryParams(assert) {\n var _this24 = this;\n\n this.setSingleQPController('index', 'foo', 'lol');\n\n return this.visitAndAssert('/').then(function () {\n _this24.transitionTo({ queryParams: { foo: 'borf' } });\n _this24.assertCurrentPath('/?foo=borf', 'shorthand supported');\n\n _this24.transitionTo({ queryParams: { 'index:foo': 'blaf' } });\n _this24.assertCurrentPath('/?foo=blaf', 'longform supported');\n\n _this24.transitionTo({ queryParams: { 'index:foo': false } });\n _this24.assertCurrentPath('/?foo=false', 'longform supported (bool)');\n\n _this24.transitionTo({ queryParams: { foo: false } });\n _this24.assertCurrentPath('/?foo=false', 'shorhand supported (bool)');\n });\n };\n\n _class.prototype['@test transitionTo supports query params (multiple)'] = function testTransitionToSupportsQueryParamsMultiple(assert) {\n var _this25 = this;\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['foo', 'bar'],\n foo: 'lol',\n bar: 'wat'\n }));\n\n return this.visitAndAssert('/').then(function () {\n _this25.transitionTo({ queryParams: { foo: 'borf' } });\n _this25.assertCurrentPath('/?foo=borf', 'shorthand supported');\n\n _this25.transitionTo({ queryParams: { 'index:foo': 'blaf' } });\n _this25.assertCurrentPath('/?foo=blaf', 'longform supported');\n\n _this25.transitionTo({ queryParams: { 'index:foo': false } });\n _this25.assertCurrentPath('/?foo=false', 'longform supported (bool)');\n\n _this25.transitionTo({ queryParams: { foo: false } });\n _this25.assertCurrentPath('/?foo=false', 'shorhand supported (bool)');\n });\n };\n\n _class.prototype['@test setting controller QP to empty string doesn\\'t generate null in URL'] = function testSettingControllerQPToEmptyStringDoesnTGenerateNullInURL(assert) {\n var _this26 = this;\n\n assert.expect(1);\n\n this.setSingleQPController('index', 'foo', '123');\n\n return this.visit('/').then(function () {\n var controller = _this26.getController('index');\n\n _this26.expectedPushURL = '/?foo=';\n _this26.setAndFlush(controller, 'foo', '');\n });\n };\n\n _class.prototype['@test setting QP to empty string doesn\\'t generate null in URL'] = function testSettingQPToEmptyStringDoesnTGenerateNullInURL(assert) {\n var _this27 = this;\n\n assert.expect(1);\n\n this.add('route:index', _emberRouting.Route.extend({\n queryParams: {\n foo: {\n defaultValue: '123'\n }\n }\n }));\n\n return this.visit('/').then(function () {\n var controller = _this27.getController('index');\n\n _this27.expectedPushURL = '/?foo=';\n _this27.setAndFlush(controller, 'foo', '');\n });\n };\n\n _class.prototype['@test A default boolean value deserializes QPs as booleans rather than strings'] = function testADefaultBooleanValueDeserializesQPsAsBooleansRatherThanStrings(assert) {\n var _this28 = this;\n\n assert.expect(3);\n\n this.setSingleQPController('index', 'foo', false);\n\n this.add('route:index', _emberRouting.Route.extend({\n model: function (params) {\n assert.equal(params.foo, true, 'model hook received foo as boolean true');\n }\n }));\n\n return this.visit('/?foo=true').then(function () {\n var controller = _this28.getController('index');\n assert.equal(controller.get('foo'), true);\n\n _this28.transitionTo('/?foo=false');\n assert.equal(controller.get('foo'), false);\n });\n };\n\n _class.prototype['@test Query param without value are empty string'] = function testQueryParamWithoutValueAreEmptyString(assert) {\n var _this29 = this;\n\n assert.expect(1);\n\n this.add('controller:index', _emberRuntime.Controller.extend({\n queryParams: ['foo'],\n foo: ''\n }));\n\n return this.visit('/?foo=').then(function () {\n var controller = _this29.getController('index');\n assert.equal(controller.get('foo'), '');\n });\n };\n\n _class.prototype['@test Array query params can be set'] = function testArrayQueryParamsCanBeSet(assert) {\n var _this30 = this;\n\n assert.expect(2);\n\n this.router.map(function () {\n this.route('home', { path: '/' });\n });\n\n this.setSingleQPController('home', 'foo', []);\n\n return this.visit('/').then(function () {\n var controller = _this30.getController('home');\n\n _this30.setAndFlush(controller, 'foo', [1, 2]);\n _this30.assertCurrentPath('/?foo=%5B1%2C2%5D');\n\n _this30.setAndFlush(controller, 'foo', [3, 4]);\n _this30.assertCurrentPath('/?foo=%5B3%2C4%5D');\n });\n };\n\n _class.prototype['@test (de)serialization: arrays'] = function testDeSerializationArrays(assert) {\n var _this31 = this;\n\n assert.expect(4);\n\n this.setSingleQPController('index', 'foo', [1]);\n\n return this.visitAndAssert('/').then(function () {\n _this31.transitionTo({ queryParams: { foo: [2, 3] } });\n _this31.assertCurrentPath('/?foo=%5B2%2C3%5D', 'shorthand supported');\n _this31.transitionTo({ queryParams: { 'index:foo': [4, 5] } });\n _this31.assertCurrentPath('/?foo=%5B4%2C5%5D', 'longform supported');\n _this31.transitionTo({ queryParams: { foo: [] } });\n _this31.assertCurrentPath('/?foo=%5B%5D', 'longform supported');\n });\n };\n\n _class.prototype['@test Url with array query param sets controller property to array'] = function testUrlWithArrayQueryParamSetsControllerPropertyToArray(assert) {\n var _this32 = this;\n\n assert.expect(1);\n\n this.setSingleQPController('index', 'foo', '');\n\n return this.visit('/?foo[]=1&foo[]=2&foo[]=3').then(function () {\n var controller = _this32.getController('index');\n assert.deepEqual(controller.get('foo'), ['1', '2', '3']);\n });\n };\n\n _class.prototype['@test Array query params can be pushed/popped'] = function testArrayQueryParamsCanBePushedPopped(assert) {\n var _this33 = this;\n\n assert.expect(17);\n\n this.router.map(function () {\n this.route('home', { path: '/' });\n });\n\n this.setSingleQPController('home', 'foo', (0, _emberRuntime.A)());\n\n return this.visitAndAssert('/').then(function () {\n var controller = _this33.getController('home');\n\n (0, _emberMetal.run)(controller.foo, 'pushObject', 1);\n _this33.assertCurrentPath('/?foo=%5B1%5D');\n assert.deepEqual(controller.foo, [1]);\n\n (0, _emberMetal.run)(controller.foo, 'popObject');\n _this33.assertCurrentPath('/');\n assert.deepEqual(controller.foo, []);\n\n (0, _emberMetal.run)(controller.foo, 'pushObject', 1);\n _this33.assertCurrentPath('/?foo=%5B1%5D');\n assert.deepEqual(controller.foo, [1]);\n\n (0, _emberMetal.run)(controller.foo, 'popObject');\n _this33.assertCurrentPath('/');\n assert.deepEqual(controller.foo, []);\n\n (0, _emberMetal.run)(controller.foo, 'pushObject', 1);\n _this33.assertCurrentPath('/?foo=%5B1%5D');\n assert.deepEqual(controller.foo, [1]);\n\n (0, _emberMetal.run)(controller.foo, 'pushObject', 2);\n _this33.assertCurrentPath('/?foo=%5B1%2C2%5D');\n assert.deepEqual(controller.foo, [1, 2]);\n\n (0, _emberMetal.run)(controller.foo, 'popObject');\n _this33.assertCurrentPath('/?foo=%5B1%5D');\n assert.deepEqual(controller.foo, [1]);\n\n (0, _emberMetal.run)(controller.foo, 'unshiftObject', 'lol');\n _this33.assertCurrentPath('/?foo=%5B%22lol%22%2C1%5D');\n assert.deepEqual(controller.foo, ['lol', 1]);\n });\n };\n\n _class.prototype['@test Overwriting with array with same content shouldn\\'t refire update'] = function testOverwritingWithArrayWithSameContentShouldnTRefireUpdate(assert) {\n var _this34 = this;\n\n assert.expect(4);\n\n this.router.map(function () {\n this.route('home', { path: '/' });\n });\n\n var modelCount = 0;\n this.add('route:home', _emberRouting.Route.extend({\n model: function () {\n modelCount++;\n }\n }));\n\n this.setSingleQPController('home', 'foo', (0, _emberRuntime.A)([1]));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(modelCount, 1);\n\n var controller = _this34.getController('home');\n _this34.setAndFlush(controller, 'model', (0, _emberRuntime.A)([1]));\n\n assert.equal(modelCount, 1);\n _this34.assertCurrentPath('/');\n });\n };\n\n _class.prototype['@test Defaulting to params hash as the model should not result in that params object being watched'] = function testDefaultingToParamsHashAsTheModelShouldNotResultInThatParamsObjectBeingWatched(assert) {\n var _this35 = this;\n\n assert.expect(1);\n\n this.router.map(function () {\n this.route('other');\n });\n\n // This causes the params hash, which is returned as a route's\n // model if no other model could be resolved given the provided\n // params (and no custom model hook was defined), to be watched,\n // unless we return a copy of the params hash.\n this.setSingleQPController('application', 'woot', 'wat');\n\n this.add('route:other', _emberRouting.Route.extend({\n model: function (p, trans) {\n var m = (0, _emberMetal.peekMeta)(trans.params.application);\n assert.ok(m === undefined, 'A meta object isn\\'t constructed for this params POJO');\n }\n }));\n\n return this.visit('/').then(function () {\n _this35.transitionTo('other');\n });\n };\n\n _class.prototype['@test Setting bound query param property to null or undefined does not serialize to url'] = function testSettingBoundQueryParamPropertyToNullOrUndefinedDoesNotSerializeToUrl(assert) {\n var _this36 = this;\n\n assert.expect(9);\n\n this.router.map(function () {\n this.route('home');\n });\n\n this.setSingleQPController('home', 'foo', [1, 2]);\n\n return this.visitAndAssert('/home').then(function () {\n var controller = _this36.getController('home');\n\n assert.deepEqual(controller.get('foo'), [1, 2]);\n _this36.assertCurrentPath('/home');\n\n _this36.setAndFlush(controller, 'foo', (0, _emberRuntime.A)([1, 3]));\n _this36.assertCurrentPath('/home?foo=%5B1%2C3%5D');\n\n return _this36.transitionTo('/home').then(function () {\n assert.deepEqual(controller.get('foo'), [1, 2]);\n _this36.assertCurrentPath('/home');\n\n _this36.setAndFlush(controller, 'foo', null);\n _this36.assertCurrentPath('/home', 'Setting property to null');\n\n _this36.setAndFlush(controller, 'foo', (0, _emberRuntime.A)([1, 3]));\n _this36.assertCurrentPath('/home?foo=%5B1%2C3%5D');\n\n _this36.setAndFlush(controller, 'foo', undefined);\n _this36.assertCurrentPath('/home', 'Setting property to undefined');\n });\n });\n };\n\n _class.prototype['@test {{link-to}} with null or undefined QPs does not get serialized into url'] = function testLinkToWithNullOrUndefinedQPsDoesNotGetSerializedIntoUrl(assert) {\n var _this37 = this;\n\n assert.expect(3);\n\n this.addTemplate('home', '{{link-to \\'Home\\' \\'home\\' (query-params foo=nullValue) id=\\'null-link\\'}}{{link-to \\'Home\\' \\'home\\' (query-params foo=undefinedValue) id=\\'undefined-link\\'}}');\n\n this.router.map(function () {\n this.route('home');\n });\n\n this.setSingleQPController('home', 'foo', [], {\n nullValue: null,\n undefinedValue: undefined\n });\n\n return this.visitAndAssert('/home').then(function () {\n assert.equal(_this37.$('#null-link').attr('href'), '/home');\n assert.equal(_this37.$('#undefined-link').attr('href'), '/home');\n });\n };\n\n _class.prototype['@test A child of a resource route still defaults to parent route\\'s model even if the child route has a query param'] = function testAChildOfAResourceRouteStillDefaultsToParentRouteSModelEvenIfTheChildRouteHasAQueryParam(assert) {\n assert.expect(2);\n\n this.setSingleQPController('index', 'woot', undefined, {\n woot: undefined\n });\n\n this.add('route:application', _emberRouting.Route.extend({\n model: function (p, trans) {\n return { woot: true };\n }\n }));\n\n this.add('route:index', _emberRouting.Route.extend({\n setupController: function (controller, model) {\n assert.deepEqual(model, { woot: true }, 'index route inherited model route from parent route');\n }\n }));\n\n return this.visitAndAssert('/');\n };\n\n _class.prototype['@test opting into replace does not affect transitions between routes'] = function testOptingIntoReplaceDoesNotAffectTransitionsBetweenRoutes(assert) {\n var _this38 = this;\n\n assert.expect(5);\n\n this.addTemplate('application', '{{link-to \\'Foo\\' \\'foo\\' id=\\'foo-link\\'}}{{link-to \\'Bar\\' \\'bar\\' id=\\'bar-no-qp-link\\'}}{{link-to \\'Bar\\' \\'bar\\' (query-params raytiley=\\'isthebest\\') id=\\'bar-link\\'}}{{outlet}}');\n\n this.router.map(function () {\n this.route('foo');\n this.route('bar');\n });\n\n this.setSingleQPController('bar', 'raytiley', 'israd');\n\n this.add('route:bar', _emberRouting.Route.extend({\n queryParams: {\n raytiley: {\n replace: true\n }\n }\n }));\n\n return this.visit('/').then(function () {\n var controller = _this38.getController('bar');\n\n _this38.expectedPushURL = '/foo';\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#foo-link'), 'click');\n\n _this38.expectedPushURL = '/bar';\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#bar-no-qp-link'), 'click');\n\n _this38.expectedReplaceURL = '/bar?raytiley=woot';\n _this38.setAndFlush(controller, 'raytiley', 'woot');\n\n _this38.expectedPushURL = '/foo';\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#foo-link'), 'click');\n\n _this38.expectedPushURL = '/bar?raytiley=isthebest';\n (0, _emberMetal.run)((0, _emberViews.jQuery)('#bar-link'), 'click');\n });\n };\n\n _class.prototype['@test undefined isn\\'t serialized or deserialized into a string'] = function testUndefinedIsnTSerializedOrDeserializedIntoAString(assert) {\n var _this39 = this;\n\n assert.expect(4);\n\n this.router.map(function () {\n this.route('example');\n });\n\n this.addTemplate('application', '{{link-to \\'Example\\' \\'example\\' (query-params foo=undefined) id=\\'the-link\\'}}');\n\n this.setSingleQPController('example', 'foo', undefined, {\n foo: undefined\n });\n\n this.add('route:example', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { foo: undefined });\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(_this39.$('#the-link').attr('href'), '/example', 'renders without undefined qp serialized');\n\n return _this39.transitionTo('example', { queryParams: { foo: undefined } }).then(function () {\n _this39.assertCurrentPath('/example');\n });\n });\n };\n\n _class.prototype['@test when refreshModel is true and loading hook is undefined, model hook will rerun when QPs change even if previous did not finish'] = function testWhenRefreshModelIsTrueAndLoadingHookIsUndefinedModelHookWillRerunWhenQPsChangeEvenIfPreviousDidNotFinish(assert) {\n return this.refreshModelWhileLoadingTest();\n };\n\n _class.prototype['@test when refreshModel is true and loading hook returns false, model hook will rerun when QPs change even if previous did not finish'] = function testWhenRefreshModelIsTrueAndLoadingHookReturnsFalseModelHookWillRerunWhenQPsChangeEvenIfPreviousDidNotFinish(assert) {\n return this.refreshModelWhileLoadingTest(false);\n };\n\n _class.prototype['@test when refreshModel is true and loading hook returns true, model hook will rerun when QPs change even if previous did not finish'] = function testWhenRefreshModelIsTrueAndLoadingHookReturnsTrueModelHookWillRerunWhenQPsChangeEvenIfPreviousDidNotFinish(assert) {\n return this.refreshModelWhileLoadingTest(true);\n };\n\n _class.prototype['@test warn user that Route\\'s queryParams configuration must be an Object, not an Array'] = function testWarnUserThatRouteSQueryParamsConfigurationMustBeAnObjectNotAnArray(assert) {\n var _this40 = this;\n\n assert.expect(1);\n\n this.add('route:application', _emberRouting.Route.extend({\n queryParams: [{ commitBy: { replace: true } }]\n }));\n\n expectAssertion(function () {\n _this40.visit('/');\n }, 'You passed in `[{\"commitBy\":{\"replace\":true}}]` as the value for `queryParams` but `queryParams` cannot be an Array');\n };\n\n _class.prototype['@test handle route names that clash with Object.prototype properties'] = function testHandleRouteNamesThatClashWithObjectPrototypeProperties(assert) {\n var _this41 = this;\n\n assert.expect(1);\n\n this.router.map(function () {\n this.route('constructor');\n });\n\n this.add('route:constructor', _emberRouting.Route.extend({\n queryParams: {\n foo: {\n defaultValue: '123'\n }\n }\n }));\n\n return this.visit('/').then(function () {\n _this41.transitionTo('constructor', { queryParams: { foo: '999' } });\n var controller = _this41.getController('constructor');\n assert.equal((0, _emberMetal.get)(controller, 'foo'), '999');\n });\n };\n\n return _class;\n }(_internalTestHelpers.QueryParamTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/query_params_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/query_params_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test', ['ember-babel', 'ember-runtime', 'ember-routing', 'ember-metal', 'ember-views', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberRouting, _emberMetal, _emberViews, _internalTestHelpers) {\n 'use strict';\n\n var ModelDependentQPTestCase = function (_QueryParamTestCase) {\n (0, _emberBabel.inherits)(ModelDependentQPTestCase, _QueryParamTestCase);\n\n function ModelDependentQPTestCase() {\n (0, _emberBabel.classCallCheck)(this, ModelDependentQPTestCase);\n return (0, _emberBabel.possibleConstructorReturn)(this, _QueryParamTestCase.apply(this, arguments));\n }\n\n ModelDependentQPTestCase.prototype.boot = function boot() {\n this.setupApplication();\n return this.visitApplication();\n };\n\n ModelDependentQPTestCase.prototype.teardown = function teardown() {\n var _QueryParamTestCase$p;\n\n (_QueryParamTestCase$p = _QueryParamTestCase.prototype.teardown).call.apply(_QueryParamTestCase$p, [this].concat(Array.prototype.slice.call(arguments)));\n this.assert.ok(!this.expectedModelHookParams, 'there should be no pending expectation of expected model hook params');\n };\n\n ModelDependentQPTestCase.prototype.reopenController = function reopenController(name, options) {\n this.application.resolveRegistration('controller:' + name).reopen(options);\n };\n\n ModelDependentQPTestCase.prototype.reopenRoute = function reopenRoute(name, options) {\n this.application.resolveRegistration('route:' + name).reopen(options);\n };\n\n ModelDependentQPTestCase.prototype.queryParamsStickyTest1 = function queryParamsStickyTest1(urlPrefix) {\n var _this2 = this;\n\n var assert = this.assert;\n\n assert.expect(14);\n\n return this.boot().then(function () {\n (0, _emberMetal.run)(_this2.$link1, 'click');\n _this2.assertCurrentPath(urlPrefix + '/a-1');\n\n _this2.setAndFlush(_this2.controller, 'q', 'lol');\n\n assert.equal(_this2.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this2.$link2.attr('href'), urlPrefix + '/a-2');\n assert.equal(_this2.$link3.attr('href'), urlPrefix + '/a-3');\n\n (0, _emberMetal.run)(_this2.$link2, 'click');\n\n assert.equal(_this2.controller.get('q'), 'wat');\n assert.equal(_this2.controller.get('z'), 0);\n assert.deepEqual(_this2.controller.get('model'), { id: 'a-2' });\n assert.equal(_this2.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this2.$link2.attr('href'), urlPrefix + '/a-2');\n assert.equal(_this2.$link3.attr('href'), urlPrefix + '/a-3');\n });\n };\n\n ModelDependentQPTestCase.prototype.queryParamsStickyTest2 = function queryParamsStickyTest2(urlPrefix) {\n var _this3 = this;\n\n var assert = this.assert;\n\n assert.expect(24);\n\n return this.boot().then(function () {\n _this3.expectedModelHookParams = { id: 'a-1', q: 'lol', z: 0 };\n _this3.transitionTo(urlPrefix + '/a-1?q=lol');\n\n assert.deepEqual(_this3.controller.get('model'), { id: 'a-1' });\n assert.equal(_this3.controller.get('q'), 'lol');\n assert.equal(_this3.controller.get('z'), 0);\n assert.equal(_this3.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this3.$link2.attr('href'), urlPrefix + '/a-2');\n assert.equal(_this3.$link3.attr('href'), urlPrefix + '/a-3');\n\n _this3.expectedModelHookParams = { id: 'a-2', q: 'lol', z: 0 };\n _this3.transitionTo(urlPrefix + '/a-2?q=lol');\n\n assert.deepEqual(_this3.controller.get('model'), { id: 'a-2' }, 'controller\\'s model changed to a-2');\n assert.equal(_this3.controller.get('q'), 'lol');\n assert.equal(_this3.controller.get('z'), 0);\n assert.equal(_this3.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this3.$link2.attr('href'), urlPrefix + '/a-2?q=lol');\n assert.equal(_this3.$link3.attr('href'), urlPrefix + '/a-3');\n\n _this3.expectedModelHookParams = { id: 'a-3', q: 'lol', z: 123 };\n _this3.transitionTo(urlPrefix + '/a-3?q=lol&z=123');\n\n assert.equal(_this3.controller.get('q'), 'lol');\n assert.equal(_this3.controller.get('z'), 123);\n assert.equal(_this3.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this3.$link2.attr('href'), urlPrefix + '/a-2?q=lol');\n assert.equal(_this3.$link3.attr('href'), urlPrefix + '/a-3?q=lol&z=123');\n });\n };\n\n ModelDependentQPTestCase.prototype.queryParamsStickyTest3 = function queryParamsStickyTest3(urlPrefix, articleLookup) {\n var _this4 = this;\n\n var assert = this.assert;\n\n assert.expect(32);\n\n this.addTemplate('application', '{{#each articles as |a|}} {{link-to \\'Article\\' \\'' + articleLookup + '\\' a.id id=a.id}} {{/each}}');\n\n return this.boot().then(function () {\n _this4.expectedModelHookParams = { id: 'a-1', q: 'wat', z: 0 };\n _this4.transitionTo(articleLookup, 'a-1');\n\n assert.deepEqual(_this4.controller.get('model'), { id: 'a-1' });\n assert.equal(_this4.controller.get('q'), 'wat');\n assert.equal(_this4.controller.get('z'), 0);\n assert.equal(_this4.$link1.attr('href'), urlPrefix + '/a-1');\n assert.equal(_this4.$link2.attr('href'), urlPrefix + '/a-2');\n assert.equal(_this4.$link3.attr('href'), urlPrefix + '/a-3');\n\n _this4.expectedModelHookParams = { id: 'a-2', q: 'lol', z: 0 };\n _this4.transitionTo(articleLookup, 'a-2', { queryParams: { q: 'lol' } });\n\n assert.deepEqual(_this4.controller.get('model'), { id: 'a-2' });\n assert.equal(_this4.controller.get('q'), 'lol');\n assert.equal(_this4.controller.get('z'), 0);\n assert.equal(_this4.$link1.attr('href'), urlPrefix + '/a-1');\n assert.equal(_this4.$link2.attr('href'), urlPrefix + '/a-2?q=lol');\n assert.equal(_this4.$link3.attr('href'), urlPrefix + '/a-3');\n\n _this4.expectedModelHookParams = { id: 'a-3', q: 'hay', z: 0 };\n _this4.transitionTo(articleLookup, 'a-3', { queryParams: { q: 'hay' } });\n\n assert.deepEqual(_this4.controller.get('model'), { id: 'a-3' });\n assert.equal(_this4.controller.get('q'), 'hay');\n assert.equal(_this4.controller.get('z'), 0);\n assert.equal(_this4.$link1.attr('href'), urlPrefix + '/a-1');\n assert.equal(_this4.$link2.attr('href'), urlPrefix + '/a-2?q=lol');\n assert.equal(_this4.$link3.attr('href'), urlPrefix + '/a-3?q=hay');\n\n _this4.expectedModelHookParams = { id: 'a-2', q: 'lol', z: 1 };\n _this4.transitionTo(articleLookup, 'a-2', { queryParams: { z: 1 } });\n\n assert.deepEqual(_this4.controller.get('model'), { id: 'a-2' });\n assert.equal(_this4.controller.get('q'), 'lol');\n assert.equal(_this4.controller.get('z'), 1);\n assert.equal(_this4.$link1.attr('href'), urlPrefix + '/a-1');\n assert.equal(_this4.$link2.attr('href'), urlPrefix + '/a-2?q=lol&z=1');\n assert.equal(_this4.$link3.attr('href'), urlPrefix + '/a-3?q=hay');\n });\n };\n\n ModelDependentQPTestCase.prototype.queryParamsStickyTest4 = function queryParamsStickyTest4(urlPrefix, articleLookup) {\n var _this5 = this;\n\n var assert = this.assert;\n\n assert.expect(24);\n\n this.setupApplication();\n\n this.reopenController(articleLookup, {\n queryParams: { q: { scope: 'controller' } }\n });\n\n return this.visitApplication().then(function () {\n (0, _emberMetal.run)(_this5.$link1, 'click');\n _this5.assertCurrentPath(urlPrefix + '/a-1');\n\n _this5.setAndFlush(_this5.controller, 'q', 'lol');\n\n assert.equal(_this5.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this5.$link2.attr('href'), urlPrefix + '/a-2?q=lol');\n assert.equal(_this5.$link3.attr('href'), urlPrefix + '/a-3?q=lol');\n\n (0, _emberMetal.run)(_this5.$link2, 'click');\n\n assert.equal(_this5.controller.get('q'), 'lol');\n assert.equal(_this5.controller.get('z'), 0);\n assert.deepEqual(_this5.controller.get('model'), { id: 'a-2' });\n\n assert.equal(_this5.$link1.attr('href'), urlPrefix + '/a-1?q=lol');\n assert.equal(_this5.$link2.attr('href'), urlPrefix + '/a-2?q=lol');\n assert.equal(_this5.$link3.attr('href'), urlPrefix + '/a-3?q=lol');\n\n _this5.expectedModelHookParams = { id: 'a-3', q: 'haha', z: 123 };\n _this5.transitionTo(urlPrefix + '/a-3?q=haha&z=123');\n\n assert.deepEqual(_this5.controller.get('model'), { id: 'a-3' });\n assert.equal(_this5.controller.get('q'), 'haha');\n assert.equal(_this5.controller.get('z'), 123);\n\n assert.equal(_this5.$link1.attr('href'), urlPrefix + '/a-1?q=haha');\n assert.equal(_this5.$link2.attr('href'), urlPrefix + '/a-2?q=haha');\n assert.equal(_this5.$link3.attr('href'), urlPrefix + '/a-3?q=haha&z=123');\n\n _this5.setAndFlush(_this5.controller, 'q', 'woot');\n\n assert.equal(_this5.$link1.attr('href'), urlPrefix + '/a-1?q=woot');\n assert.equal(_this5.$link2.attr('href'), urlPrefix + '/a-2?q=woot');\n assert.equal(_this5.$link3.attr('href'), urlPrefix + '/a-3?q=woot&z=123');\n });\n };\n\n ModelDependentQPTestCase.prototype.queryParamsStickyTest5 = function queryParamsStickyTest5(urlPrefix, commentsLookupKey) {\n var _this6 = this;\n\n var assert = this.assert;\n\n assert.expect(12);\n\n return this.boot().then(function () {\n _this6.transitionTo(commentsLookupKey, 'a-1');\n\n var commentsCtrl = _this6.getController(commentsLookupKey);\n assert.equal(commentsCtrl.get('page'), 1);\n _this6.assertCurrentPath(urlPrefix + '/a-1/comments');\n\n _this6.setAndFlush(commentsCtrl, 'page', 2);\n _this6.assertCurrentPath(urlPrefix + '/a-1/comments?page=2');\n\n _this6.setAndFlush(commentsCtrl, 'page', 3);\n _this6.assertCurrentPath(urlPrefix + '/a-1/comments?page=3');\n\n _this6.transitionTo(commentsLookupKey, 'a-2');\n assert.equal(commentsCtrl.get('page'), 1);\n _this6.assertCurrentPath(urlPrefix + '/a-2/comments');\n\n _this6.transitionTo(commentsLookupKey, 'a-1');\n assert.equal(commentsCtrl.get('page'), 3);\n _this6.assertCurrentPath(urlPrefix + '/a-1/comments?page=3');\n });\n };\n\n ModelDependentQPTestCase.prototype.queryParamsStickyTest6 = function queryParamsStickyTest6(urlPrefix, articleLookup, commentsLookup) {\n var _this7 = this;\n\n var assert = this.assert;\n\n assert.expect(13);\n\n this.setupApplication();\n\n this.reopenRoute(articleLookup, {\n resetController: function (controller, isExiting) {\n this.controllerFor(commentsLookup).set('page', 1);\n if (isExiting) {\n controller.set('q', 'imdone');\n }\n }\n });\n\n this.addTemplate('about', '{{link-to \\'A\\' \\'' + commentsLookup + '\\' \\'a-1\\' id=\\'one\\'}} {{link-to \\'B\\' \\'' + commentsLookup + '\\' \\'a-2\\' id=\\'two\\'}}');\n\n return this.visitApplication().then(function () {\n _this7.transitionTo(commentsLookup, 'a-1');\n\n var commentsCtrl = _this7.getController(commentsLookup);\n assert.equal(commentsCtrl.get('page'), 1);\n _this7.assertCurrentPath(urlPrefix + '/a-1/comments');\n\n _this7.setAndFlush(commentsCtrl, 'page', 2);\n _this7.assertCurrentPath(urlPrefix + '/a-1/comments?page=2');\n\n _this7.transitionTo(commentsLookup, 'a-2');\n assert.equal(commentsCtrl.get('page'), 1);\n assert.equal(_this7.controller.get('q'), 'wat');\n\n _this7.transitionTo(commentsLookup, 'a-1');\n\n _this7.assertCurrentPath(urlPrefix + '/a-1/comments');\n assert.equal(commentsCtrl.get('page'), 1);\n\n _this7.transitionTo('about');\n assert.equal((0, _emberViews.jQuery)('#one').attr('href'), urlPrefix + '/a-1/comments?q=imdone');\n assert.equal((0, _emberViews.jQuery)('#two').attr('href'), urlPrefix + '/a-2/comments');\n });\n };\n\n return ModelDependentQPTestCase;\n }(_internalTestHelpers.QueryParamTestCase);\n\n (0, _internalTestHelpers.moduleFor)('Query Params - model-dependent state', function (_ModelDependentQPTest) {\n (0, _emberBabel.inherits)(_class, _ModelDependentQPTest);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ModelDependentQPTest.apply(this, arguments));\n }\n\n _class.prototype.setupApplication = function setupApplication() {\n this.router.map(function () {\n this.route('article', { path: '/a/:id' }, function () {\n this.route('comments', { resetNamespace: true });\n });\n this.route('about');\n });\n\n var articles = (0, _emberRuntime.A)([{ id: 'a-1' }, { id: 'a-2' }, { id: 'a-3' }]);\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n articles: articles\n }));\n\n var self = this;\n var assert = this.assert;\n this.add('route:article', _emberRouting.Route.extend({\n model: function (params) {\n if (self.expectedModelHookParams) {\n assert.deepEqual(params, self.expectedModelHookParams, 'the ArticleRoute model hook received the expected merged dynamic segment + query params hash');\n self.expectedModelHookParams = null;\n }\n return articles.findBy('id', params.id);\n }\n }));\n\n this.add('controller:article', _emberRuntime.Controller.extend({\n queryParams: ['q', 'z'],\n q: 'wat',\n z: 0\n }));\n\n this.add('controller:comments', _emberRuntime.Controller.extend({\n queryParams: 'page',\n page: 1\n }));\n\n this.addTemplate('application', '{{#each articles as |a|}} 1{{link-to \\'Article\\' \\'article\\' a id=a.id}} {{/each}} {{outlet}}');\n };\n\n _class.prototype.visitApplication = function visitApplication() {\n var _this9 = this;\n\n return this.visit('/').then(function () {\n var assert = _this9.assert;\n\n _this9.$link1 = (0, _emberViews.jQuery)('#a-1');\n _this9.$link2 = (0, _emberViews.jQuery)('#a-2');\n _this9.$link3 = (0, _emberViews.jQuery)('#a-3');\n\n assert.equal(_this9.$link1.attr('href'), '/a/a-1');\n assert.equal(_this9.$link2.attr('href'), '/a/a-2');\n assert.equal(_this9.$link3.attr('href'), '/a/a-3');\n\n _this9.controller = _this9.getController('article');\n });\n };\n\n _class.prototype['@test query params have \\'model\\' stickiness by default'] = function testQueryParamsHaveModelStickinessByDefault() {\n return this.queryParamsStickyTest1('/a');\n };\n\n _class.prototype['@test query params have \\'model\\' stickiness by default (url changes)'] = function testQueryParamsHaveModelStickinessByDefaultUrlChanges() {\n return this.queryParamsStickyTest2('/a');\n };\n\n _class.prototype['@test query params have \\'model\\' stickiness by default (params-based transitions)'] = function testQueryParamsHaveModelStickinessByDefaultParamsBasedTransitions() {\n return this.queryParamsStickyTest3('/a', 'article');\n };\n\n _class.prototype['@test \\'controller\\' stickiness shares QP state between models'] = function testControllerStickinessSharesQPStateBetweenModels() {\n return this.queryParamsStickyTest4('/a', 'article');\n };\n\n _class.prototype['@test \\'model\\' stickiness is scoped to current or first dynamic parent route'] = function testModelStickinessIsScopedToCurrentOrFirstDynamicParentRoute() {\n return this.queryParamsStickyTest5('/a', 'comments');\n };\n\n _class.prototype['@test can reset query params using the resetController hook'] = function testCanResetQueryParamsUsingTheResetControllerHook() {\n return this.queryParamsStickyTest6('/a', 'article', 'comments');\n };\n\n return _class;\n }(ModelDependentQPTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Query Params - model-dependent state (nested)', function (_ModelDependentQPTest2) {\n (0, _emberBabel.inherits)(_class2, _ModelDependentQPTest2);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ModelDependentQPTest2.apply(this, arguments));\n }\n\n _class2.prototype.setupApplication = function setupApplication() {\n this.router.map(function () {\n this.route('site', function () {\n this.route('article', { path: '/a/:id' }, function () {\n this.route('comments');\n });\n });\n this.route('about');\n });\n\n var site_articles = (0, _emberRuntime.A)([{ id: 'a-1' }, { id: 'a-2' }, { id: 'a-3' }]);\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n articles: site_articles\n }));\n\n var self = this;\n var assert = this.assert;\n this.add('route:site.article', _emberRouting.Route.extend({\n model: function (params) {\n if (self.expectedModelHookParams) {\n assert.deepEqual(params, self.expectedModelHookParams, 'the ArticleRoute model hook received the expected merged dynamic segment + query params hash');\n self.expectedModelHookParams = null;\n }\n return site_articles.findBy('id', params.id);\n }\n }));\n\n this.add('controller:site.article', _emberRuntime.Controller.extend({\n queryParams: ['q', 'z'],\n q: 'wat',\n z: 0\n }));\n\n this.add('controller:site.article.comments', _emberRuntime.Controller.extend({\n queryParams: 'page',\n page: 1\n }));\n\n this.addTemplate('application', '{{#each articles as |a|}} {{link-to \\'Article\\' \\'site.article\\' a id=a.id}} {{/each}} {{outlet}}');\n };\n\n _class2.prototype.visitApplication = function visitApplication() {\n var _this11 = this;\n\n return this.visit('/').then(function () {\n var assert = _this11.assert;\n\n _this11.$link1 = (0, _emberViews.jQuery)('#a-1');\n _this11.$link2 = (0, _emberViews.jQuery)('#a-2');\n _this11.$link3 = (0, _emberViews.jQuery)('#a-3');\n\n assert.equal(_this11.$link1.attr('href'), '/site/a/a-1');\n assert.equal(_this11.$link2.attr('href'), '/site/a/a-2');\n assert.equal(_this11.$link3.attr('href'), '/site/a/a-3');\n\n _this11.controller = _this11.getController('site.article');\n });\n };\n\n _class2.prototype['@test query params have \\'model\\' stickiness by default'] = function testQueryParamsHaveModelStickinessByDefault() {\n return this.queryParamsStickyTest1('/site/a');\n };\n\n _class2.prototype['@test query params have \\'model\\' stickiness by default (url changes)'] = function testQueryParamsHaveModelStickinessByDefaultUrlChanges() {\n return this.queryParamsStickyTest2('/site/a');\n };\n\n _class2.prototype['@test query params have \\'model\\' stickiness by default (params-based transitions)'] = function testQueryParamsHaveModelStickinessByDefaultParamsBasedTransitions() {\n return this.queryParamsStickyTest3('/site/a', 'site.article');\n };\n\n _class2.prototype['@test \\'controller\\' stickiness shares QP state between models'] = function testControllerStickinessSharesQPStateBetweenModels() {\n return this.queryParamsStickyTest4('/site/a', 'site.article');\n };\n\n _class2.prototype['@test \\'model\\' stickiness is scoped to current or first dynamic parent route'] = function testModelStickinessIsScopedToCurrentOrFirstDynamicParentRoute() {\n return this.queryParamsStickyTest5('/site/a', 'site.article.comments');\n };\n\n _class2.prototype['@test can reset query params using the resetController hook'] = function testCanResetQueryParamsUsingTheResetControllerHook() {\n return this.queryParamsStickyTest6('/site/a', 'site.article', 'site.article.comments');\n };\n\n return _class2;\n }(ModelDependentQPTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Query Params - model-dependent state (nested & more than 1 dynamic segment)', function (_ModelDependentQPTest3) {\n (0, _emberBabel.inherits)(_class3, _ModelDependentQPTest3);\n\n function _class3() {\n (0, _emberBabel.classCallCheck)(this, _class3);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ModelDependentQPTest3.apply(this, arguments));\n }\n\n _class3.prototype.setupApplication = function setupApplication() {\n this.router.map(function () {\n this.route('site', { path: '/site/:site_id' }, function () {\n this.route('article', { path: '/a/:article_id' }, function () {\n this.route('comments');\n });\n });\n });\n\n var sites = (0, _emberRuntime.A)([{ id: 's-1' }, { id: 's-2' }, { id: 's-3' }]);\n var site_articles = (0, _emberRuntime.A)([{ id: 'a-1' }, { id: 'a-2' }, { id: 'a-3' }]);\n\n this.add('controller:application', _emberRuntime.Controller.extend({\n siteArticles: site_articles,\n sites: sites,\n allSitesAllArticles: (0, _emberMetal.computed)({\n get: function () {\n var ret = [];\n var siteArticles = this.siteArticles;\n var sites = this.sites;\n sites.forEach(function (site) {\n ret = ret.concat(siteArticles.map(function (article) {\n return { id: site.id + '-' + article.id, site_id: site.id, article_id: article.id };\n }));\n });\n return ret;\n }\n })\n }));\n\n var self = this;\n var assert = this.assert;\n this.add('route:site', _emberRouting.Route.extend({\n model: function (params) {\n if (self.expectedSiteModelHookParams) {\n assert.deepEqual(params, self.expectedSiteModelHookParams, 'the SiteRoute model hook received the expected merged dynamic segment + query params hash');\n self.expectedSiteModelHookParams = null;\n }\n return sites.findBy('id', params.site_id);\n }\n }));\n\n this.add('route:site.article', _emberRouting.Route.extend({\n model: function (params) {\n if (self.expectedArticleModelHookParams) {\n assert.deepEqual(params, self.expectedArticleModelHookParams, 'the SiteArticleRoute model hook received the expected merged dynamic segment + query params hash');\n self.expectedArticleModelHookParams = null;\n }\n return site_articles.findBy('id', params.article_id);\n }\n }));\n\n this.add('controller:site', _emberRuntime.Controller.extend({\n queryParams: ['country'],\n country: 'au'\n }));\n\n this.add('controller:site.article', _emberRuntime.Controller.extend({\n queryParams: ['q', 'z'],\n q: 'wat',\n z: 0\n }));\n\n this.add('controller:site.article.comments', _emberRuntime.Controller.extend({\n queryParams: ['page'],\n page: 1\n }));\n\n this.addTemplate('application', '{{#each allSitesAllArticles as |a|}} {{#link-to \\'site.article\\' a.site_id a.article_id id=a.id}}Article [{{a.site_id}}] [{{a.article_id}}]{{/link-to}} {{/each}} {{outlet}}');\n };\n\n _class3.prototype.visitApplication = function visitApplication() {\n var _this13 = this;\n\n return this.visit('/').then(function () {\n var assert = _this13.assert;\n\n _this13.links = {};\n _this13.links['s-1-a-1'] = (0, _emberViews.jQuery)('#s-1-a-1');\n _this13.links['s-1-a-2'] = (0, _emberViews.jQuery)('#s-1-a-2');\n _this13.links['s-1-a-3'] = (0, _emberViews.jQuery)('#s-1-a-3');\n _this13.links['s-2-a-1'] = (0, _emberViews.jQuery)('#s-2-a-1');\n _this13.links['s-2-a-2'] = (0, _emberViews.jQuery)('#s-2-a-2');\n _this13.links['s-2-a-3'] = (0, _emberViews.jQuery)('#s-2-a-3');\n _this13.links['s-3-a-1'] = (0, _emberViews.jQuery)('#s-3-a-1');\n _this13.links['s-3-a-2'] = (0, _emberViews.jQuery)('#s-3-a-2');\n _this13.links['s-3-a-3'] = (0, _emberViews.jQuery)('#s-3-a-3');\n\n assert.equal(_this13.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1');\n assert.equal(_this13.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2');\n assert.equal(_this13.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this13.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1');\n assert.equal(_this13.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this13.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this13.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1');\n assert.equal(_this13.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this13.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this13.site_controller = _this13.getController('site');\n _this13.article_controller = _this13.getController('site.article');\n });\n };\n\n _class3.prototype['@test query params have \\'model\\' stickiness by default'] = function testQueryParamsHaveModelStickinessByDefault(assert) {\n var _this14 = this;\n\n assert.expect(59);\n\n return this.boot().then(function () {\n (0, _emberMetal.run)(_this14.links['s-1-a-1'], 'click');\n assert.deepEqual(_this14.site_controller.get('model'), { id: 's-1' });\n assert.deepEqual(_this14.article_controller.get('model'), { id: 'a-1' });\n _this14.assertCurrentPath('/site/s-1/a/a-1');\n\n _this14.setAndFlush(_this14.article_controller, 'q', 'lol');\n\n assert.equal(_this14.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=lol');\n assert.equal(_this14.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2');\n assert.equal(_this14.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this14.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?q=lol');\n assert.equal(_this14.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this14.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this14.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this14.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this14.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this14.setAndFlush(_this14.site_controller, 'country', 'us');\n\n assert.equal(_this14.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?country=us&q=lol');\n assert.equal(_this14.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?country=us');\n assert.equal(_this14.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?country=us');\n assert.equal(_this14.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?q=lol');\n assert.equal(_this14.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this14.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this14.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this14.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this14.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n (0, _emberMetal.run)(_this14.links['s-1-a-2'], 'click');\n\n assert.equal(_this14.site_controller.get('country'), 'us');\n assert.equal(_this14.article_controller.get('q'), 'wat');\n assert.equal(_this14.article_controller.get('z'), 0);\n assert.deepEqual(_this14.site_controller.get('model'), { id: 's-1' });\n assert.deepEqual(_this14.article_controller.get('model'), { id: 'a-2' });\n assert.equal(_this14.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?country=us&q=lol');\n assert.equal(_this14.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?country=us');\n assert.equal(_this14.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?country=us');\n assert.equal(_this14.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?q=lol');\n assert.equal(_this14.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this14.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this14.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this14.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this14.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n (0, _emberMetal.run)(_this14.links['s-2-a-2'], 'click');\n\n assert.equal(_this14.site_controller.get('country'), 'au');\n assert.equal(_this14.article_controller.get('q'), 'wat');\n assert.equal(_this14.article_controller.get('z'), 0);\n assert.deepEqual(_this14.site_controller.get('model'), { id: 's-2' });\n assert.deepEqual(_this14.article_controller.get('model'), { id: 'a-2' });\n assert.equal(_this14.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?country=us&q=lol');\n assert.equal(_this14.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?country=us');\n assert.equal(_this14.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?country=us');\n assert.equal(_this14.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?q=lol');\n assert.equal(_this14.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this14.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this14.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this14.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this14.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n });\n };\n\n _class3.prototype['@test query params have \\'model\\' stickiness by default (url changes)'] = function testQueryParamsHaveModelStickinessByDefaultUrlChanges(assert) {\n var _this15 = this;\n\n assert.expect(88);\n\n return this.boot().then(function () {\n _this15.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };\n _this15.expectedArticleModelHookParams = { article_id: 'a-1', q: 'lol', z: 0 };\n _this15.transitionTo('/site/s-1/a/a-1?q=lol');\n\n assert.deepEqual(_this15.site_controller.get('model'), { id: 's-1' }, 'site controller\\'s model is s-1');\n assert.deepEqual(_this15.article_controller.get('model'), { id: 'a-1' }, 'article controller\\'s model is a-1');\n assert.equal(_this15.site_controller.get('country'), 'au');\n assert.equal(_this15.article_controller.get('q'), 'lol');\n assert.equal(_this15.article_controller.get('z'), 0);\n assert.equal(_this15.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=lol');\n assert.equal(_this15.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2');\n assert.equal(_this15.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this15.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?q=lol');\n assert.equal(_this15.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this15.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this15.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this15.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this15.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this15.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };\n _this15.expectedArticleModelHookParams = { article_id: 'a-1', q: 'lol', z: 0 };\n _this15.transitionTo('/site/s-2/a/a-1?country=us&q=lol');\n\n assert.deepEqual(_this15.site_controller.get('model'), { id: 's-2' }, 'site controller\\'s model is s-2');\n assert.deepEqual(_this15.article_controller.get('model'), { id: 'a-1' }, 'article controller\\'s model is a-1');\n assert.equal(_this15.site_controller.get('country'), 'us');\n assert.equal(_this15.article_controller.get('q'), 'lol');\n assert.equal(_this15.article_controller.get('z'), 0);\n assert.equal(_this15.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=lol');\n assert.equal(_this15.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2');\n assert.equal(_this15.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this15.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us');\n assert.equal(_this15.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us');\n assert.equal(_this15.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this15.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this15.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this15.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };\n _this15.expectedArticleModelHookParams = { article_id: 'a-2', q: 'lol', z: 0 };\n _this15.transitionTo('/site/s-2/a/a-2?country=us&q=lol');\n\n assert.deepEqual(_this15.site_controller.get('model'), { id: 's-2' }, 'site controller\\'s model is s-2');\n assert.deepEqual(_this15.article_controller.get('model'), { id: 'a-2' }, 'article controller\\'s model is a-2');\n assert.equal(_this15.site_controller.get('country'), 'us');\n assert.equal(_this15.article_controller.get('q'), 'lol');\n assert.equal(_this15.article_controller.get('z'), 0);\n assert.equal(_this15.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=lol');\n assert.equal(_this15.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol');\n assert.equal(_this15.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this15.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us');\n assert.equal(_this15.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this15.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol');\n assert.equal(_this15.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this15.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };\n _this15.expectedArticleModelHookParams = { article_id: 'a-3', q: 'lol', z: 123 };\n _this15.transitionTo('/site/s-2/a/a-3?country=us&q=lol&z=123');\n\n assert.deepEqual(_this15.site_controller.get('model'), { id: 's-2' }, 'site controller\\'s model is s-2');\n assert.deepEqual(_this15.article_controller.get('model'), { id: 'a-3' }, 'article controller\\'s model is a-3');\n assert.equal(_this15.site_controller.get('country'), 'us');\n assert.equal(_this15.article_controller.get('q'), 'lol');\n assert.equal(_this15.article_controller.get('z'), 123);\n assert.equal(_this15.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=lol');\n assert.equal(_this15.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol');\n assert.equal(_this15.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=lol&z=123');\n assert.equal(_this15.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us&q=lol&z=123');\n assert.equal(_this15.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=lol');\n assert.equal(_this15.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol');\n assert.equal(_this15.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?q=lol&z=123');\n\n _this15.expectedSiteModelHookParams = { site_id: 's-3', country: 'nz' };\n _this15.expectedArticleModelHookParams = { article_id: 'a-3', q: 'lol', z: 123 };\n _this15.transitionTo('/site/s-3/a/a-3?country=nz&q=lol&z=123');\n\n assert.deepEqual(_this15.site_controller.get('model'), { id: 's-3' }, 'site controller\\'s model is s-3');\n assert.deepEqual(_this15.article_controller.get('model'), { id: 'a-3' }, 'article controller\\'s model is a-3');\n assert.equal(_this15.site_controller.get('country'), 'nz');\n assert.equal(_this15.article_controller.get('q'), 'lol');\n assert.equal(_this15.article_controller.get('z'), 123);\n assert.equal(_this15.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=lol');\n assert.equal(_this15.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol');\n assert.equal(_this15.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=lol&z=123');\n assert.equal(_this15.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us&q=lol');\n assert.equal(_this15.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us&q=lol&z=123');\n assert.equal(_this15.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?country=nz&q=lol');\n assert.equal(_this15.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?country=nz&q=lol');\n assert.equal(_this15.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?country=nz&q=lol&z=123');\n });\n };\n\n _class3.prototype['@test query params have \\'model\\' stickiness by default (params-based transitions)'] = function testQueryParamsHaveModelStickinessByDefaultParamsBasedTransitions(assert) {\n var _this16 = this;\n\n assert.expect(118);\n\n return this.boot().then(function () {\n _this16.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-1', q: 'wat', z: 0 };\n _this16.transitionTo('site.article', 's-1', 'a-1');\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-1' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-1' });\n assert.equal(_this16.site_controller.get('country'), 'au');\n assert.equal(_this16.article_controller.get('q'), 'wat');\n assert.equal(_this16.article_controller.get('z'), 0);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this16.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-2', q: 'lol', z: 0 };\n _this16.transitionTo('site.article', 's-1', 'a-2', { queryParams: { q: 'lol' } });\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-1' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-2' });\n assert.equal(_this16.site_controller.get('country'), 'au');\n assert.equal(_this16.article_controller.get('q'), 'lol');\n assert.equal(_this16.article_controller.get('z'), 0);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?q=lol');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3');\n\n _this16.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-3', q: 'hay', z: 0 };\n _this16.transitionTo('site.article', 's-1', 'a-3', { queryParams: { q: 'hay' } });\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-1' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-3' });\n assert.equal(_this16.site_controller.get('country'), 'au');\n assert.equal(_this16.article_controller.get('q'), 'hay');\n assert.equal(_this16.article_controller.get('z'), 0);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=hay');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?q=lol');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?q=hay');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?q=hay');\n\n _this16.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-2', q: 'lol', z: 1 };\n _this16.transitionTo('site.article', 's-1', 'a-2', { queryParams: { z: 1 } });\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-1' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-2' });\n assert.equal(_this16.site_controller.get('country'), 'au');\n assert.equal(_this16.article_controller.get('q'), 'lol');\n assert.equal(_this16.article_controller.get('z'), 1);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=hay');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?q=hay');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?q=hay');\n\n _this16.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-2', q: 'lol', z: 1 };\n _this16.transitionTo('site.article', 's-2', 'a-2', { queryParams: { country: 'us' } });\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-2' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-2' });\n assert.equal(_this16.site_controller.get('country'), 'us');\n assert.equal(_this16.article_controller.get('q'), 'lol');\n assert.equal(_this16.article_controller.get('z'), 1);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=hay');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us&q=lol&z=1');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us&q=hay');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?q=hay');\n\n _this16.expectedSiteModelHookParams = { site_id: 's-2', country: 'us' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-1', q: 'yeah', z: 0 };\n _this16.transitionTo('site.article', 's-2', 'a-1', { queryParams: { q: 'yeah' } });\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-2' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-1' });\n assert.equal(_this16.site_controller.get('country'), 'us');\n assert.equal(_this16.article_controller.get('q'), 'yeah');\n assert.equal(_this16.article_controller.get('z'), 0);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=yeah');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=hay');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us&q=yeah');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us&q=lol&z=1');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us&q=hay');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?q=yeah');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?q=hay');\n\n _this16.expectedSiteModelHookParams = { site_id: 's-3', country: 'nz' };\n _this16.expectedArticleModelHookParams = { article_id: 'a-3', q: 'hay', z: 3 };\n _this16.transitionTo('site.article', 's-3', 'a-3', { queryParams: { country: 'nz', z: 3 } });\n\n assert.deepEqual(_this16.site_controller.get('model'), { id: 's-3' });\n assert.deepEqual(_this16.article_controller.get('model'), { id: 'a-3' });\n assert.equal(_this16.site_controller.get('country'), 'nz');\n assert.equal(_this16.article_controller.get('q'), 'hay');\n assert.equal(_this16.article_controller.get('z'), 3);\n assert.equal(_this16.links['s-1-a-1'].attr('href'), '/site/s-1/a/a-1?q=yeah');\n assert.equal(_this16.links['s-1-a-2'].attr('href'), '/site/s-1/a/a-2?q=lol&z=1');\n assert.equal(_this16.links['s-1-a-3'].attr('href'), '/site/s-1/a/a-3?q=hay&z=3');\n assert.equal(_this16.links['s-2-a-1'].attr('href'), '/site/s-2/a/a-1?country=us&q=yeah');\n assert.equal(_this16.links['s-2-a-2'].attr('href'), '/site/s-2/a/a-2?country=us&q=lol&z=1');\n assert.equal(_this16.links['s-2-a-3'].attr('href'), '/site/s-2/a/a-3?country=us&q=hay&z=3');\n assert.equal(_this16.links['s-3-a-1'].attr('href'), '/site/s-3/a/a-1?country=nz&q=yeah');\n assert.equal(_this16.links['s-3-a-2'].attr('href'), '/site/s-3/a/a-2?country=nz&q=lol&z=1');\n assert.equal(_this16.links['s-3-a-3'].attr('href'), '/site/s-3/a/a-3?country=nz&q=hay&z=3');\n });\n };\n\n return _class3;\n }(ModelDependentQPTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/query_params_test/overlapping_query_params_test', ['ember-babel', 'ember-runtime', 'ember-routing', 'ember-metal', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberRouting, _emberMetal, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Query Params - overlapping query param property names', function (_QueryParamTestCase) {\n (0, _emberBabel.inherits)(_class, _QueryParamTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _QueryParamTestCase.apply(this, arguments));\n }\n\n _class.prototype.setupBase = function setupBase() {\n this.router.map(function () {\n this.route('parent', function () {\n this.route('child');\n });\n });\n\n return this.visit('/parent/child');\n };\n\n _class.prototype['@test can remap same-named qp props'] = function testCanRemapSameNamedQpProps(assert) {\n var _this2 = this;\n\n assert.expect(7);\n\n this.setMappedQPController('parent');\n this.setMappedQPController('parent.child', 'page', 'childPage');\n\n return this.setupBase().then(function () {\n _this2.assertCurrentPath('/parent/child');\n\n var parentController = _this2.getController('parent');\n var parentChildController = _this2.getController('parent.child');\n\n _this2.setAndFlush(parentController, 'page', 2);\n _this2.assertCurrentPath('/parent/child?parentPage=2');\n _this2.setAndFlush(parentController, 'page', 1);\n _this2.assertCurrentPath('/parent/child');\n\n _this2.setAndFlush(parentChildController, 'page', 2);\n _this2.assertCurrentPath('/parent/child?childPage=2');\n _this2.setAndFlush(parentChildController, 'page', 1);\n _this2.assertCurrentPath('/parent/child');\n\n (0, _emberMetal.run)(function () {\n parentController.set('page', 2);\n parentChildController.set('page', 2);\n });\n\n _this2.assertCurrentPath('/parent/child?childPage=2&parentPage=2');\n\n (0, _emberMetal.run)(function () {\n parentController.set('page', 1);\n parentChildController.set('page', 1);\n });\n\n _this2.assertCurrentPath('/parent/child');\n });\n };\n\n _class.prototype['@test query params can be either controller property or url key'] = function testQueryParamsCanBeEitherControllerPropertyOrUrlKey(assert) {\n var _this3 = this;\n\n assert.expect(3);\n\n this.setMappedQPController('parent');\n\n return this.setupBase().then(function () {\n _this3.assertCurrentPath('/parent/child');\n\n _this3.transitionTo('parent.child', { queryParams: { page: 2 } });\n _this3.assertCurrentPath('/parent/child?parentPage=2');\n\n _this3.transitionTo('parent.child', { queryParams: { parentPage: 3 } });\n _this3.assertCurrentPath('/parent/child?parentPage=3');\n });\n };\n\n _class.prototype['@test query param matching a url key and controller property'] = function testQueryParamMatchingAUrlKeyAndControllerProperty(assert) {\n var _this4 = this;\n\n assert.expect(3);\n\n this.setMappedQPController('parent', 'page', 'parentPage');\n this.setMappedQPController('parent.child', 'index', 'page');\n\n return this.setupBase().then(function () {\n _this4.transitionTo('parent.child', { queryParams: { page: 2 } });\n _this4.assertCurrentPath('/parent/child?parentPage=2');\n\n _this4.transitionTo('parent.child', { queryParams: { parentPage: 3 } });\n _this4.assertCurrentPath('/parent/child?parentPage=3');\n\n _this4.transitionTo('parent.child', { queryParams: { index: 2, page: 2 } });\n _this4.assertCurrentPath('/parent/child?page=2&parentPage=2');\n });\n };\n\n _class.prototype['@test query param matching same property on two controllers use the urlKey higher in the chain'] = function testQueryParamMatchingSamePropertyOnTwoControllersUseTheUrlKeyHigherInTheChain(assert) {\n var _this5 = this;\n\n assert.expect(4);\n\n this.setMappedQPController('parent', 'page', 'parentPage');\n this.setMappedQPController('parent.child', 'page', 'childPage');\n\n return this.setupBase().then(function () {\n _this5.transitionTo('parent.child', { queryParams: { page: 2 } });\n _this5.assertCurrentPath('/parent/child?parentPage=2');\n\n _this5.transitionTo('parent.child', { queryParams: { parentPage: 3 } });\n _this5.assertCurrentPath('/parent/child?parentPage=3');\n\n _this5.transitionTo('parent.child', { queryParams: { childPage: 2, page: 2 } });\n _this5.assertCurrentPath('/parent/child?childPage=2&parentPage=2');\n\n _this5.transitionTo('parent.child', { queryParams: { childPage: 3, parentPage: 4 } });\n _this5.assertCurrentPath('/parent/child?childPage=3&parentPage=4');\n });\n };\n\n _class.prototype['@test query params does not error when a query parameter exists for route instances that share a controller'] = function testQueryParamsDoesNotErrorWhenAQueryParameterExistsForRouteInstancesThatShareAController(assert) {\n var _this6 = this;\n\n assert.expect(1);\n\n var parentController = _emberRuntime.Controller.extend({\n queryParams: { page: 'page' }\n });\n this.add('controller:parent', parentController);\n this.add('route:parent.child', _emberRouting.Route.extend({ controllerName: 'parent' }));\n\n return this.setupBase('/parent').then(function () {\n _this6.transitionTo('parent.child', { queryParams: { page: 2 } });\n _this6.assertCurrentPath('/parent/child?page=2');\n });\n };\n\n _class.prototype['@test query params in the same route hierarchy with the same url key get auto-scoped'] = function testQueryParamsInTheSameRouteHierarchyWithTheSameUrlKeyGetAutoScoped(assert) {\n var _this7 = this;\n\n assert.expect(1);\n\n this.setMappedQPController('parent');\n this.setMappedQPController('parent.child');\n\n expectAssertion(function () {\n _this7.setupBase();\n }, 'You\\'re not allowed to have more than one controller property map to the same query param key, but both `parent:page` and `parent.child:page` map to `parentPage`. You can fix this by mapping one of the controller properties to a different query param key via the `as` config option, e.g. `page: { as: \\'other-page\\' }`');\n };\n\n _class.prototype['@test Support shared but overridable mixin pattern'] = function testSupportSharedButOverridableMixinPattern(assert) {\n var _this8 = this;\n\n assert.expect(7);\n\n var HasPage = _emberMetal.Mixin.create({\n queryParams: 'page',\n page: 1\n });\n\n this.add('controller:parent', _emberRuntime.Controller.extend(HasPage, {\n queryParams: { page: 'yespage' }\n }));\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend(HasPage));\n\n return this.setupBase().then(function () {\n _this8.assertCurrentPath('/parent/child');\n\n var parentController = _this8.getController('parent');\n var parentChildController = _this8.getController('parent.child');\n\n _this8.setAndFlush(parentChildController, 'page', 2);\n _this8.assertCurrentPath('/parent/child?page=2');\n assert.equal(parentController.get('page'), 1);\n assert.equal(parentChildController.get('page'), 2);\n\n _this8.setAndFlush(parentController, 'page', 2);\n _this8.assertCurrentPath('/parent/child?page=2&yespage=2');\n assert.equal(parentController.get('page'), 2);\n assert.equal(parentChildController.get('page'), 2);\n });\n };\n\n return _class;\n }(_internalTestHelpers.QueryParamTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/query_params_test/overlapping_query_params_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/query_params_test/overlapping_query_params_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/query_params_test/query_param_async_get_handler_test', ['ember-babel', 'ember-metal', 'ember-runtime', 'ember-routing', 'internal-test-helpers'], function (_emberBabel, _emberMetal, _emberRuntime, _emberRouting, _internalTestHelpers) {\n 'use strict';\n\n // These tests mimic what happens with lazily loaded Engines.\n (0, _internalTestHelpers.moduleFor)('Query Params - async get handler', function (_QueryParamTestCase) {\n (0, _emberBabel.inherits)(_class, _QueryParamTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _QueryParamTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test can render a link to an asynchronously loaded route without fetching the route'] = function testCanRenderALinkToAnAsynchronouslyLoadedRouteWithoutFetchingTheRoute(assert) {\n var _this2 = this;\n\n assert.expect(4);\n\n this.router.map(function () {\n this.route('post', { path: '/post/:id' });\n });\n\n this.setSingleQPController('post');\n\n var setupAppTemplate = function () {\n _this2.addTemplate('application', '\\n {{link-to \\'Post\\' \\'post\\' 1337 (query-params foo=\\'bar\\') class=\\'post-link\\'}}\\n {{link-to \\'Post\\' \\'post\\' 7331 (query-params foo=\\'boo\\') class=\\'post-link\\'}}\\n {{outlet}}\\n ');\n };\n\n setupAppTemplate();\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(_this2.$('.post-link').eq(0).attr('href'), '/post/1337?foo=bar', 'renders correctly with default QP value');\n assert.equal(_this2.$('.post-link').eq(1).attr('href'), '/post/7331?foo=boo', 'renders correctly with non-default QP value');\n assert.deepEqual(_this2.fetchedHandlers, ['application', 'index'], 'only fetched the handlers for the route we\\'re on');\n });\n };\n\n _class.prototype['@test can transitionTo to an asynchronously loaded route with simple query params'] = function testCanTransitionToToAnAsynchronouslyLoadedRouteWithSimpleQueryParams(assert) {\n var _this3 = this;\n\n assert.expect(6);\n\n this.router.map(function () {\n this.route('post', { path: '/post/:id' });\n this.route('posts');\n });\n\n this.setSingleQPController('post');\n\n var postController = void 0;\n return this.visitAndAssert('/').then(function () {\n postController = _this3.getController('post');\n\n return _this3.transitionTo('posts').then(function () {\n _this3.assertCurrentPath('/posts');\n });\n }).then(function () {\n return _this3.transitionTo('post', 1337, { queryParams: { foo: 'boo' } }).then(function () {\n assert.equal(postController.get('foo'), 'boo', 'simple QP is correctly set on controller');\n _this3.assertCurrentPath('/post/1337?foo=boo');\n });\n }).then(function () {\n return _this3.transitionTo('post', 1337, { queryParams: { foo: 'bar' } }).then(function () {\n assert.equal(postController.get('foo'), 'bar', 'simple QP is correctly set with default value');\n _this3.assertCurrentPath('/post/1337');\n });\n });\n };\n\n _class.prototype['@test can transitionTo to an asynchronously loaded route with array query params'] = function testCanTransitionToToAnAsynchronouslyLoadedRouteWithArrayQueryParams(assert) {\n var _this4 = this;\n\n assert.expect(5);\n\n this.router.map(function () {\n this.route('post', { path: '/post/:id' });\n });\n\n this.setSingleQPController('post', 'comments', []);\n\n var postController = void 0;\n return this.visitAndAssert('/').then(function () {\n postController = _this4.getController('post');\n return _this4.transitionTo('post', 1337, { queryParams: { comments: [1, 2] } }).then(function () {\n assert.deepEqual(postController.get('comments'), [1, 2], 'array QP is correctly set with default value');\n _this4.assertCurrentPath('/post/1337?comments=%5B1%2C2%5D');\n });\n }).then(function () {\n return _this4.transitionTo('post', 1338).then(function () {\n assert.deepEqual(postController.get('comments'), [], 'array QP is correctly set on controller');\n _this4.assertCurrentPath('/post/1338');\n });\n });\n };\n\n _class.prototype['@test can transitionTo to an asynchronously loaded route with mapped query params'] = function testCanTransitionToToAnAsynchronouslyLoadedRouteWithMappedQueryParams(assert) {\n var _this5 = this;\n\n assert.expect(7);\n\n this.router.map(function () {\n this.route('post', { path: '/post/:id' }, function () {\n this.route('index', { path: '/' });\n });\n });\n\n this.setSingleQPController('post');\n this.setMappedQPController('post.index', 'comment', 'note');\n\n var postController = void 0;\n var postIndexController = void 0;\n\n return this.visitAndAssert('/').then(function () {\n postController = _this5.getController('post');\n postIndexController = _this5.getController('post.index');\n\n return _this5.transitionTo('post.index', 1337, { queryParams: { note: 6, foo: 'boo' } }).then(function () {\n assert.equal(postController.get('foo'), 'boo', 'simple QP is correctly set on controller');\n assert.equal(postIndexController.get('comment'), 6, 'mapped QP is correctly set on controller');\n _this5.assertCurrentPath('/post/1337?foo=boo¬e=6');\n });\n }).then(function () {\n return _this5.transitionTo('post', 1337, { queryParams: { foo: 'bar' } }).then(function () {\n assert.equal(postController.get('foo'), 'bar', 'simple QP is correctly set with default value');\n assert.equal(postIndexController.get('comment'), 6, 'mapped QP retains value scoped to model');\n _this5.assertCurrentPath('/post/1337?note=6');\n });\n });\n };\n\n _class.prototype['@test can transitionTo with a URL'] = function testCanTransitionToWithAURL(assert) {\n var _this6 = this;\n\n assert.expect(7);\n\n this.router.map(function () {\n this.route('post', { path: '/post/:id' }, function () {\n this.route('index', { path: '/' });\n });\n });\n\n this.setSingleQPController('post');\n this.setMappedQPController('post.index', 'comment', 'note');\n\n var postController = void 0;\n var postIndexController = void 0;\n\n return this.visitAndAssert('/').then(function () {\n postController = _this6.getController('post');\n postIndexController = _this6.getController('post.index');\n\n return _this6.transitionTo('/post/1337?foo=boo¬e=6').then(function () {\n assert.equal(postController.get('foo'), 'boo', 'simple QP is correctly deserialized on controller');\n assert.equal(postIndexController.get('comment'), 6, 'mapped QP is correctly deserialized on controller');\n _this6.assertCurrentPath('/post/1337?foo=boo¬e=6');\n });\n }).then(function () {\n return _this6.transitionTo('/post/1337?note=6').then(function () {\n assert.equal(postController.get('foo'), 'bar', 'simple QP is correctly deserialized with default value');\n assert.equal(postIndexController.get('comment'), 6, 'mapped QP retains value scoped to model');\n _this6.assertCurrentPath('/post/1337?note=6');\n });\n });\n };\n\n _class.prototype['@test undefined isn\\'t serialized or deserialized into a string'] = function testUndefinedIsnTSerializedOrDeserializedIntoAString(assert) {\n var _this7 = this;\n\n assert.expect(4);\n\n this.router.map(function () {\n this.route('example');\n });\n\n this.addTemplate('application', '{{link-to \\'Example\\' \\'example\\' (query-params foo=undefined) id=\\'the-link\\'}}');\n\n this.setSingleQPController('example', 'foo', undefined, {\n foo: undefined\n });\n\n this.add('route:example', _emberRouting.Route.extend({\n model: function (params) {\n assert.deepEqual(params, { foo: undefined });\n }\n }));\n\n return this.visitAndAssert('/').then(function () {\n assert.equal(_this7.$('#the-link').attr('href'), '/example', 'renders without undefined qp serialized');\n\n return _this7.transitionTo('example', { queryParams: { foo: undefined } }).then(function () {\n _this7.assertCurrentPath('/example');\n });\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'routerOptions',\n get: function () {\n var fetchedHandlers = this.fetchedHandlers = [];\n\n return {\n location: 'test',\n\n init: function () {\n this._super.apply(this, arguments);\n this._seenHandlers = Object.create(null);\n this._handlerPromises = Object.create(null);\n },\n _getQPMeta: function (handlerInfo) {\n var handler = this._seenHandlers[handlerInfo.name];\n if (handler) {\n return (0, _emberMetal.get)(handler, '_qp');\n }\n },\n _getHandlerFunction: function () {\n var getHandler = this._super.apply(this, arguments);\n var handlerPromises = this._handlerPromises;\n var seenHandlers = this._seenHandlers;\n\n return function (routeName) {\n fetchedHandlers.push(routeName);\n\n // Cache the returns so we don't have more than one Promise for a\n // given handler.\n return handlerPromises[routeName] || (handlerPromises[routeName] = new _emberRuntime.RSVP.Promise(function (resolve) {\n setTimeout(function () {\n var handler = getHandler(routeName);\n\n seenHandlers[routeName] = handler;\n\n resolve(handler);\n }, 10);\n }));\n };\n }\n };\n }\n }]);\n return _class;\n }(_internalTestHelpers.QueryParamTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/query_params_test/query_param_async_get_handler_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/query_params_test/query_param_async_get_handler_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/query_params_test/query_params_paramless_link_to_test', ['ember-babel', 'ember-runtime', 'ember-views', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberViews, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Query Params - paramless link-to', function (_QueryParamTestCase) {\n (0, _emberBabel.inherits)(_class, _QueryParamTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _QueryParamTestCase.apply(this, arguments));\n }\n\n _class.prototype.testParamlessLinks = function testParamlessLinks(assert, routeName) {\n assert.expect(1);\n\n this.addTemplate(routeName, '{{link-to \\'index\\' \\'index\\' id=\\'index-link\\'}}');\n\n this.add('controller:' + routeName, _emberRuntime.Controller.extend({\n queryParams: ['foo'],\n foo: 'wat'\n }));\n\n return this.visit('/?foo=YEAH').then(function () {\n assert.equal((0, _emberViews.jQuery)('#index-link').attr('href'), '/?foo=YEAH');\n });\n };\n\n _class.prototype['@test param-less links in an app booted with query params in the URL don\\'t reset the query params: application'] = function testParamLessLinksInAnAppBootedWithQueryParamsInTheURLDonTResetTheQueryParamsApplication(assert) {\n return this.testParamlessLinks(assert, 'application');\n };\n\n _class.prototype['@test param-less links in an app booted with query params in the URL don\\'t reset the query params: index'] = function testParamLessLinksInAnAppBootedWithQueryParamsInTheURLDonTResetTheQueryParamsIndex(assert) {\n return this.testParamlessLinks(assert, 'index');\n };\n\n return _class;\n }(_internalTestHelpers.QueryParamTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/query_params_test/shared_state_test', ['ember-babel', 'ember-runtime', 'ember', 'ember-metal', 'ember-views', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _ember, _emberMetal, _emberViews, _internalTestHelpers) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Query Params - shared service state', function (_QueryParamTestCase) {\n (0, _emberBabel.inherits)(_class, _QueryParamTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _QueryParamTestCase.apply(this, arguments));\n }\n\n _class.prototype.boot = function boot() {\n this.setupApplication();\n return this.visitApplication();\n };\n\n _class.prototype.setupApplication = function setupApplication() {\n this.router.map(function () {\n this.route('home', { path: '/' });\n this.route('dashboard');\n });\n\n this.add('service:filters', _emberRuntime.Service.extend({\n shared: true\n }));\n\n this.add('controller:home', _emberRuntime.Controller.extend({\n filters: _ember.default.inject.service()\n }));\n\n this.add('controller:dashboard', _emberRuntime.Controller.extend({\n filters: _ember.default.inject.service(),\n queryParams: [{ 'filters.shared': 'shared' }]\n }));\n\n this.addTemplate('application', '{{link-to \\'Home\\' \\'home\\' }}
{{outlet}}
');\n this.addTemplate('home', '{{link-to \\'Dashboard\\' \\'dashboard\\' }}{{input type=\"checkbox\" id=\\'filters-checkbox\\' checked=(mut filters.shared) }}');\n this.addTemplate('dashboard', '{{link-to \\'Home\\' \\'home\\' }}');\n };\n\n _class.prototype.visitApplication = function visitApplication() {\n return this.visit('/');\n };\n\n _class.prototype['@test can modify shared state before transition'] = function testCanModifySharedStateBeforeTransition(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n return this.boot().then(function () {\n _this2.$input = (0, _emberViews.jQuery)('#filters-checkbox');\n\n // click the checkbox once to set filters.shared to false\n (0, _emberMetal.run)(_this2.$input, 'click');\n\n return _this2.visit('/dashboard').then(function () {\n assert.ok(true, 'expecting navigating to dashboard to succeed');\n });\n });\n };\n\n _class.prototype['@test can modify shared state back to the default value before transition'] = function testCanModifySharedStateBackToTheDefaultValueBeforeTransition(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n return this.boot().then(function () {\n _this3.$input = (0, _emberViews.jQuery)('#filters-checkbox');\n\n // click the checkbox twice to set filters.shared to false and back to true\n (0, _emberMetal.run)(_this3.$input, 'click');\n (0, _emberMetal.run)(_this3.$input, 'click');\n\n return _this3.visit('/dashboard').then(function () {\n assert.ok(true, 'expecting navigating to dashboard to succeed');\n });\n });\n };\n\n return _class;\n }(_internalTestHelpers.QueryParamTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/query_params_test/shared_state_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/query_params_test/shared_state_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_map_test', ['ember-babel', 'internal-test-helpers', 'ember-metal', 'ember-routing'], function (_emberBabel, _internalTestHelpers, _emberMetal, _emberRouting) {\n 'use strict';\n\n (0, _internalTestHelpers.moduleFor)('Router.map', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test Router.map returns an Ember Router class'] = function testRouterMapReturnsAnEmberRouterClass(assert) {\n assert.expect(1);\n\n var ret = this.router.map(function () {\n this.route('hello');\n });\n\n assert.ok(_emberRouting.Router.detect(ret));\n };\n\n _class.prototype['@test Router.map can be called multiple times'] = function testRouterMapCanBeCalledMultipleTimes(assert) {\n var _this2 = this;\n\n assert.expect(2);\n\n this.addTemplate('hello', 'Hello!');\n this.addTemplate('goodbye', 'Goodbye!');\n\n this.router.map(function () {\n this.route('hello');\n });\n\n this.router.map(function () {\n this.route('goodbye');\n });\n\n return (0, _emberMetal.run)(function () {\n return _this2.visit('/hello').then(function () {\n _this2.assertText('Hello!');\n }).then(function () {\n return _this2.visit('/goodbye');\n }).then(function () {\n _this2.assertText('Goodbye!');\n });\n });\n };\n\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n});","QUnit.module('ESLint | ember/tests/routing/router_map_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_map_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_service_test/basic_test', ['ember-babel', 'ember-runtime', 'ember-glimmer', 'ember-routing', 'ember-metal', 'internal-test-helpers', 'ember/features'], function (_emberBabel, _emberRuntime, _emberGlimmer, _emberRouting, _emberMetal, _internalTestHelpers, _features) {\n 'use strict';\n\n if (_features.EMBER_ROUTING_ROUTER_SERVICE) {\n (0, _internalTestHelpers.moduleFor)('Router Service - main', function (_RouterTestCase) {\n (0, _emberBabel.inherits)(_class, _RouterTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RouterTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test RouterService#currentRouteName is correctly set for top level route'] = function testRouterServiceCurrentRouteNameIsCorrectlySetForTopLevelRoute(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n assert.equal(_this2.routerService.get('currentRouteName'), 'parent.index');\n });\n };\n\n _class.prototype['@test RouterService#currentRouteName is correctly set for child route'] = function testRouterServiceCurrentRouteNameIsCorrectlySetForChildRoute(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n return this.visit('/child').then(function () {\n assert.equal(_this3.routerService.get('currentRouteName'), 'parent.child');\n });\n };\n\n _class.prototype['@test RouterService#currentRouteName is correctly set after transition'] = function testRouterServiceCurrentRouteNameIsCorrectlySetAfterTransition(assert) {\n var _this4 = this;\n\n assert.expect(1);\n\n return this.visit('/child').then(function () {\n return _this4.routerService.transitionTo('parent.sister');\n }).then(function () {\n assert.equal(_this4.routerService.get('currentRouteName'), 'parent.sister');\n });\n };\n\n _class.prototype['@test RouterService#currentRouteName is correctly set on each transition'] = function testRouterServiceCurrentRouteNameIsCorrectlySetOnEachTransition(assert) {\n var _this5 = this;\n\n assert.expect(3);\n\n return this.visit('/child').then(function () {\n assert.equal(_this5.routerService.get('currentRouteName'), 'parent.child');\n\n return _this5.visit('/sister');\n }).then(function () {\n assert.equal(_this5.routerService.get('currentRouteName'), 'parent.sister');\n\n return _this5.visit('/brother');\n }).then(function () {\n assert.equal(_this5.routerService.get('currentRouteName'), 'parent.brother');\n });\n };\n\n _class.prototype['@test RouterService#rootURL is correctly set to the default value'] = function testRouterServiceRootURLIsCorrectlySetToTheDefaultValue(assert) {\n var _this6 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n assert.equal(_this6.routerService.get('rootURL'), '/');\n });\n };\n\n _class.prototype['@test RouterService#rootURL is correctly set to a custom value'] = function testRouterServiceRootURLIsCorrectlySetToACustomValue(assert) {\n var _this7 = this;\n\n assert.expect(1);\n\n this.add('route:parent.index', _emberRouting.Route.extend({\n init: function () {\n this._super();\n (0, _emberMetal.set)(this.router, 'rootURL', '/homepage');\n }\n }));\n\n return this.visit('/').then(function () {\n assert.equal(_this7.routerService.get('rootURL'), '/homepage');\n });\n };\n\n _class.prototype['@test RouterService#location is correctly delegated from router:main'] = function testRouterServiceLocationIsCorrectlyDelegatedFromRouterMain(assert) {\n var _this8 = this;\n\n assert.expect(2);\n\n return this.visit('/').then(function () {\n var location = _this8.routerService.get('location');\n assert.ok(location);\n assert.ok(location instanceof _emberRouting.NoneLocation);\n });\n };\n\n return _class;\n }(_internalTestHelpers.RouterTestCase));\n }\n});","QUnit.module('ESLint | ember/tests/routing/router_service_test/basic_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_service_test/basic_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_service_test/currenturl_lifecycle_test', ['ember-babel', 'ember-runtime', 'ember-glimmer', 'ember-routing', 'ember-metal', 'internal-test-helpers', 'ember/features'], function (_emberBabel, _emberRuntime, _emberGlimmer, _emberRouting, _emberMetal, _internalTestHelpers, _features) {\n 'use strict';\n\n if (_features.EMBER_ROUTING_ROUTER_SERVICE) {\n var results = [];\n var ROUTE_NAMES = ['index', 'child', 'sister', 'brother'];\n\n var InstrumentedRoute = _emberRouting.Route.extend({\n routerService: _emberRuntime.inject.service('router'),\n\n beforeModel: function () {\n var service = (0, _emberMetal.get)(this, 'routerService');\n results.push([service.get('currentRouteName'), 'beforeModel', service.get('currentURL')]);\n },\n model: function () {\n var service = (0, _emberMetal.get)(this, 'routerService');\n results.push([service.get('currentRouteName'), 'model', service.get('currentURL')]);\n },\n afterModel: function () {\n var service = (0, _emberMetal.get)(this, 'routerService');\n results.push([service.get('currentRouteName'), 'afterModel', service.get('currentURL')]);\n }\n });\n\n (0, _internalTestHelpers.moduleFor)('Router Service - currentURL', function (_RouterTestCase) {\n (0, _emberBabel.inherits)(_class, _RouterTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _RouterTestCase.call(this));\n\n results = [];\n\n ROUTE_NAMES.forEach(function (name) {\n var routeName = 'parent.' + name;\n _this.add('route:' + routeName, InstrumentedRoute.extend());\n _this.addTemplate(routeName, '{{current-url}}');\n });\n\n _this.addComponent('current-url', {\n ComponentClass: _emberGlimmer.Component.extend({\n routerService: _emberRuntime.inject.service('router'),\n currentURL: (0, _emberRuntime.readOnly)('routerService.currentURL')\n }),\n template: '{{currentURL}}'\n });\n return _this;\n }\n\n _class.prototype['@test RouterService#currentURL is correctly set for top level route'] = function testRouterServiceCurrentURLIsCorrectlySetForTopLevelRoute(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n assert.equal(_this2.routerService.get('currentURL'), '/');\n });\n };\n\n _class.prototype['@test RouterService#currentURL is correctly set for child route'] = function testRouterServiceCurrentURLIsCorrectlySetForChildRoute(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n return this.visit('/child').then(function () {\n assert.equal(_this3.routerService.get('currentURL'), '/child');\n });\n };\n\n _class.prototype['@test RouterService#currentURL is correctly set after transition'] = function testRouterServiceCurrentURLIsCorrectlySetAfterTransition(assert) {\n var _this4 = this;\n\n assert.expect(1);\n\n return this.visit('/child').then(function () {\n return _this4.routerService.transitionTo('parent.sister');\n }).then(function () {\n assert.equal(_this4.routerService.get('currentURL'), '/sister');\n });\n };\n\n _class.prototype['@test RouterService#currentURL is correctly set on each transition'] = function testRouterServiceCurrentURLIsCorrectlySetOnEachTransition(assert) {\n var _this5 = this;\n\n assert.expect(3);\n\n return this.visit('/child').then(function () {\n assert.equal(_this5.routerService.get('currentURL'), '/child');\n\n return _this5.visit('/sister');\n }).then(function () {\n assert.equal(_this5.routerService.get('currentURL'), '/sister');\n\n return _this5.visit('/brother');\n }).then(function () {\n assert.equal(_this5.routerService.get('currentURL'), '/brother');\n });\n };\n\n _class.prototype['@test RouterService#currentURL is not set during lifecycle hooks'] = function testRouterServiceCurrentURLIsNotSetDuringLifecycleHooks(assert) {\n var _this6 = this;\n\n assert.expect(2);\n\n return this.visit('/').then(function () {\n assert.deepEqual(results, [[null, 'beforeModel', null], [null, 'model', null], [null, 'afterModel', null]]);\n\n results = [];\n\n return _this6.visit('/child');\n }).then(function () {\n assert.deepEqual(results, [['parent.index', 'beforeModel', '/'], ['parent.index', 'model', '/'], ['parent.index', 'afterModel', '/']]);\n });\n };\n\n _class.prototype['@test RouterService#currentURL is correctly set with component after consecutive visits'] = function testRouterServiceCurrentURLIsCorrectlySetWithComponentAfterConsecutiveVisits(assert) {\n var _this7 = this;\n\n assert.expect(3);\n\n return this.visit('/').then(function () {\n _this7.assertText('/');\n\n return _this7.visit('/child');\n }).then(function () {\n _this7.assertText('/child');\n\n return _this7.visit('/');\n }).then(function () {\n _this7.assertText('/');\n });\n };\n\n return _class;\n }(_internalTestHelpers.RouterTestCase));\n }\n});","QUnit.module('ESLint | ember/tests/routing/router_service_test/currenturl_lifecycle_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_service_test/currenturl_lifecycle_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_service_test/isActive_test', ['ember-babel', 'ember-runtime', 'ember-glimmer', 'ember-routing', 'ember-metal', 'internal-test-helpers', 'ember/features'], function (_emberBabel, _emberRuntime, _emberGlimmer, _emberRouting, _emberMetal, _internalTestHelpers, _features) {\n 'use strict';\n\n if (_features.EMBER_ROUTING_ROUTER_SERVICE) {\n (0, _internalTestHelpers.moduleFor)('Router Service - isActive', function (_RouterTestCase) {\n (0, _emberBabel.inherits)(_class, _RouterTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RouterTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test RouterService#isActive returns true for simple route'] = function testRouterServiceIsActiveReturnsTrueForSimpleRoute(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n return _this2.routerService.transitionTo('parent.child');\n }).then(function () {\n return _this2.routerService.transitionTo('parent.sister');\n }).then(function () {\n assert.ok(_this2.routerService.isActive('parent.sister'));\n });\n };\n\n _class.prototype['@test RouterService#isActive returns true for simple route with dynamic segments'] = function testRouterServiceIsActiveReturnsTrueForSimpleRouteWithDynamicSegments(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n var dynamicModel = { id: 1 };\n\n return this.visit('/').then(function () {\n return _this3.routerService.transitionTo('dynamic', dynamicModel);\n }).then(function () {\n assert.ok(_this3.routerService.isActive('dynamic', dynamicModel));\n });\n };\n\n _class.prototype['@test RouterService#isActive does not eagerly instantiate controller for query params'] = function testRouterServiceIsActiveDoesNotEagerlyInstantiateControllerForQueryParams(assert) {\n var _this4 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ sort: 'ASC' });\n\n this.add('controller:parent.sister', _emberRuntime.Controller.extend({\n queryParams: ['sort'],\n sort: 'ASC',\n\n init: function () {\n assert.ok(false, 'should never create');\n this._super.apply(this, arguments);\n }\n }));\n\n return this.visit('/').then(function () {\n return _this4.routerService.transitionTo('parent.brother');\n }).then(function () {\n assert.notOk(_this4.routerService.isActive('parent.sister', queryParams));\n });\n };\n\n _class.prototype['@test RouterService#isActive is correct for simple route with basic query params'] = function testRouterServiceIsActiveIsCorrectForSimpleRouteWithBasicQueryParams(assert) {\n var _this5 = this;\n\n assert.expect(2);\n\n var queryParams = this.buildQueryParams({ sort: 'ASC' });\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort'],\n sort: 'ASC'\n }));\n\n return this.visit('/').then(function () {\n return _this5.routerService.transitionTo('parent.child', queryParams);\n }).then(function () {\n assert.ok(_this5.routerService.isActive('parent.child', queryParams));\n assert.notOk(_this5.routerService.isActive('parent.child', _this5.buildQueryParams({ sort: 'DESC' })));\n });\n };\n\n _class.prototype['@test RouterService#isActive for simple route with array as query params'] = function testRouterServiceIsActiveForSimpleRouteWithArrayAsQueryParams(assert) {\n var _this6 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ sort: ['ascending'] });\n\n return this.visit('/').then(function () {\n return _this6.routerService.transitionTo('parent.child', queryParams);\n }).then(function () {\n assert.notOk(_this6.routerService.isActive('parent.child', _this6.buildQueryParams({ sort: 'descending' })));\n });\n };\n\n return _class;\n }(_internalTestHelpers.RouterTestCase));\n }\n});","QUnit.module('ESLint | ember/tests/routing/router_service_test/isActive_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_service_test/isActive_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_service_test/replaceWith_test', ['ember-babel', 'ember-routing', 'internal-test-helpers', 'router', 'ember-runtime', 'ember/features'], function (_emberBabel, _emberRouting, _internalTestHelpers, _router, _emberRuntime, _features) {\n 'use strict';\n\n if (_features.EMBER_ROUTING_ROUTER_SERVICE) {\n (0, _internalTestHelpers.moduleFor)('Router Service - replaceWith', function (_RouterTestCase) {\n (0, _emberBabel.inherits)(_class, _RouterTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _RouterTestCase.call(this));\n\n var testCase = _this;\n testCase.state = [];\n\n _this.add('location:test', _emberRouting.NoneLocation.extend({\n setURL: function (path) {\n testCase.state.push(path);\n this.set('path', path);\n },\n replaceURL: function (path) {\n testCase.state.splice(testCase.state.length - 1, 1, path);\n this.set('path', path);\n }\n }));\n return _this;\n }\n\n _class.prototype['@test RouterService#replaceWith returns a Transition'] = function testRouterServiceReplaceWithReturnsATransition(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n var transition = void 0;\n\n return this.visit('/').then(function () {\n transition = _this2.routerService.replaceWith('parent.child');\n\n assert.ok(transition instanceof _router.Transition);\n\n return transition;\n });\n };\n\n _class.prototype['@test RouterService#replaceWith with basic route replaces location'] = function testRouterServiceReplaceWithWithBasicRouteReplacesLocation(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n return _this3.routerService.transitionTo('parent.child');\n }).then(function () {\n return _this3.routerService.transitionTo('parent.sister');\n }).then(function () {\n return _this3.routerService.replaceWith('parent.brother');\n }).then(function () {\n assert.deepEqual(_this3.state, ['/', '/child', '/brother']);\n });\n };\n\n _class.prototype['@test RouterService#replaceWith with basic route using URLs replaces location'] = function testRouterServiceReplaceWithWithBasicRouteUsingURLsReplacesLocation(assert) {\n var _this4 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n return _this4.routerService.transitionTo('/child');\n }).then(function () {\n return _this4.routerService.transitionTo('/sister');\n }).then(function () {\n return _this4.routerService.replaceWith('/brother');\n }).then(function () {\n assert.deepEqual(_this4.state, ['/', '/child', '/brother']);\n });\n };\n\n _class.prototype['@test RouterService#replaceWith transitioning back to previously visited route replaces location'] = function testRouterServiceReplaceWithTransitioningBackToPreviouslyVisitedRouteReplacesLocation(assert) {\n var _this5 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n return _this5.routerService.transitionTo('parent.child');\n }).then(function () {\n return _this5.routerService.transitionTo('parent.sister');\n }).then(function () {\n return _this5.routerService.transitionTo('parent.brother');\n }).then(function () {\n return _this5.routerService.replaceWith('parent.sister');\n }).then(function () {\n assert.deepEqual(_this5.state, ['/', '/child', '/sister', '/sister']);\n });\n };\n\n _class.prototype['@test RouterService#replaceWith with basic query params does not remove query param defaults'] = function testRouterServiceReplaceWithWithBasicQueryParamsDoesNotRemoveQueryParamDefaults(assert) {\n var _this6 = this;\n\n assert.expect(1);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort'],\n sort: 'ASC'\n }));\n\n var queryParams = this.buildQueryParams({ sort: 'ASC' });\n\n return this.visit('/').then(function () {\n return _this6.routerService.transitionTo('parent.brother');\n }).then(function () {\n return _this6.routerService.replaceWith('parent.sister');\n }).then(function () {\n return _this6.routerService.replaceWith('parent.child', queryParams);\n }).then(function () {\n assert.deepEqual(_this6.state, ['/', '/child?sort=ASC']);\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'routerOptions',\n get: function () {\n return {\n location: 'test'\n };\n }\n }]);\n return _class;\n }(_internalTestHelpers.RouterTestCase));\n }\n});","QUnit.module('ESLint | ember/tests/routing/router_service_test/replaceWith_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_service_test/replaceWith_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_service_test/transitionTo_test', ['ember-babel', 'ember-runtime', 'ember-glimmer', 'ember-routing', 'ember-metal', 'internal-test-helpers', 'router', 'ember/features'], function (_emberBabel, _emberRuntime, _emberGlimmer, _emberRouting, _emberMetal, _internalTestHelpers, _router, _features) {\n 'use strict';\n\n if (_features.EMBER_ROUTING_ROUTER_SERVICE) {\n (0, _internalTestHelpers.moduleFor)('Router Service - transitionTo', function (_RouterTestCase) {\n (0, _emberBabel.inherits)(_class, _RouterTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _RouterTestCase.call(this));\n\n var testCase = _this;\n testCase.state = [];\n\n _this.add('location:test', _emberRouting.NoneLocation.extend({\n setURL: function (path) {\n testCase.state.push(path);\n this.set('path', path);\n },\n replaceURL: function (path) {\n testCase.state.splice(testCase.state.length - 1, 1, path);\n this.set('path', path);\n }\n }));\n return _this;\n }\n\n _class.prototype['@test RouterService#transitionTo returns a Transition'] = function testRouterServiceTransitionToReturnsATransition(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n var transition = void 0;\n\n return this.visit('/').then(function () {\n transition = _this2.routerService.transitionTo('parent.child');\n\n assert.ok(transition instanceof _router.Transition);\n\n return transition;\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with basic route updates location'] = function testRouterServiceTransitionToWithBasicRouteUpdatesLocation(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n return _this3.routerService.transitionTo('parent.child');\n }).then(function () {\n return _this3.routerService.transitionTo('parent.sister');\n }).then(function () {\n return _this3.routerService.transitionTo('parent.brother');\n }).then(function () {\n assert.deepEqual(_this3.state, ['/', '/child', '/sister', '/brother']);\n });\n };\n\n _class.prototype['@test RouterService#transitionTo transitioning back to previously visited route updates location'] = function testRouterServiceTransitionToTransitioningBackToPreviouslyVisitedRouteUpdatesLocation(assert) {\n var _this4 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n return _this4.routerService.transitionTo('parent.child');\n }).then(function () {\n return _this4.routerService.transitionTo('parent.sister');\n }).then(function () {\n return _this4.routerService.transitionTo('parent.brother');\n }).then(function () {\n return _this4.routerService.transitionTo('parent.sister');\n }).then(function () {\n assert.deepEqual(_this4.state, ['/', '/child', '/sister', '/brother', '/sister']);\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with basic route'] = function testRouterServiceTransitionToWithBasicRoute(assert) {\n var _this5 = this;\n\n assert.expect(1);\n\n var componentInstance = void 0;\n\n this.addTemplate('parent.index', '{{foo-bar}}');\n\n this.addComponent('foo-bar', {\n ComponentClass: _emberGlimmer.Component.extend({\n routerService: _emberRuntime.inject.service('router'),\n init: function () {\n this._super();\n componentInstance = this;\n },\n\n actions: {\n transitionToSister: function () {\n (0, _emberMetal.get)(this, 'routerService').transitionTo('parent.sister');\n }\n }\n }),\n template: 'foo-bar'\n });\n\n return this.visit('/').then(function () {\n (0, _emberMetal.run)(function () {\n componentInstance.send('transitionToSister');\n });\n\n assert.equal(_this5.routerService.get('currentRouteName'), 'parent.sister');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with basic route using URL'] = function testRouterServiceTransitionToWithBasicRouteUsingURL(assert) {\n var _this6 = this;\n\n assert.expect(1);\n\n var componentInstance = void 0;\n\n this.addTemplate('parent.index', '{{foo-bar}}');\n\n this.addComponent('foo-bar', {\n ComponentClass: _emberGlimmer.Component.extend({\n routerService: _emberRuntime.inject.service('router'),\n init: function () {\n this._super();\n componentInstance = this;\n },\n\n actions: {\n transitionToSister: function () {\n (0, _emberMetal.get)(this, 'routerService').transitionTo('/sister');\n }\n }\n }),\n template: 'foo-bar'\n });\n\n return this.visit('/').then(function () {\n (0, _emberMetal.run)(function () {\n componentInstance.send('transitionToSister');\n });\n\n assert.equal(_this6.routerService.get('currentRouteName'), 'parent.sister');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with dynamic segment'] = function testRouterServiceTransitionToWithDynamicSegment(assert) {\n var _this7 = this;\n\n assert.expect(3);\n\n var componentInstance = void 0;\n var dynamicModel = { id: 1, contents: 'much dynamicism' };\n\n this.addTemplate('parent.index', '{{foo-bar}}');\n this.addTemplate('dynamic', '{{model.contents}}');\n\n this.addComponent('foo-bar', {\n ComponentClass: _emberGlimmer.Component.extend({\n routerService: _emberRuntime.inject.service('router'),\n init: function () {\n this._super();\n componentInstance = this;\n },\n\n actions: {\n transitionToDynamic: function () {\n (0, _emberMetal.get)(this, 'routerService').transitionTo('dynamic', dynamicModel);\n }\n }\n }),\n template: 'foo-bar'\n });\n\n return this.visit('/').then(function () {\n (0, _emberMetal.run)(function () {\n componentInstance.send('transitionToDynamic');\n });\n\n assert.equal(_this7.routerService.get('currentRouteName'), 'dynamic');\n assert.equal(_this7.routerService.get('currentURL'), '/dynamic/1');\n _this7.assertText('much dynamicism');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with dynamic segment and model hook'] = function testRouterServiceTransitionToWithDynamicSegmentAndModelHook(assert) {\n var _this8 = this;\n\n assert.expect(3);\n\n var componentInstance = void 0;\n var dynamicModel = { id: 1, contents: 'much dynamicism' };\n\n this.add('route:dynamic', _emberRouting.Route.extend({\n model: function () {\n return dynamicModel;\n }\n }));\n\n this.addTemplate('parent.index', '{{foo-bar}}');\n this.addTemplate('dynamic', '{{model.contents}}');\n\n this.addComponent('foo-bar', {\n ComponentClass: _emberGlimmer.Component.extend({\n routerService: _emberRuntime.inject.service('router'),\n init: function () {\n this._super();\n componentInstance = this;\n },\n\n actions: {\n transitionToDynamic: function () {\n (0, _emberMetal.get)(this, 'routerService').transitionTo('dynamic', 1);\n }\n }\n }),\n template: 'foo-bar'\n });\n\n return this.visit('/').then(function () {\n (0, _emberMetal.run)(function () {\n componentInstance.send('transitionToDynamic');\n });\n\n assert.equal(_this8.routerService.get('currentRouteName'), 'dynamic');\n assert.equal(_this8.routerService.get('currentURL'), '/dynamic/1');\n _this8.assertText('much dynamicism');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with basic query params does not remove query param defaults'] = function testRouterServiceTransitionToWithBasicQueryParamsDoesNotRemoveQueryParamDefaults(assert) {\n var _this9 = this;\n\n assert.expect(1);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort'],\n sort: 'ASC'\n }));\n\n var queryParams = this.buildQueryParams({ sort: 'ASC' });\n\n return this.visit('/').then(function () {\n return _this9.routerService.transitionTo('parent.child', queryParams);\n }).then(function () {\n assert.equal(_this9.routerService.get('currentURL'), '/child?sort=ASC');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo passing only queryParams works'] = function testRouterServiceTransitionToPassingOnlyQueryParamsWorks(assert) {\n var _this10 = this;\n\n assert.expect(2);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort']\n }));\n\n var queryParams = this.buildQueryParams({ sort: 'DESC' });\n\n return this.visit('/').then(function () {\n return _this10.routerService.transitionTo('parent.child');\n }).then(function () {\n assert.equal(_this10.routerService.get('currentURL'), '/child');\n }).then(function () {\n return _this10.routerService.transitionTo(queryParams);\n }).then(function () {\n assert.equal(_this10.routerService.get('currentURL'), '/child?sort=DESC');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with unspecified query params'] = function testRouterServiceTransitionToWithUnspecifiedQueryParams(assert) {\n var _this11 = this;\n\n assert.expect(1);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort', 'page', 'category', 'extra'],\n sort: 'ASC',\n page: null,\n category: undefined\n }));\n\n var queryParams = this.buildQueryParams({ sort: 'ASC' });\n\n return this.visit('/').then(function () {\n return _this11.routerService.transitionTo('parent.child', queryParams);\n }).then(function () {\n assert.equal(_this11.routerService.get('currentURL'), '/child?sort=ASC');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with aliased query params uses the original provided key'] = function testRouterServiceTransitionToWithAliasedQueryParamsUsesTheOriginalProvidedKey(assert) {\n var _this12 = this;\n\n assert.expect(1);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: {\n 'cont_sort': 'url_sort'\n },\n cont_sort: 'ASC'\n }));\n\n var queryParams = this.buildQueryParams({ url_sort: 'ASC' });\n\n return this.visit('/').then(function () {\n return _this12.routerService.transitionTo('parent.child', queryParams);\n }).then(function () {\n assert.equal(_this12.routerService.get('currentURL'), '/child?url_sort=ASC');\n });\n };\n\n _class.prototype['@test RouterService#transitionTo with aliased query params uses the original provided key when controller property name'] = function testRouterServiceTransitionToWithAliasedQueryParamsUsesTheOriginalProvidedKeyWhenControllerPropertyName(assert) {\n var _this13 = this;\n\n assert.expect(1);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: {\n 'cont_sort': 'url_sort'\n },\n cont_sort: 'ASC'\n }));\n\n var queryParams = this.buildQueryParams({ cont_sort: 'ASC' });\n\n return this.visit('/').then(function () {\n expectAssertion(function () {\n return _this13.routerService.transitionTo('parent.child', queryParams);\n }, 'You passed the `cont_sort` query parameter during a transition into parent.child, please update to url_sort');\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'routerOptions',\n get: function () {\n return {\n location: 'test'\n };\n }\n }]);\n return _class;\n }(_internalTestHelpers.RouterTestCase));\n }\n});","QUnit.module('ESLint | ember/tests/routing/router_service_test/transitionTo_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_service_test/transitionTo_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/router_service_test/urlFor_test', ['ember-babel', 'ember-runtime', 'ember-routing', 'ember-metal', 'internal-test-helpers', 'ember/features'], function (_emberBabel, _emberRuntime, _emberRouting, _emberMetal, _internalTestHelpers, _features) {\n 'use strict';\n\n function setupController(app, name) {\n var controllerName = _emberRuntime.String.capitalize(name) + 'Controller';\n\n Object.defineProperty(app, controllerName, {\n get: function () {\n throw new Error('Generating a URL should not require instantiation of a ' + controllerName + '.');\n }\n });\n }\n\n if (_features.EMBER_ROUTING_ROUTER_SERVICE) {\n (0, _internalTestHelpers.moduleFor)('Router Service - urlFor', function (_RouterTestCase) {\n (0, _emberBabel.inherits)(_class, _RouterTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n return (0, _emberBabel.possibleConstructorReturn)(this, _RouterTestCase.apply(this, arguments));\n }\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route'] = function testRouterServiceUrlForReturnsURLForSimpleRoute(assert) {\n var _this2 = this;\n\n assert.expect(1);\n\n return this.visit('/').then(function () {\n var expectedURL = _this2.routerService.urlFor('parent.child');\n\n assert.equal('/child', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with dynamic segments'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithDynamicSegments(assert) {\n var _this3 = this;\n\n assert.expect(1);\n\n setupController(this.application, 'dynamic');\n\n var dynamicModel = { id: 1, contents: 'much dynamicism' };\n\n return this.visit('/').then(function () {\n var expectedURL = _this3.routerService.urlFor('dynamic', dynamicModel);\n\n assert.equal('/dynamic/1', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with basic query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithBasicQueryParams(assert) {\n var _this4 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ foo: 'bar' });\n\n return this.visit('/').then(function () {\n var expectedURL = _this4.routerService.urlFor('parent.child', queryParams);\n\n assert.equal('/child?foo=bar', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with basic query params and default value'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithBasicQueryParamsAndDefaultValue(assert) {\n var _this5 = this;\n\n assert.expect(1);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort'],\n sort: 'ASC'\n }));\n\n var queryParams = this.buildQueryParams({ sort: 'ASC' });\n\n return this.visit('/').then(function () {\n var expectedURL = _this5.routerService.urlFor('parent.child', queryParams);\n\n assert.equal('/child?sort=ASC', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with basic query params and default value with stickyness'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithBasicQueryParamsAndDefaultValueWithStickyness(assert) {\n var _this6 = this;\n\n assert.expect(2);\n\n this.add('controller:parent.child', _emberRuntime.Controller.extend({\n queryParams: ['sort', 'foo'],\n sort: 'ASC'\n }));\n\n var queryParams = this.buildQueryParams({ sort: 'DESC' });\n\n return this.visit('/child/?sort=DESC').then(function () {\n var controller = _this6.applicationInstance.lookup('controller:parent.child');\n assert.equal((0, _emberMetal.get)(controller, 'sort'), 'DESC', 'sticky is set');\n\n var queryParams = _this6.buildQueryParams({ foo: 'derp' });\n var actual = _this6.routerService.urlFor('parent.child', queryParams);\n\n assert.equal(actual, '/child?foo=derp', 'does not use \"stickiness\"');\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with array as query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithArrayAsQueryParams(assert) {\n var _this7 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ selectedItems: ['a', 'b', 'c'] });\n\n return this.visit('/').then(function () {\n var expectedURL = _this7.routerService.urlFor('parent.child', queryParams);\n\n assert.equal('/child?selectedItems[]=a&selectedItems[]=b&selectedItems[]=c', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with null query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithNullQueryParams(assert) {\n var _this8 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ foo: null });\n\n return this.visit('/').then(function () {\n var expectedURL = _this8.routerService.urlFor('parent.child', queryParams);\n\n assert.equal('/child', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with undefined query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithUndefinedQueryParams(assert) {\n var _this9 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ foo: undefined });\n\n return this.visit('/').then(function () {\n var expectedURL = _this9.routerService.urlFor('parent.child', queryParams);\n\n assert.equal('/child', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with dynamic segments and basic query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithDynamicSegmentsAndBasicQueryParams(assert) {\n var _this10 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ foo: 'bar' });\n\n return this.visit('/').then(function () {\n var expectedURL = _this10.routerService.urlFor('dynamic', { id: 1 }, queryParams);\n\n assert.equal('/dynamic/1?foo=bar', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with dynamic segments and array as query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithDynamicSegmentsAndArrayAsQueryParams(assert) {\n var _this11 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ selectedItems: ['a', 'b', 'c'] });\n\n return this.visit('/').then(function () {\n var expectedURL = _this11.routerService.urlFor('dynamic', { id: 1 }, queryParams);\n\n assert.equal('/dynamic/1?selectedItems[]=a&selectedItems[]=b&selectedItems[]=c', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with dynamic segments and null query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithDynamicSegmentsAndNullQueryParams(assert) {\n var _this12 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ foo: null });\n\n return this.visit('/').then(function () {\n var expectedURL = _this12.routerService.urlFor('dynamic', { id: 1 }, queryParams);\n\n assert.equal('/dynamic/1', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor returns URL for simple route with dynamic segments and undefined query params'] = function testRouterServiceUrlForReturnsURLForSimpleRouteWithDynamicSegmentsAndUndefinedQueryParams(assert) {\n var _this13 = this;\n\n assert.expect(1);\n\n var queryParams = this.buildQueryParams({ foo: undefined });\n\n return this.visit('/').then(function () {\n var expectedURL = _this13.routerService.urlFor('dynamic', { id: 1 }, queryParams);\n\n assert.equal('/dynamic/1', expectedURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor correctly transitions to route via generated path'] = function testRouterServiceUrlForCorrectlyTransitionsToRouteViaGeneratedPath(assert) {\n var _this14 = this;\n\n assert.expect(1);\n\n var expectedURL = void 0;\n\n return this.visit('/').then(function () {\n expectedURL = _this14.routerService.urlFor('parent.child');\n\n return _this14.routerService.transitionTo(expectedURL);\n }).then(function () {\n assert.equal(expectedURL, _this14.routerService.get('currentURL'));\n });\n };\n\n _class.prototype['@test RouterService#urlFor correctly transitions to route via generated path with dynamic segments'] = function testRouterServiceUrlForCorrectlyTransitionsToRouteViaGeneratedPathWithDynamicSegments(assert) {\n var _this15 = this;\n\n assert.expect(1);\n\n var expectedURL = void 0;\n var dynamicModel = { id: 1 };\n\n this.add('route:dynamic', _emberRouting.Route.extend({\n model: function () {\n return dynamicModel;\n }\n }));\n\n return this.visit('/').then(function () {\n expectedURL = _this15.routerService.urlFor('dynamic', dynamicModel);\n\n return _this15.routerService.transitionTo(expectedURL);\n }).then(function () {\n assert.equal(expectedURL, _this15.routerService.get('currentURL'));\n });\n };\n\n _class.prototype['@test RouterService#urlFor correctly transitions to route via generated path with query params'] = function testRouterServiceUrlForCorrectlyTransitionsToRouteViaGeneratedPathWithQueryParams(assert) {\n var _this16 = this;\n\n assert.expect(1);\n\n var expectedURL = void 0;\n var actualURL = void 0;\n var queryParams = this.buildQueryParams({ foo: 'bar' });\n\n return this.visit('/').then(function () {\n expectedURL = _this16.routerService.urlFor('parent.child', queryParams);\n\n return _this16.routerService.transitionTo(expectedURL);\n }).then(function () {\n actualURL = _this16.routerService.get('currentURL') + '?foo=bar';\n\n assert.equal(expectedURL, actualURL);\n });\n };\n\n _class.prototype['@test RouterService#urlFor correctly transitions to route via generated path with dynamic segments and query params'] = function testRouterServiceUrlForCorrectlyTransitionsToRouteViaGeneratedPathWithDynamicSegmentsAndQueryParams(assert) {\n var _this17 = this;\n\n assert.expect(1);\n\n var expectedURL = void 0;\n var actualURL = void 0;\n var queryParams = this.buildQueryParams({ foo: 'bar' });\n var dynamicModel = { id: 1 };\n\n this.add('route:dynamic', _emberRouting.Route.extend({\n model: function () {\n return dynamicModel;\n }\n }));\n\n return this.visit('/').then(function () {\n expectedURL = _this17.routerService.urlFor('dynamic', dynamicModel, queryParams);\n\n return _this17.routerService.transitionTo(expectedURL);\n }).then(function () {\n actualURL = _this17.routerService.get('currentURL') + '?foo=bar';\n\n assert.equal(expectedURL, actualURL);\n });\n };\n\n return _class;\n }(_internalTestHelpers.RouterTestCase));\n }\n});","QUnit.module('ESLint | ember/tests/routing/router_service_test/urlFor_test.js');\nQUnit.test('should pass ESLint', function(assert) {\n assert.expect(1);\n assert.ok(true, 'ember/tests/routing/router_service_test/urlFor_test.js should pass ESLint\\n\\n');\n});\n","enifed('ember/tests/routing/substates_test', ['ember-babel', 'ember-runtime', 'ember-routing', 'internal-test-helpers'], function (_emberBabel, _emberRuntime, _emberRouting, _internalTestHelpers) {\n 'use strict';\n\n var counter = void 0;\n\n function step(expectedValue, description) {\n equal(counter, expectedValue, 'Step ' + expectedValue + ': ' + description);\n counter++;\n }\n\n (0, _internalTestHelpers.moduleFor)('Loading/Error Substates', function (_ApplicationTestCase) {\n (0, _emberBabel.inherits)(_class, _ApplicationTestCase);\n\n function _class() {\n (0, _emberBabel.classCallCheck)(this, _class);\n\n var _this = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase.call(this));\n\n counter = 1;\n\n _this.addTemplate('application', '
{{outlet}}
');\n _this.addTemplate('index', 'INDEX');\n return _this;\n }\n\n _class.prototype.getController = function getController(name) {\n return this.applicationInstance.lookup('controller:' + name);\n };\n\n _class.prototype['@test Slow promise from a child route of application enters nested loading state'] = function testSlowPromiseFromAChildRouteOfApplicationEntersNestedLoadingState(assert) {\n var _this2 = this;\n\n var turtleDeferred = _emberRuntime.RSVP.defer();\n\n this.router.map(function () {\n this.route('turtle');\n });\n\n this.add('route:application', _emberRouting.Route.extend({\n setupController: function () {\n step(2, 'ApplicationRoute#setupController');\n }\n }));\n\n this.add('route:turtle', _emberRouting.Route.extend({\n model: function () {\n step(1, 'TurtleRoute#model');\n return turtleDeferred.promise;\n }\n }));\n this.addTemplate('turtle', 'TURTLE');\n this.addTemplate('loading', 'LOADING');\n\n var promise = this.visit('/turtle').then(function () {\n text = _this2.$('#app').text();\n assert.equal(text, 'TURTLE', 'turtle template has loaded and replaced the loading template');\n });\n\n var text = this.$('#app').text();\n assert.equal(text, 'LOADING', 'The Loading template is nested in application template\\'s outlet');\n\n turtleDeferred.resolve();\n return promise;\n };\n\n _class.prototype['@test Slow promises returned from ApplicationRoute#model don\\'t enter LoadingRoute'] = function (assert) {\n var _this3 = this;\n\n var appDeferred = _emberRuntime.RSVP.defer();\n\n this.add('route:application', _emberRouting.Route.extend({\n model: function () {\n return appDeferred.promise;\n }\n }));\n this.add('route:loading', _emberRouting.Route.extend({\n setupController: function () {\n ok(false, 'shouldn\\'t get here');\n }\n }));\n\n var promise = this.visit('/').then(function () {\n text = _this3.$('#app').text();\n\n assert.equal(text, 'INDEX', 'index template has been rendered');\n });\n\n var text = this.$('#app').text();\n\n assert.equal(text, '', 'nothing has been rendered yet');\n appDeferred.resolve();\n\n return promise;\n };\n\n _class.prototype['@test Don\\'t enter loading route unless either route or template defined'] = function (assert) {\n var _this4 = this;\n\n var deferred = _emberRuntime.RSVP.defer();\n\n this.router.map(function () {\n this.route('dummy');\n });\n this.add('route:dummy', _emberRouting.Route.extend({\n model: function () {\n return deferred.promise;\n }\n }));\n this.addTemplate('dummy', 'DUMMY');\n\n return this.visit('/').then(function () {\n var promise = _this4.visit('/dummy').then(function () {\n var text = _this4.$('#app').text();\n\n assert.equal(text, 'DUMMY', 'dummy template has been rendered');\n });\n\n assert.ok(_this4.currentPath !== 'loading', '\\n loading state not entered\\n ');\n deferred.resolve();\n\n return promise;\n });\n };\n\n _class.prototype['@test Enter loading route only if loadingRoute is defined'] = function testEnterLoadingRouteOnlyIfLoadingRouteIsDefined(assert) {\n var _this5 = this;\n\n var deferred = _emberRuntime.RSVP.defer();\n\n this.router.map(function () {\n this.route('dummy');\n });\n\n this.add('route:dummy', _emberRouting.Route.extend({\n model: function () {\n step(1, 'DummyRoute#model');\n return deferred.promise;\n }\n }));\n this.add('route:loading', _emberRouting.Route.extend({\n setupController: function () {\n step(2, 'LoadingRoute#setupController');\n }\n }));\n this.addTemplate('dummy', 'DUMMY');\n\n return this.visit('/').then(function () {\n var promise = _this5.visit('/dummy').then(function () {\n var text = _this5.$('#app').text();\n\n assert.equal(text, 'DUMMY', 'dummy template has been rendered');\n });\n\n assert.equal(_this5.currentPath, 'loading', 'loading state entered');\n deferred.resolve();\n\n return promise;\n });\n };\n\n _class.prototype['@test Slow promises returned from ApplicationRoute#model enter ApplicationLoadingRoute if present'] = function testSlowPromisesReturnedFromApplicationRouteModelEnterApplicationLoadingRouteIfPresent(assert) {\n var _this6 = this;\n\n var appDeferred = _emberRuntime.RSVP.defer();\n\n this.add('route:application', _emberRouting.Route.extend({\n model: function () {\n return appDeferred.promise;\n }\n }));\n var loadingRouteEntered = false;\n this.add('route:application_loading', _emberRouting.Route.extend({\n setupController: function () {\n loadingRouteEntered = true;\n }\n }));\n\n var promise = this.visit('/').then(function () {\n assert.equal(_this6.$('#app').text(), 'INDEX', 'index route loaded');\n });\n assert.ok(loadingRouteEntered, 'ApplicationLoadingRoute was entered');\n appDeferred.resolve();\n\n return promise;\n };\n\n _class.prototype['@test Slow promises returned from ApplicationRoute#model enter application_loading if template present'] = function testSlowPromisesReturnedFromApplicationRouteModelEnterApplication_loadingIfTemplatePresent(assert) {\n var _this7 = this;\n\n var appDeferred = _emberRuntime.RSVP.defer();\n\n this.addTemplate('application_loading', '\\n
TOPLEVEL LOADING
\\n ');\n this.add('route:application', _emberRouting.Route.extend({\n model: function () {\n return appDeferred.promise;\n }\n }));\n\n var promise = this.visit('/').then(function () {\n var length = _this7.$('#toplevel-loading').length;\n text = _this7.$('#app').text();\n\n assert.equal(length, 0, 'top-level loading view has been entirely removed from the DOM');\n assert.equal(text, 'INDEX', 'index has fully rendered');\n });\n var text = this.$('#toplevel-loading').text();\n\n assert.equal(text, 'TOPLEVEL LOADING', 'still loading the top level');\n appDeferred.resolve();\n\n return promise;\n };\n\n _class.prototype['@test Prioritized substate entry works with preserved-namespace nested routes'] = function testPrioritizedSubstateEntryWorksWithPreservedNamespaceNestedRoutes(assert) {\n var _this8 = this;\n\n var deferred = _emberRuntime.RSVP.defer();\n\n this.addTemplate('foo.bar_loading', 'FOOBAR LOADING');\n this.addTemplate('foo.bar.index', 'YAY');\n\n this.router.map(function () {\n this.route('foo', function () {\n this.route('bar', { path: '/bar' }, function () {});\n });\n });\n\n this.add('route:foo.bar', _emberRouting.Route.extend({\n model: function () {\n return deferred.promise;\n }\n }));\n\n return this.visit('/').then(function () {\n var promise = _this8.visit('/foo/bar').then(function () {\n text = _this8.$('#app').text();\n\n assert.equal(text, 'YAY', 'foo.bar.index fully loaded');\n });\n var text = _this8.$('#app').text();\n\n assert.equal(text, 'FOOBAR LOADING', 'foo.bar_loading was entered (as opposed to something like foo/foo/bar_loading)');\n deferred.resolve();\n\n return promise;\n });\n };\n\n _class.prototype['@test Prioritized substate entry works with reset-namespace nested routes'] = function testPrioritizedSubstateEntryWorksWithResetNamespaceNestedRoutes(assert) {\n var _this9 = this;\n\n var deferred = _emberRuntime.RSVP.defer();\n\n this.addTemplate('bar_loading', 'BAR LOADING');\n this.addTemplate('bar.index', 'YAY');\n\n this.router.map(function () {\n this.route('foo', function () {\n this.route('bar', { path: '/bar', resetNamespace: true }, function () {});\n });\n });\n\n this.add('route:bar', _emberRouting.Route.extend({\n model: function () {\n return deferred.promise;\n }\n }));\n\n return this.visit('/').then(function () {\n var promise = _this9.visit('/foo/bar').then(function () {\n text = _this9.$('#app').text();\n\n assert.equal(text, 'YAY', 'bar.index fully loaded');\n });\n\n var text = _this9.$('#app').text();\n\n assert.equal(text, 'BAR LOADING', 'foo.bar_loading was entered (as opposed to something likefoo/foo/bar_loading)');\n deferred.resolve();\n\n return promise;\n });\n };\n\n _class.prototype['@test Prioritized loading substate entry works with preserved-namespace nested routes'] = function testPrioritizedLoadingSubstateEntryWorksWithPreservedNamespaceNestedRoutes(assert) {\n var _this10 = this;\n\n var deferred = _emberRuntime.RSVP.defer();\n\n this.addTemplate('foo.bar_loading', 'FOOBAR LOADING');\n this.addTemplate('foo.bar', 'YAY');\n\n this.router.map(function () {\n this.route('foo', function () {\n this.route('bar');\n });\n });\n\n this.add('route:foo.bar', _emberRouting.Route.extend({\n model: function () {\n return deferred.promise;\n }\n }));\n\n var promise = this.visit('/foo/bar').then(function () {\n text = _this10.$('#app').text();\n\n assert.equal(text, 'YAY', 'foo.bar has rendered');\n });\n var text = this.$('#app').text();\n\n assert.equal(text, 'FOOBAR LOADING', 'foo.bar_loading was entered (as opposed to something like foo/foo/bar_loading)');\n deferred.resolve();\n\n return promise;\n };\n\n _class.prototype['@test Prioritized error substate entry works with preserved-namespaec nested routes'] = function testPrioritizedErrorSubstateEntryWorksWithPreservedNamespaecNestedRoutes(assert) {\n var _this11 = this;\n\n this.addTemplate('foo.bar_error', 'FOOBAR ERROR: {{model.msg}}');\n this.addTemplate('foo.bar', 'YAY');\n\n this.router.map(function () {\n this.route('foo', function () {\n this.route('bar');\n });\n });\n\n this.add('route:foo.bar', _emberRouting.Route.extend({\n model: function () {\n return _emberRuntime.RSVP.reject({\n msg: 'did it broke?'\n });\n }\n }));\n\n return this.visit('/').then(function () {\n return _this11.visit('/foo/bar').then(function () {\n\n var text = _this11.$('#app').text();\n assert.equal(text, 'FOOBAR ERROR: did it broke?', 'foo.bar_error was entered (as opposed to something like foo/foo/bar_error)');\n });\n });\n };\n\n _class.prototype['@test Prioritized loading substate entry works with auto-generated index routes'] = function testPrioritizedLoadingSubstateEntryWorksWithAutoGeneratedIndexRoutes(assert) {\n var _this12 = this;\n\n var deferred = _emberRuntime.RSVP.defer();\n this.addTemplate('foo.index_loading', 'FOO LOADING');\n this.addTemplate('foo.index', 'YAY');\n this.addTemplate('foo', '{{outlet}}');\n\n this.router.map(function () {\n this.route('foo', function () {\n this.route('bar');\n });\n });\n\n this.add('route:foo.index', _emberRouting.Route.extend({\n model: function () {\n return deferred.promise;\n }\n }));\n this.add('route:foo', _emberRouting.Route.extend({\n model: function () {\n return true;\n }\n }));\n\n var promise = this.visit('/foo').then(function () {\n text = _this12.$('#app').text();\n\n assert.equal(text, 'YAY', 'foo.index was rendered');\n });\n var text = this.$('#app').text();\n assert.equal(text, 'FOO LOADING', 'foo.index_loading was entered');\n\n deferred.resolve();\n\n return promise;\n };\n\n _class.prototype['@test Prioritized error substate entry works with auto-generated index routes'] = function testPrioritizedErrorSubstateEntryWorksWithAutoGeneratedIndexRoutes(assert) {\n var _this13 = this;\n\n this.addTemplate('foo.index_error', 'FOO ERROR: {{model.msg}}');\n this.addTemplate('foo.index', 'YAY');\n this.addTemplate('foo', '{{outlet}}');\n\n this.router.map(function () {\n this.route('foo', function () {\n this.route('bar');\n });\n });\n\n this.add('route:foo.index', _emberRouting.Route.extend({\n model: function () {\n return _emberRuntime.RSVP.reject({\n msg: 'did it broke?'\n });\n }\n }));\n this.add('route:foo', _emberRouting.Route.extend({\n model: function () {\n return true;\n }\n }));\n\n return this.visit('/').then(function () {\n\n return _this13.visit('/foo').then(function () {\n var text = _this13.$('#app').text();\n\n assert.equal(text, 'FOO ERROR: did it broke?', 'foo.index_error was entered');\n });\n });\n };\n\n (0, _emberBabel.createClass)(_class, [{\n key: 'currentPath',\n get: function () {\n return this.getController('application').get('currentPath');\n }\n }]);\n return _class;\n }(_internalTestHelpers.ApplicationTestCase));\n\n (0, _internalTestHelpers.moduleFor)('Loading/Error Substates - globals mode app', function (_AutobootApplicationT) {\n (0, _emberBabel.inherits)(_class2, _AutobootApplicationT);\n\n function _class2() {\n (0, _emberBabel.classCallCheck)(this, _class2);\n return (0, _emberBabel.possibleConstructorReturn)(this, _AutobootApplicationT.apply(this, arguments));\n }\n\n _class2.prototype['@test Rejected promises returned from ApplicationRoute transition into top-level application_error'] = function testRejectedPromisesReturnedFromApplicationRouteTransitionIntoTopLevelApplication_error(assert) {\n var _this15 = this;\n\n var reject = true;\n\n this.runTask(function () {\n _this15.createApplication();\n _this15.addTemplate('index', '