dist/ember-testing.js in ember-source-2.0.0.beta.3 vs dist/ember-testing.js in ember-source-2.0.0.beta.5

- old
+ new

@@ -3,19 +3,20 @@ * @copyright Copyright 2011-2015 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 2.0.0-beta.3 + * @version 2.0.0-beta.5 */ (function() { var enifed, requireModule, eriuqer, requirejs, Ember; var mainContext = this; (function() { - var isNode = typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + var isNode = typeof window === 'undefined' && + typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; if (!isNode) { Ember = this.Ember = this.Ember || {}; } @@ -113,10 +114,14 @@ requirejs = eriuqer = requireModule = Ember.__loader.require; } })(); enifed('ember-debug', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-metal/error', 'ember-metal/logger', 'ember-debug/deprecation-manager', 'ember-metal/environment'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberMetalError, _emberMetalLogger, _emberDebugDeprecationManager, _emberMetalEnvironment) { + /*global __fail__*/ + + 'use strict'; + exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags; /** @module ember @submodule ember-debug @@ -434,12 +439,13 @@ exports.runningNonEmberDebugJS = runningNonEmberDebugJS; if (runningNonEmberDebugJS) { _emberMetalCore.default.warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.'); } }); -/*global __fail__*/ enifed('ember-debug/deprecation-manager', ['exports', 'ember-metal/dictionary', 'ember-metal/utils'], function (exports, _emberMetalDictionary, _emberMetalUtils) { + 'use strict'; + var deprecationLevels = { RAISE: _emberMetalUtils.symbol('RAISE'), LOG: _emberMetalUtils.symbol('LOG'), SILENCE: _emberMetalUtils.symbol('SILENCE') }; @@ -462,10 +468,12 @@ return level; } }; }); enifed('ember-testing', ['exports', 'ember-metal/core', 'ember-testing/initializers', 'ember-testing/support', 'ember-testing/setup_for_testing', 'ember-testing/test', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit', 'ember-testing/helpers'], function (exports, _emberMetalCore, _emberTestingInitializers, _emberTestingSupport, _emberTestingSetup_for_testing, _emberTestingTest, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit, _emberTestingHelpers) { + 'use strict'; + // adds helpers to helpers object in Test /** @module ember @submodule ember-testing @@ -477,10 +485,11 @@ _emberMetalCore.default.setupForTesting = _emberTestingSetup_for_testing.default; }); // to setup initializer // to handle various edge cases enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime/system/object'], function (exports, _emberRuntimeSystemObject) { + 'use strict'; function K() { return this; } @@ -534,10 +543,11 @@ }); exports.default = Adapter; }); enifed('ember-testing/adapters/qunit', ['exports', 'ember-testing/adapters/adapter', 'ember-metal/utils'], function (exports, _emberTestingAdaptersAdapter, _emberMetalUtils) { + 'use strict'; /** This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework. @@ -557,10 +567,11 @@ ok(false, _emberMetalUtils.inspect(error)); } }); }); enifed('ember-testing/helpers', ['exports', 'ember-metal/core', 'ember-metal/features', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/run_loop', 'ember-views/system/jquery', 'ember-testing/test', 'ember-runtime/ext/rsvp'], function (exports, _emberMetalCore, _emberMetalFeatures, _emberMetalProperty_get, _emberMetalError, _emberMetalRun_loop, _emberViewsSystemJquery, _emberTestingTest, _emberRuntimeExtRsvp) { + 'use strict'; /** @module ember @submodule ember-testing */ @@ -1077,10 +1088,11 @@ element on the DOM to uncheck @return {RSVP.Promise} @private */ enifed('ember-testing/initializers', ['exports', 'ember-runtime/system/lazy_load'], function (exports, _emberRuntimeSystemLazy_load) { + 'use strict'; var name = 'deferReadiness in `testing` mode'; _emberRuntimeSystemLazy_load.onLoad('Ember.Application', function (Application) { if (!Application.initializers[name]) { @@ -1095,10 +1107,12 @@ }); } }); }); enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal/core', 'ember-testing/adapters/qunit', 'ember-views/system/jquery'], function (exports, _emberMetalCore, _emberTestingAdaptersQunit, _emberViewsSystemJquery) { + 'use strict'; + exports.default = setupForTesting; var Test, requests; function incrementAjaxPendingRequests(_, xhr) { @@ -1150,10 +1164,11 @@ } }); // import Test from "ember-testing/test"; // ES6TODO: fix when cycles are supported enifed('ember-testing/support', ['exports', 'ember-metal/core', 'ember-views/system/jquery', 'ember-metal/environment'], function (exports, _emberMetalCore, _emberViewsSystemJquery, _emberMetalEnvironment) { + 'use strict'; /** @module ember @submodule ember-testing */ @@ -1195,16 +1210,17 @@ } }); // Try again to verify that the patch took effect or blow up. testCheckboxClick(function () { - _emberMetalCore.default.warn('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked); + _emberMetalCore.default.warn('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' }); }); }); } }); enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_loop', 'ember-runtime/ext/rsvp', 'ember-testing/setup_for_testing', 'ember-application/system/application'], function (exports, _emberMetalCore, _emberMetalRun_loop, _emberRuntimeExtRsvp, _emberTestingSetup_for_testing, _emberApplicationSystemApplication) { + 'use strict'; /** @module ember @submodule ember-testing */ @@ -1577,10 +1593,17 @@ this.helperContainer = helperContainer; } else { this.helperContainer = window; } + this.reopen({ + willDestroy: function () { + this._super.apply(this, arguments); + this.removeTestHelpers(); + } + }); + this.testHelpers = {}; for (var name in helpers) { this.originalMethods[name] = this.helperContainer[name]; this.testHelpers[name] = this.helperContainer[name] = helper(this, name); protoWrap(Test.Promise.prototype, name, helper(this, name), helpers[name].meta.wait); @@ -1606,9 +1629,10 @@ return; } for (var name in helpers) { this.helperContainer[name] = this.originalMethods[name]; + delete Test.Promise.prototype[name]; delete this.testHelpers[name]; delete this.originalMethods[name]; } } }); \ No newline at end of file