-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathember-qunit.amd.map
1 lines (1 loc) · 67 KB
/
ember-qunit.amd.map
1
{"version":3,"sources":["ember-qunit.js","ember-qunit/adapter.js","ember-qunit/module-for-component.js","ember-qunit/module-for-model.js","ember-qunit/module-for.js","ember-qunit/qunit-module.js","ember-test-helpers.js","ember-test-helpers/-legacy-overrides.js","ember-test-helpers/abstract-test-module.js","ember-test-helpers/build-registry.js","ember-test-helpers/has-ember-version.js","ember-test-helpers/test-context.js","ember-test-helpers/test-module-for-acceptance.js","ember-test-helpers/test-module-for-component.js","ember-test-helpers/test-module-for-integration.js","ember-test-helpers/test-module-for-model.js","ember-test-helpers/test-module.js","ember-test-helpers/test-resolver.js","ember-test-helpers/wait.js","qunit.js"],"sourcesContent":["define('ember-qunit', ['exports', 'ember-qunit/module-for', 'ember-qunit/module-for-component', 'ember-qunit/module-for-model', 'ember-qunit/adapter', 'ember-test-helpers', 'qunit'], function (exports, _emberQunitModuleFor, _emberQunitModuleForComponent, _emberQunitModuleForModel, _emberQunitAdapter, _emberTestHelpers, _qunit) {\n 'use strict';\n\n exports.module = _qunit.module;\n exports.test = _qunit.test;\n exports.skip = _qunit.skip;\n exports.only = _qunit.only;\n exports.moduleFor = _emberQunitModuleFor['default'];\n exports.moduleForComponent = _emberQunitModuleForComponent['default'];\n exports.moduleForModel = _emberQunitModuleForModel['default'];\n exports.setResolver = _emberTestHelpers.setResolver;\n exports.QUnitAdapter = _emberQunitAdapter['default'];\n});","define('ember-qunit/adapter', ['exports', 'ember', 'qunit'], function (exports, _ember, _qunit) {\n 'use strict';\n\n exports['default'] = _ember['default'].Test.Adapter.extend({\n init: function init() {\n this.doneCallbacks = [];\n },\n\n asyncStart: function asyncStart() {\n this.doneCallbacks.push(_qunit['default'].config.current.assert.async());\n },\n\n asyncEnd: function asyncEnd() {\n this.doneCallbacks.pop()();\n },\n\n exception: function exception(error) {\n _qunit['default'].config.current.assert.ok(false, _ember['default'].inspect(error));\n }\n });\n});","define('ember-qunit/module-for-component', ['exports', './qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) {\n 'use strict';\n\n exports['default'] = moduleForComponent;\n\n function moduleForComponent(name, description, callbacks) {\n _qunitModule.createModule(_emberTestHelpers.TestModuleForComponent, name, description, callbacks);\n }\n});","define('ember-qunit/module-for-model', ['exports', './qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) {\n 'use strict';\n\n exports['default'] = moduleForModel;\n\n function moduleForModel(name, description, callbacks) {\n _qunitModule.createModule(_emberTestHelpers.TestModuleForModel, name, description, callbacks);\n }\n});","define('ember-qunit/module-for', ['exports', './qunit-module', 'ember-test-helpers'], function (exports, _qunitModule, _emberTestHelpers) {\n 'use strict';\n\n exports['default'] = moduleFor;\n\n function moduleFor(name, description, callbacks) {\n _qunitModule.createModule(_emberTestHelpers.TestModule, name, description, callbacks);\n }\n});","define('ember-qunit/qunit-module', ['exports', 'ember', 'qunit'], function (exports, _ember, _qunit) {\n 'use strict';\n\n exports.createModule = createModule;\n\n function beforeEachCallback(callbacks) {\n if (typeof callbacks !== 'object') {\n return;\n }\n if (!callbacks) {\n return;\n }\n\n var beforeEach;\n\n if (callbacks.beforeEach) {\n beforeEach = callbacks.beforeEach;\n delete callbacks.beforeEach;\n }\n\n return beforeEach;\n }\n\n function afterEachCallback(callbacks) {\n if (typeof callbacks !== 'object') {\n return;\n }\n if (!callbacks) {\n return;\n }\n\n var afterEach;\n\n if (callbacks.afterEach) {\n afterEach = callbacks.afterEach;\n delete callbacks.afterEach;\n }\n\n return afterEach;\n }\n\n function createModule(Constructor, name, description, callbacks) {\n var _beforeEach = beforeEachCallback(callbacks || description);\n var _afterEach = afterEachCallback(callbacks || description);\n\n var module = new Constructor(name, description, callbacks);\n\n _qunit.module(module.name, {\n beforeEach: function beforeEach() {\n var _this = this,\n _arguments = arguments;\n\n // provide the test context to the underlying module\n module.setContext(this);\n\n return module.setup.apply(module, arguments).then(function () {\n if (_beforeEach) {\n return _beforeEach.apply(_this, _arguments);\n }\n });\n },\n\n afterEach: function afterEach() {\n var _arguments2 = arguments;\n\n var result = undefined;\n\n if (_afterEach) {\n result = _afterEach.apply(this, arguments);\n }\n\n return _ember['default'].RSVP.resolve(result).then(function () {\n return module.teardown.apply(module, _arguments2);\n });\n }\n });\n }\n});","define('ember-test-helpers', ['exports', 'ember', 'ember-test-helpers/test-module', 'ember-test-helpers/test-module-for-acceptance', 'ember-test-helpers/test-module-for-integration', 'ember-test-helpers/test-module-for-component', 'ember-test-helpers/test-module-for-model', 'ember-test-helpers/test-context', 'ember-test-helpers/test-resolver'], function (exports, _ember, _emberTestHelpersTestModule, _emberTestHelpersTestModuleForAcceptance, _emberTestHelpersTestModuleForIntegration, _emberTestHelpersTestModuleForComponent, _emberTestHelpersTestModuleForModel, _emberTestHelpersTestContext, _emberTestHelpersTestResolver) {\n 'use strict';\n\n _ember['default'].testing = true;\n\n exports.TestModule = _emberTestHelpersTestModule['default'];\n exports.TestModuleForAcceptance = _emberTestHelpersTestModuleForAcceptance['default'];\n exports.TestModuleForIntegration = _emberTestHelpersTestModuleForIntegration['default'];\n exports.TestModuleForComponent = _emberTestHelpersTestModuleForComponent['default'];\n exports.TestModuleForModel = _emberTestHelpersTestModuleForModel['default'];\n exports.getContext = _emberTestHelpersTestContext.getContext;\n exports.setContext = _emberTestHelpersTestContext.setContext;\n exports.unsetContext = _emberTestHelpersTestContext.unsetContext;\n exports.setResolver = _emberTestHelpersTestResolver.setResolver;\n});","define('ember-test-helpers/-legacy-overrides', ['exports', 'ember', './has-ember-version'], function (exports, _ember, _hasEmberVersion) {\n 'use strict';\n\n exports.preGlimmerSetupIntegrationForComponent = preGlimmerSetupIntegrationForComponent;\n\n function preGlimmerSetupIntegrationForComponent() {\n var module = this;\n var context = this.context;\n\n this.actionHooks = {};\n\n context.dispatcher = this.container.lookup('event_dispatcher:main') || _ember['default'].EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n context.actions = module.actionHooks;\n\n (this.registry || this.container).register('component:-test-holder', _ember['default'].Component.extend());\n\n context.render = function (template) {\n // in case `this.render` is called twice, make sure to teardown the first invocation\n module.teardownComponent();\n\n if (!template) {\n throw new Error(\"in a component integration test you must pass a template to `render()`\");\n }\n if (_ember['default'].isArray(template)) {\n template = template.join('');\n }\n if (typeof template === 'string') {\n template = _ember['default'].Handlebars.compile(template);\n }\n module.component = module.container.lookupFactory('component:-test-holder').create({\n layout: template\n });\n\n module.component.set('context', context);\n module.component.set('controller', context);\n\n _ember['default'].run(function () {\n module.component.appendTo('#ember-testing');\n });\n\n context._element = module.component.element;\n };\n\n context.$ = function () {\n return module.component.$.apply(module.component, arguments);\n };\n\n context.set = function (key, value) {\n var ret = _ember['default'].run(function () {\n return _ember['default'].set(context, key, value);\n });\n\n if (_hasEmberVersion['default'](2, 0)) {\n return ret;\n }\n };\n\n context.setProperties = function (hash) {\n var ret = _ember['default'].run(function () {\n return _ember['default'].setProperties(context, hash);\n });\n\n if (_hasEmberVersion['default'](2, 0)) {\n return ret;\n }\n };\n\n context.get = function (key) {\n return _ember['default'].get(context, key);\n };\n\n context.getProperties = function () {\n var args = Array.prototype.slice.call(arguments);\n return _ember['default'].getProperties(context, args);\n };\n\n context.on = function (actionName, handler) {\n module.actionHooks[actionName] = handler;\n };\n\n context.send = function (actionName) {\n var hook = module.actionHooks[actionName];\n if (!hook) {\n throw new Error(\"integration testing template received unexpected action \" + actionName);\n }\n hook.apply(module, Array.prototype.slice.call(arguments, 1));\n };\n\n context.clearRender = function () {\n module.teardownComponent();\n };\n }\n});","define('ember-test-helpers/abstract-test-module', ['exports', './wait', './test-context', 'ember'], function (exports, _wait, _testContext, _ember) {\n 'use strict';\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n // calling this `merge` here because we cannot\n // actually assume it is like `Object.assign`\n // with > 2 args\n var merge = _ember['default'].assign || _ember['default'].merge;\n\n var _default = (function () {\n function _default(name, options) {\n _classCallCheck(this, _default);\n\n this.context = undefined;\n this.name = name;\n this.callbacks = options || {};\n\n this.initSetupSteps();\n this.initTeardownSteps();\n }\n\n _default.prototype.setup = function setup(assert) {\n var _this = this;\n\n return this.invokeSteps(this.setupSteps, this, assert).then(function () {\n _this.contextualizeCallbacks();\n return _this.invokeSteps(_this.contextualizedSetupSteps, _this.context, assert);\n });\n };\n\n _default.prototype.teardown = function teardown(assert) {\n var _this2 = this;\n\n return this.invokeSteps(this.contextualizedTeardownSteps, this.context, assert).then(function () {\n return _this2.invokeSteps(_this2.teardownSteps, _this2, assert);\n }).then(function () {\n _this2.cache = null;\n _this2.cachedCalls = null;\n });\n };\n\n _default.prototype.initSetupSteps = function initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n };\n\n _default.prototype.invokeSteps = function invokeSteps(steps, context, assert) {\n steps = steps.slice();\n\n function nextStep() {\n var step = steps.shift();\n if (step) {\n // guard against exceptions, for example missing components referenced from needs.\n return new _ember['default'].RSVP.Promise(function (resolve) {\n resolve(step.call(context, assert));\n }).then(nextStep);\n } else {\n return _ember['default'].RSVP.resolve();\n }\n }\n return nextStep();\n };\n\n _default.prototype.contextualizeCallbacks = function contextualizeCallbacks() {};\n\n _default.prototype.initTeardownSteps = function initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownTestElements);\n this.teardownSteps.push(this.teardownAJAXListeners);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n };\n\n _default.prototype.setupTestElements = function setupTestElements() {\n var testEl = document.querySelector('#ember-testing');\n if (!testEl) {\n var element = document.createElement('div');\n element.setAttribute('id', 'ember-testing');\n\n document.body.appendChild(element);\n this.fixtureResetValue = '';\n } else {\n this.fixtureResetValue = testEl.innerHTML;\n }\n };\n\n _default.prototype.setupContext = function setupContext(options) {\n var context = this.getContext();\n\n merge(context, {\n dispatcher: null,\n inject: {}\n });\n merge(context, options);\n\n this.setToString();\n _testContext.setContext(context);\n this.context = context;\n };\n\n _default.prototype.setContext = function setContext(context) {\n this.context = context;\n };\n\n _default.prototype.getContext = function getContext() {\n if (this.context) {\n return this.context;\n }\n\n return this.context = _testContext.getContext() || {};\n };\n\n _default.prototype.setToString = function setToString() {\n var _this3 = this;\n\n this.context.toString = function () {\n if (_this3.subjectName) {\n return 'test context for: ' + _this3.subjectName;\n }\n\n if (_this3.name) {\n return 'test context for: ' + _this3.name;\n }\n };\n };\n\n _default.prototype.setupAJAXListeners = function setupAJAXListeners() {\n _wait._setupAJAXHooks();\n };\n\n _default.prototype.teardownAJAXListeners = function teardownAJAXListeners() {\n _wait._teardownAJAXHooks();\n };\n\n _default.prototype.teardownTestElements = function teardownTestElements() {\n document.getElementById('ember-testing').innerHTML = this.fixtureResetValue;\n\n // Ember 2.0.0 removed Ember.View as public API, so only do this when\n // Ember.View is present\n if (_ember['default'].View && _ember['default'].View.views) {\n _ember['default'].View.views = {};\n }\n };\n\n _default.prototype.teardownContext = function teardownContext() {\n var context = this.context;\n this.context = undefined;\n _testContext.unsetContext();\n\n if (context && context.dispatcher && !context.dispatcher.isDestroyed) {\n _ember['default'].run(function () {\n context.dispatcher.destroy();\n });\n }\n };\n\n return _default;\n })();\n\n exports['default'] = _default;\n});","define('ember-test-helpers/build-registry', ['exports', 'ember'], function (exports, _ember) {\n /* globals global, self, requirejs, require */\n\n 'use strict';\n\n function exposeRegistryMethodsWithoutDeprecations(container) {\n var methods = ['register', 'unregister', 'resolve', 'normalize', 'typeInjection', 'injection', 'factoryInjection', 'factoryTypeInjection', 'has', 'options', 'optionsForType'];\n\n function exposeRegistryMethod(container, method) {\n if (method in container) {\n container[method] = function () {\n return container._registry[method].apply(container._registry, arguments);\n };\n }\n }\n\n for (var i = 0, l = methods.length; i < l; i++) {\n exposeRegistryMethod(container, methods[i]);\n }\n }\n\n var Owner = (function () {\n if (_ember['default']._RegistryProxyMixin && _ember['default']._ContainerProxyMixin) {\n return _ember['default'].Object.extend(_ember['default']._RegistryProxyMixin, _ember['default']._ContainerProxyMixin);\n }\n\n return _ember['default'].Object.extend();\n })();\n\n exports['default'] = function (resolver) {\n var fallbackRegistry, registry, container;\n var namespace = _ember['default'].Object.create({\n Resolver: { create: function create() {\n return resolver;\n } }\n });\n\n function register(name, factory) {\n var thingToRegisterWith = registry || container;\n\n if (!container.lookupFactory(name)) {\n thingToRegisterWith.register(name, factory);\n }\n }\n\n if (_ember['default'].Application.buildRegistry) {\n fallbackRegistry = _ember['default'].Application.buildRegistry(namespace);\n fallbackRegistry.register('component-lookup:main', _ember['default'].ComponentLookup);\n\n registry = new _ember['default'].Registry({\n fallback: fallbackRegistry\n });\n\n if (_ember['default'].ApplicationInstance && _ember['default'].ApplicationInstance.setupRegistry) {\n _ember['default'].ApplicationInstance.setupRegistry(registry);\n }\n\n // these properties are set on the fallback registry by `buildRegistry`\n // and on the primary registry within the ApplicationInstance constructor\n // but we need to manually recreate them since ApplicationInstance's are not\n // exposed externally\n registry.normalizeFullName = fallbackRegistry.normalizeFullName;\n registry.makeToString = fallbackRegistry.makeToString;\n registry.describe = fallbackRegistry.describe;\n\n var owner = Owner.create({\n __registry__: registry,\n __container__: null\n });\n\n container = registry.container({ owner: owner });\n owner.__container__ = container;\n\n exposeRegistryMethodsWithoutDeprecations(container);\n } else {\n container = _ember['default'].Application.buildContainer(namespace);\n container.register('component-lookup:main', _ember['default'].ComponentLookup);\n }\n\n // Ember 1.10.0 did not properly add `view:toplevel` or `view:default`\n // to the registry in Ember.Application.buildRegistry :(\n //\n // Ember 2.0.0 removed Ember.View as public API, so only do this when\n // Ember.View is present\n if (_ember['default'].View) {\n register('view:toplevel', _ember['default'].View.extend());\n }\n\n // Ember 2.0.0 removed Ember._MetamorphView from the Ember global, so only\n // do this when present\n if (_ember['default']._MetamorphView) {\n register('view:default', _ember['default']._MetamorphView);\n }\n\n var globalContext = typeof global === 'object' && global || self;\n if (requirejs.entries['ember-data/setup-container']) {\n // ember-data is a proper ember-cli addon since 2.3; if no 'import\n // 'ember-data'' is present somewhere in the tests, there is also no `DS`\n // available on the globalContext and hence ember-data wouldn't be setup\n // correctly for the tests; that's why we import and call setupContainer\n // here; also see https://github.com/emberjs/data/issues/4071 for context\n var setupContainer = require('ember-data/setup-container')['default'];\n setupContainer(registry || container);\n } else if (globalContext.DS) {\n var DS = globalContext.DS;\n if (DS._setupContainer) {\n DS._setupContainer(registry || container);\n } else {\n register('transform:boolean', DS.BooleanTransform);\n register('transform:date', DS.DateTransform);\n register('transform:number', DS.NumberTransform);\n register('transform:string', DS.StringTransform);\n register('serializer:-default', DS.JSONSerializer);\n register('serializer:-rest', DS.RESTSerializer);\n register('adapter:-rest', DS.RESTAdapter);\n }\n }\n\n return {\n registry: registry,\n container: container\n };\n };\n});","define('ember-test-helpers/has-ember-version', ['exports', 'ember'], function (exports, _ember) {\n 'use strict';\n\n exports['default'] = hasEmberVersion;\n\n function hasEmberVersion(major, minor) {\n var numbers = _ember['default'].VERSION.split('-')[0].split('.');\n var actualMajor = parseInt(numbers[0], 10);\n var actualMinor = parseInt(numbers[1], 10);\n return actualMajor > major || actualMajor === major && actualMinor >= minor;\n }\n});","define(\"ember-test-helpers/test-context\", [\"exports\"], function (exports) {\n \"use strict\";\n\n exports.setContext = setContext;\n exports.getContext = getContext;\n exports.unsetContext = unsetContext;\n var __test_context__;\n\n function setContext(context) {\n __test_context__ = context;\n }\n\n function getContext() {\n return __test_context__;\n }\n\n function unsetContext() {\n __test_context__ = undefined;\n }\n});","define('ember-test-helpers/test-module-for-acceptance', ['exports', './abstract-test-module', 'ember', './test-context'], function (exports, _abstractTestModule, _ember, _testContext) {\n 'use strict';\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n var _default = (function (_AbstractTestModule) {\n _inherits(_default, _AbstractTestModule);\n\n function _default() {\n _classCallCheck(this, _default);\n\n _AbstractTestModule.apply(this, arguments);\n }\n\n _default.prototype.setupContext = function setupContext() {\n _AbstractTestModule.prototype.setupContext.call(this, { application: this.createApplication() });\n };\n\n _default.prototype.teardownContext = function teardownContext() {\n _ember['default'].run(function () {\n _testContext.getContext().application.destroy();\n });\n\n _AbstractTestModule.prototype.teardownContext.call(this);\n };\n\n _default.prototype.createApplication = function createApplication() {\n var _callbacks = this.callbacks;\n var Application = _callbacks.Application;\n var config = _callbacks.config;\n\n var application = undefined;\n\n _ember['default'].run(function () {\n application = Application.create(config);\n application.setupForTesting();\n application.injectTestHelpers();\n });\n\n return application;\n };\n\n return _default;\n })(_abstractTestModule['default']);\n\n exports['default'] = _default;\n});","define('ember-test-helpers/test-module-for-component', ['exports', './test-module', 'ember', './has-ember-version', './-legacy-overrides'], function (exports, _testModule, _ember, _hasEmberVersion, _legacyOverrides) {\n 'use strict';\n\n exports.setupComponentIntegrationTest = _setupComponentIntegrationTest;\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n var ACTION_KEY = undefined;\n if (_hasEmberVersion['default'](2, 0)) {\n ACTION_KEY = 'actions';\n } else {\n ACTION_KEY = '_actions';\n }\n\n var isPreGlimmer = !_hasEmberVersion['default'](1, 13);\n\n var getOwner = _ember['default'].getOwner;\n\n var _default = (function (_TestModule) {\n _inherits(_default, _TestModule);\n\n function _default(componentName, description, callbacks) {\n _classCallCheck(this, _default);\n\n // Allow `description` to be omitted\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = null;\n } else if (!callbacks) {\n callbacks = {};\n }\n\n var integrationOption = callbacks.integration;\n\n _TestModule.call(this, 'component:' + componentName, description, callbacks);\n\n this.componentName = componentName;\n\n if (callbacks.needs || callbacks.unit || integrationOption === false) {\n this.isUnitTest = true;\n } else if (integrationOption) {\n this.isUnitTest = false;\n } else {\n _ember['default'].deprecate(\"the component:\" + componentName + \" test module is implicitly running in unit test mode, \" + \"which will change to integration test mode by default in an upcoming version of \" + \"ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit \" + \"test mode.\", false, { id: 'ember-test-helpers.test-module-for-component.test-type', until: '0.6.0' });\n this.isUnitTest = true;\n }\n\n if (!this.isUnitTest && !this.isLegacy) {\n callbacks.integration = true;\n }\n\n if (this.isUnitTest || this.isLegacy) {\n this.setupSteps.push(this.setupComponentUnitTest);\n } else {\n this.callbacks.subject = function () {\n throw new Error(\"component integration tests do not support `subject()`. Instead, render the component as if it were HTML: `this.render('<my-component foo=true>');`. For more information, read: http://guides.emberjs.com/v2.2.0/testing/testing-components/\");\n };\n this.setupSteps.push(this.setupComponentIntegrationTest);\n this.teardownSteps.unshift(this.teardownComponent);\n }\n\n if (_ember['default'].View && _ember['default'].View.views) {\n this.setupSteps.push(this._aliasViewRegistry);\n this.teardownSteps.unshift(this._resetViewRegistry);\n }\n }\n\n _default.prototype.initIntegration = function initIntegration(options) {\n this.isLegacy = options.integration === 'legacy';\n this.isIntegration = options.integration !== 'legacy';\n };\n\n _default.prototype._aliasViewRegistry = function _aliasViewRegistry() {\n this._originalGlobalViewRegistry = _ember['default'].View.views;\n var viewRegistry = this.container.lookup('-view-registry:main');\n\n if (viewRegistry) {\n _ember['default'].View.views = viewRegistry;\n }\n };\n\n _default.prototype._resetViewRegistry = function _resetViewRegistry() {\n _ember['default'].View.views = this._originalGlobalViewRegistry;\n };\n\n _default.prototype.setupComponentUnitTest = function setupComponentUnitTest() {\n var _this = this;\n var resolver = this.resolver;\n var context = this.context;\n\n var layoutName = 'template:components/' + this.componentName;\n\n var layout = resolver.resolve(layoutName);\n\n var thingToRegisterWith = this.registry || this.container;\n if (layout) {\n thingToRegisterWith.register(layoutName, layout);\n thingToRegisterWith.injection(this.subjectName, 'layout', layoutName);\n }\n\n context.dispatcher = this.container.lookup('event_dispatcher:main') || _ember['default'].EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n\n context._element = null;\n\n this.callbacks.render = function () {\n var subject;\n\n _ember['default'].run(function () {\n subject = context.subject();\n subject.appendTo('#ember-testing');\n });\n\n context._element = subject.element;\n\n _this.teardownSteps.unshift(function () {\n _ember['default'].run(function () {\n _ember['default'].tryInvoke(subject, 'destroy');\n });\n });\n };\n\n this.callbacks.append = function () {\n _ember['default'].deprecate('this.append() is deprecated. Please use this.render() or this.$() instead.', false, { id: 'ember-test-helpers.test-module-for-component.append', until: '0.6.0' });\n return context.$();\n };\n\n context.$ = function () {\n this.render();\n var subject = this.subject();\n\n return subject.$.apply(subject, arguments);\n };\n };\n\n _default.prototype.setupComponentIntegrationTest = function setupComponentIntegrationTest() {\n if (isPreGlimmer) {\n return _legacyOverrides.preGlimmerSetupIntegrationForComponent.apply(this, arguments);\n } else {\n return _setupComponentIntegrationTest.apply(this, arguments);\n }\n };\n\n _default.prototype.setupContext = function setupContext() {\n _TestModule.prototype.setupContext.call(this);\n\n // only setup the injection if we are running against a version\n // of Ember that has `-view-registry:main` (Ember >= 1.12)\n if (this.container.lookupFactory('-view-registry:main')) {\n (this.registry || this.container).injection('component', '_viewRegistry', '-view-registry:main');\n }\n\n if (!this.isUnitTest && !this.isLegacy) {\n this.context.factory = function () {};\n }\n };\n\n _default.prototype.teardownComponent = function teardownComponent() {\n var component = this.component;\n if (component) {\n _ember['default'].run(component, 'destroy');\n this.component = null;\n }\n };\n\n return _default;\n })(_testModule['default']);\n\n exports['default'] = _default;\n\n function _setupComponentIntegrationTest() {\n var module = this;\n var context = this.context;\n\n this.actionHooks = context[ACTION_KEY] = {};\n context.dispatcher = this.container.lookup('event_dispatcher:main') || _ember['default'].EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n\n var hasRendered = false;\n var OutletView = module.container.lookupFactory('view:-outlet');\n var OutletTemplate = module.container.lookup('template:-outlet');\n var toplevelView = module.component = OutletView.create();\n var hasOutletTemplate = !!OutletTemplate;\n var outletState = {\n render: {\n owner: getOwner ? getOwner(module.container) : undefined,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: module.context,\n ViewClass: undefined,\n template: OutletTemplate\n },\n\n outlets: {}\n };\n\n var element = document.getElementById('ember-testing');\n var templateId = 0;\n\n if (hasOutletTemplate) {\n _ember['default'].run(function () {\n toplevelView.setOutletState(outletState);\n });\n }\n\n context.render = function (template) {\n if (!template) {\n throw new Error(\"in a component integration test you must pass a template to `render()`\");\n }\n if (_ember['default'].isArray(template)) {\n template = template.join('');\n }\n if (typeof template === 'string') {\n template = _ember['default'].Handlebars.compile(template);\n }\n\n var templateFullName = 'template:-undertest-' + ++templateId;\n this.registry.register(templateFullName, template);\n var stateToRender = {\n owner: getOwner ? getOwner(module.container) : undefined,\n into: undefined,\n outlet: 'main',\n name: 'index',\n controller: module.context,\n ViewClass: undefined,\n template: module.container.lookup(templateFullName),\n outlets: {}\n };\n\n if (hasOutletTemplate) {\n stateToRender.name = 'index';\n outletState.outlets.main = { render: stateToRender, outlets: {} };\n } else {\n stateToRender.name = 'application';\n outletState = { render: stateToRender, outlets: {} };\n }\n\n _ember['default'].run(function () {\n toplevelView.setOutletState(outletState);\n });\n\n if (!hasRendered) {\n _ember['default'].run(module.component, 'appendTo', '#ember-testing');\n hasRendered = true;\n }\n\n // ensure the element is based on the wrapping toplevel view\n // Ember still wraps the main application template with a\n // normal tagged view\n context._element = element = document.querySelector('#ember-testing > .ember-view');\n };\n\n context.$ = function (selector) {\n // emulates Ember internal behavor of `this.$` in a component\n // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18\n return selector ? _ember['default'].$(selector, element) : _ember['default'].$(element);\n };\n\n context.set = function (key, value) {\n var ret = _ember['default'].run(function () {\n return _ember['default'].set(context, key, value);\n });\n\n if (_hasEmberVersion['default'](2, 0)) {\n return ret;\n }\n };\n\n context.setProperties = function (hash) {\n var ret = _ember['default'].run(function () {\n return _ember['default'].setProperties(context, hash);\n });\n\n if (_hasEmberVersion['default'](2, 0)) {\n return ret;\n }\n };\n\n context.get = function (key) {\n return _ember['default'].get(context, key);\n };\n\n context.getProperties = function () {\n var args = Array.prototype.slice.call(arguments);\n return _ember['default'].getProperties(context, args);\n };\n\n context.on = function (actionName, handler) {\n module.actionHooks[actionName] = handler;\n };\n\n context.send = function (actionName) {\n var hook = module.actionHooks[actionName];\n if (!hook) {\n throw new Error(\"integration testing template received unexpected action \" + actionName);\n }\n hook.apply(module.context, Array.prototype.slice.call(arguments, 1));\n };\n\n context.clearRender = function () {\n _ember['default'].run(function () {\n toplevelView.setOutletState({\n render: {\n owner: module.container,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: module.context,\n ViewClass: undefined,\n template: undefined\n },\n outlets: {}\n });\n });\n };\n }\n});","define('ember-test-helpers/test-module-for-integration', ['exports', 'ember', './abstract-test-module', './test-resolver', './build-registry', './has-ember-version', './-legacy-overrides', './test-module-for-component'], function (exports, _ember, _abstractTestModule, _testResolver, _buildRegistry, _hasEmberVersion, _legacyOverrides, _testModuleForComponent) {\n 'use strict';\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n var ACTION_KEY = undefined;\n if (_hasEmberVersion['default'](2, 0)) {\n ACTION_KEY = 'actions';\n } else {\n ACTION_KEY = '_actions';\n }\n\n var isPreGlimmer = !_hasEmberVersion['default'](1, 13);\n\n var _default = (function (_AbstractTestModule) {\n _inherits(_default, _AbstractTestModule);\n\n function _default() {\n _classCallCheck(this, _default);\n\n _AbstractTestModule.apply(this, arguments);\n this.resolver = this.callbacks.resolver || _testResolver.getResolver();\n }\n\n _default.prototype.initSetupSteps = function initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContainer);\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n this.setupSteps.push(this.setupComponentIntegrationTest);\n\n if (_ember['default'].View && _ember['default'].View.views) {\n this.setupSteps.push(this._aliasViewRegistry);\n }\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n };\n\n _default.prototype.initTeardownSteps = function initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownContainer);\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownAJAXListeners);\n this.teardownSteps.push(this.teardownComponent);\n\n if (_ember['default'].View && _ember['default'].View.views) {\n this.teardownSteps.push(this._resetViewRegistry);\n }\n\n this.teardownSteps.push(this.teardownTestElements);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n };\n\n _default.prototype.setupContainer = function setupContainer() {\n var resolver = this.resolver;\n var items = _buildRegistry['default'](resolver);\n\n this.container = items.container;\n this.registry = items.registry;\n\n if (_hasEmberVersion['default'](1, 13)) {\n var thingToRegisterWith = this.registry || this.container;\n var router = resolver.resolve('router:main');\n router = router || _ember['default'].Router.extend();\n thingToRegisterWith.register('router:main', router);\n }\n };\n\n _default.prototype.setupContext = function setupContext() {\n var subjectName = this.subjectName;\n var container = this.container;\n\n var factory = function factory() {\n return container.lookupFactory(subjectName);\n };\n\n _AbstractTestModule.prototype.setupContext.call(this, {\n container: this.container,\n registry: this.registry,\n factory: factory,\n register: function register() {\n var target = this.registry || this.container;\n return target.register.apply(target, arguments);\n }\n });\n\n var context = this.context;\n\n if (_ember['default'].setOwner) {\n _ember['default'].setOwner(context, this.container.owner);\n }\n\n if (_ember['default'].inject) {\n var keys = (Object.keys || _ember['default'].keys)(_ember['default'].inject);\n keys.forEach(function (typeName) {\n context.inject[typeName] = function (name, opts) {\n var alias = opts && opts.as || name;\n _ember['default'].run(function () {\n _ember['default'].set(context, alias, context.container.lookup(typeName + ':' + name));\n });\n };\n });\n }\n\n // only setup the injection if we are running against a version\n // of Ember that has `-view-registry:main` (Ember >= 1.12)\n if (this.container.lookupFactory('-view-registry:main')) {\n (this.registry || this.container).injection('component', '_viewRegistry', '-view-registry:main');\n }\n };\n\n _default.prototype.setupComponentIntegrationTest = function setupComponentIntegrationTest() {\n if (isPreGlimmer) {\n return _legacyOverrides.preGlimmerSetupIntegrationForComponent.apply(this, arguments);\n } else {\n return _testModuleForComponent.setupComponentIntegrationTest.apply(this, arguments);\n }\n };\n\n _default.prototype.teardownComponent = function teardownComponent() {\n var component = this.component;\n if (component) {\n _ember['default'].run(function () {\n component.destroy();\n });\n }\n };\n\n _default.prototype.teardownContainer = function teardownContainer() {\n var container = this.container;\n _ember['default'].run(function () {\n container.destroy();\n });\n };\n\n // allow arbitrary named factories, like rspec let\n\n _default.prototype.contextualizeCallbacks = function contextualizeCallbacks() {\n var callbacks = this.callbacks;\n var context = this.context;\n\n this.cache = this.cache || {};\n this.cachedCalls = this.cachedCalls || {};\n\n var keys = (Object.keys || _ember['default'].keys)(callbacks);\n var keysLength = keys.length;\n\n if (keysLength) {\n for (var i = 0; i < keysLength; i++) {\n this._contextualizeCallback(context, keys[i], context);\n }\n }\n };\n\n _default.prototype._contextualizeCallback = function _contextualizeCallback(context, key, callbackContext) {\n var _this = this;\n var callbacks = this.callbacks;\n var factory = context.factory;\n\n context[key] = function (options) {\n if (_this.cachedCalls[key]) {\n return _this.cache[key];\n }\n\n var result = callbacks[key].call(callbackContext, options, factory());\n\n _this.cache[key] = result;\n _this.cachedCalls[key] = true;\n\n return result;\n };\n };\n\n _default.prototype._aliasViewRegistry = function _aliasViewRegistry() {\n this._originalGlobalViewRegistry = _ember['default'].View.views;\n var viewRegistry = this.container.lookup('-view-registry:main');\n\n if (viewRegistry) {\n _ember['default'].View.views = viewRegistry;\n }\n };\n\n _default.prototype._resetViewRegistry = function _resetViewRegistry() {\n _ember['default'].View.views = this._originalGlobalViewRegistry;\n };\n\n return _default;\n })(_abstractTestModule['default']);\n\n exports['default'] = _default;\n});","define('ember-test-helpers/test-module-for-model', ['exports', './test-module', 'ember'], function (exports, _testModule, _ember) {\n /* global DS, require, requirejs */ // added here to prevent an import from erroring when ED is not present\n\n 'use strict';\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n var _default = (function (_TestModule) {\n _inherits(_default, _TestModule);\n\n function _default(modelName, description, callbacks) {\n _classCallCheck(this, _default);\n\n _TestModule.call(this, 'model:' + modelName, description, callbacks);\n\n this.modelName = modelName;\n\n this.setupSteps.push(this.setupModel);\n }\n\n _default.prototype.setupModel = function setupModel() {\n var container = this.container;\n var defaultSubject = this.defaultSubject;\n var callbacks = this.callbacks;\n var modelName = this.modelName;\n\n var adapterFactory = container.lookupFactory('adapter:application');\n if (!adapterFactory) {\n if (requirejs.entries['ember-data/adapters/json-api']) {\n adapterFactory = require('ember-data/adapters/json-api')['default'];\n }\n\n // when ember-data/adapters/json-api is provided via ember-cli shims\n // using Ember Data 1.x the actual JSONAPIAdapter isn't found, but the\n // above require statement returns a bizzaro object with only a `default`\n // property (circular reference actually)\n if (!adapterFactory || !adapterFactory.create) {\n adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter;\n }\n\n var thingToRegisterWith = this.registry || this.container;\n thingToRegisterWith.register('adapter:application', adapterFactory);\n }\n\n callbacks.store = function () {\n var container = this.container;\n return container.lookup('service:store') || container.lookup('store:main');\n };\n\n if (callbacks.subject === defaultSubject) {\n callbacks.subject = function (options) {\n var container = this.container;\n\n return _ember['default'].run(function () {\n var store = container.lookup('service:store') || container.lookup('store:main');\n return store.createRecord(modelName, options);\n });\n };\n }\n };\n\n return _default;\n })(_testModule['default']);\n\n exports['default'] = _default;\n});","define('ember-test-helpers/test-module', ['exports', 'ember', './abstract-test-module', './test-resolver', './build-registry', './has-ember-version'], function (exports, _ember, _abstractTestModule, _testResolver, _buildRegistry, _hasEmberVersion) {\n 'use strict';\n\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\n function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n var _default = (function (_AbstractTestModule) {\n _inherits(_default, _AbstractTestModule);\n\n function _default(subjectName, description, callbacks) {\n _classCallCheck(this, _default);\n\n // Allow `description` to be omitted, in which case it should\n // default to `subjectName`\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = subjectName;\n }\n\n _AbstractTestModule.call(this, description || subjectName, callbacks);\n\n this.subjectName = subjectName;\n this.description = description || subjectName;\n this.resolver = this.callbacks.resolver || _testResolver.getResolver();\n\n if (this.callbacks.integration && this.callbacks.needs) {\n throw new Error(\"cannot declare 'integration: true' and 'needs' in the same module\");\n }\n\n if (this.callbacks.integration) {\n this.initIntegration(callbacks);\n delete callbacks.integration;\n }\n\n this.initSubject();\n this.initNeeds();\n }\n\n _default.prototype.initIntegration = function initIntegration(options) {\n if (options.integration === 'legacy') {\n throw new Error('`integration: \\'legacy\\'` is only valid for component tests.');\n }\n this.isIntegration = true;\n };\n\n _default.prototype.initSubject = function initSubject() {\n this.callbacks.subject = this.callbacks.subject || this.defaultSubject;\n };\n\n _default.prototype.initNeeds = function initNeeds() {\n this.needs = [this.subjectName];\n if (this.callbacks.needs) {\n this.needs = this.needs.concat(this.callbacks.needs);\n delete this.callbacks.needs;\n }\n };\n\n _default.prototype.initSetupSteps = function initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContainer);\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n };\n\n _default.prototype.initTeardownSteps = function initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownSubject);\n this.teardownSteps.push(this.teardownContainer);\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownTestElements);\n this.teardownSteps.push(this.teardownAJAXListeners);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n };\n\n _default.prototype.setupContainer = function setupContainer() {\n if (this.isIntegration || this.isLegacy) {\n this._setupIntegratedContainer();\n } else {\n this._setupIsolatedContainer();\n }\n };\n\n _default.prototype.setupContext = function setupContext() {\n var subjectName = this.subjectName;\n var container = this.container;\n\n var factory = function factory() {\n return container.lookupFactory(subjectName);\n };\n\n _AbstractTestModule.prototype.setupContext.call(this, {\n container: this.container,\n registry: this.registry,\n factory: factory,\n register: function register() {\n var target = this.registry || this.container;\n return target.register.apply(target, arguments);\n }\n });\n\n if (_ember['default'].setOwner) {\n _ember['default'].setOwner(this.context, this.container.owner);\n }\n\n this.setupInject();\n };\n\n _default.prototype.setupInject = function setupInject() {\n var module = this;\n var context = this.context;\n\n if (_ember['default'].inject) {\n var keys = (Object.keys || _ember['default'].keys)(_ember['default'].inject);\n\n keys.forEach(function (typeName) {\n context.inject[typeName] = function (name, opts) {\n var alias = opts && opts.as || name;\n _ember['default'].run(function () {\n _ember['default'].set(context, alias, module.container.lookup(typeName + ':' + name));\n });\n };\n });\n }\n };\n\n _default.prototype.teardownSubject = function teardownSubject() {\n var subject = this.cache.subject;\n\n if (subject) {\n _ember['default'].run(function () {\n _ember['default'].tryInvoke(subject, 'destroy');\n });\n }\n };\n\n _default.prototype.teardownContainer = function teardownContainer() {\n var container = this.container;\n _ember['default'].run(function () {\n container.destroy();\n });\n };\n\n _default.prototype.defaultSubject = function defaultSubject(options, factory) {\n return factory.create(options);\n };\n\n // allow arbitrary named factories, like rspec let\n\n _default.prototype.contextualizeCallbacks = function contextualizeCallbacks() {\n var callbacks = this.callbacks;\n var context = this.context;\n\n this.cache = this.cache || {};\n this.cachedCalls = this.cachedCalls || {};\n\n var keys = (Object.keys || _ember['default'].keys)(callbacks);\n var keysLength = keys.length;\n\n if (keysLength) {\n var deprecatedContext = this._buildDeprecatedContext(this, context);\n for (var i = 0; i < keysLength; i++) {\n this._contextualizeCallback(context, keys[i], deprecatedContext);\n }\n }\n };\n\n _default.prototype._contextualizeCallback = function _contextualizeCallback(context, key, callbackContext) {\n var _this = this;\n var callbacks = this.callbacks;\n var factory = context.factory;\n\n context[key] = function (options) {\n if (_this.cachedCalls[key]) {\n return _this.cache[key];\n }\n\n var result = callbacks[key].call(callbackContext, options, factory());\n\n _this.cache[key] = result;\n _this.cachedCalls[key] = true;\n\n return result;\n };\n };\n\n /*\n Builds a version of the passed in context that contains deprecation warnings\n for accessing properties that exist on the module.\n */\n\n _default.prototype._buildDeprecatedContext = function _buildDeprecatedContext(module, context) {\n var deprecatedContext = Object.create(context);\n\n var keysForDeprecation = Object.keys(module);\n\n for (var i = 0, l = keysForDeprecation.length; i < l; i++) {\n this._proxyDeprecation(module, deprecatedContext, keysForDeprecation[i]);\n }\n\n return deprecatedContext;\n };\n\n /*\n Defines a key on an object to act as a proxy for deprecating the original.\n */\n\n _default.prototype._proxyDeprecation = function _proxyDeprecation(obj, proxy, key) {\n if (typeof proxy[key] === 'undefined') {\n Object.defineProperty(proxy, key, {\n get: function get() {\n _ember['default'].deprecate('Accessing the test module property \"' + key + '\" from a callback is deprecated.', false, { id: 'ember-test-helpers.test-module.callback-context', until: '0.6.0' });\n return obj[key];\n }\n });\n }\n };\n\n _default.prototype._setupContainer = function _setupContainer(isolated) {\n var resolver = this.resolver;\n\n var items = _buildRegistry['default'](!isolated ? resolver : Object.create(resolver, {\n resolve: {\n value: function value() {}\n }\n }));\n\n this.container = items.container;\n this.registry = items.registry;\n\n if (_hasEmberVersion['default'](1, 13)) {\n var thingToRegisterWith = this.registry || this.container;\n var router = resolver.resolve('router:main');\n router = router || _ember['default'].Router.extend();\n thingToRegisterWith.register('router:main', router);\n }\n };\n\n _default.prototype._setupIsolatedContainer = function _setupIsolatedContainer() {\n var resolver = this.resolver;\n this._setupContainer(true);\n\n var thingToRegisterWith = this.registry || this.container;\n\n for (var i = this.needs.length; i > 0; i--) {\n var fullName = this.needs[i - 1];\n var normalizedFullName = resolver.normalize(fullName);\n thingToRegisterWith.register(fullName, resolver.resolve(normalizedFullName));\n }\n\n if (!this.registry) {\n this.container.resolver = function () {};\n }\n };\n\n _default.prototype._setupIntegratedContainer = function _setupIntegratedContainer() {\n this._setupContainer();\n };\n\n return _default;\n })(_abstractTestModule['default']);\n\n exports['default'] = _default;\n});","define('ember-test-helpers/test-resolver', ['exports'], function (exports) {\n 'use strict';\n\n exports.setResolver = setResolver;\n exports.getResolver = getResolver;\n var __resolver__;\n\n function setResolver(resolver) {\n __resolver__ = resolver;\n }\n\n function getResolver() {\n if (__resolver__ == null) {\n throw new Error('you must set a resolver with `testResolver.set(resolver)`');\n }\n\n return __resolver__;\n }\n});","define('ember-test-helpers/wait', ['exports', 'ember'], function (exports, _ember) {\n /* globals self */\n\n 'use strict';\n\n exports._teardownAJAXHooks = _teardownAJAXHooks;\n exports._setupAJAXHooks = _setupAJAXHooks;\n exports['default'] = wait;\n\n var jQuery = _ember['default'].$;\n\n var requests;\n function incrementAjaxPendingRequests(_, xhr) {\n requests.push(xhr);\n }\n\n function decrementAjaxPendingRequests(_, xhr) {\n for (var i = 0; i < requests.length; i++) {\n if (xhr === requests[i]) {\n requests.splice(i, 1);\n }\n }\n }\n\n function _teardownAJAXHooks() {\n if (!jQuery) {\n return;\n }\n\n jQuery(document).off('ajaxSend', incrementAjaxPendingRequests);\n jQuery(document).off('ajaxComplete', decrementAjaxPendingRequests);\n }\n\n function _setupAJAXHooks() {\n requests = [];\n\n if (!jQuery) {\n return;\n }\n\n jQuery(document).on('ajaxSend', incrementAjaxPendingRequests);\n jQuery(document).on('ajaxComplete', decrementAjaxPendingRequests);\n }\n\n var _internalCheckWaiters;\n if (_ember['default'].__loader.registry['ember-testing/test/waiters']) {\n _internalCheckWaiters = _ember['default'].__loader.require('ember-testing/test/waiters').checkWaiters;\n }\n\n function checkWaiters() {\n if (_internalCheckWaiters) {\n return _internalCheckWaiters();\n } else if (_ember['default'].Test.waiters) {\n if (_ember['default'].Test.waiters.any(function (_ref) {\n var context = _ref[0];\n var callback = _ref[1];\n return !callback.call(context);\n })) {\n return true;\n }\n }\n\n return false;\n }\n\n function wait(_options) {\n var options = _options || {};\n var waitForTimers = options.hasOwnProperty('waitForTimers') ? options.waitForTimers : true;\n var waitForAJAX = options.hasOwnProperty('waitForAJAX') ? options.waitForAJAX : true;\n var waitForWaiters = options.hasOwnProperty('waitForWaiters') ? options.waitForWaiters : true;\n\n return new _ember['default'].RSVP.Promise(function (resolve) {\n var watcher = self.setInterval(function () {\n if (waitForTimers && (_ember['default'].run.hasScheduledTimers() || _ember['default'].run.currentRunLoop)) {\n return;\n }\n\n if (waitForAJAX && requests && requests.length > 0) {\n return;\n }\n\n if (waitForWaiters && checkWaiters()) {\n return;\n }\n\n // Stop polling\n self.clearInterval(watcher);\n\n // Synchronously resolve the promise\n _ember['default'].run(null, resolve);\n }, 10);\n });\n }\n});","define(\"qunit\", [\"exports\"], function (exports) {\n /* globals QUnit */\n\n \"use strict\";\n\n var _module = QUnit.module;\n exports.module = _module;\n var test = QUnit.test;\n exports.test = test;\n var skip = QUnit.skip;\n exports.skip = skip;\n var only = QUnit.only;\n\n exports.only = only;\n exports[\"default\"] = QUnit;\n});"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"ember-qunit.amd.js"}