dist/ember-testing.js in ember-source-2.10.2 vs dist/ember-testing.js in ember-source-2.11.0.beta.2
- old
+ new
@@ -4,15 +4,14 @@
* @copyright Copyright 2011-2016 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.10.2
+ * @version 2.11.0-beta.2
*/
var enifed, requireModule, Ember;
-var mainContext = this;
(function() {
var isNode = typeof window === 'undefined' &&
typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
@@ -110,12 +109,10 @@
enifed = Ember.__loader.define;
requireModule = Ember.__loader.require;
}
})();
-var babelHelpers;
-
function classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError('Cannot call a class as a function');
}
}
@@ -302,11 +299,10 @@
warning will be removed.
@param {String} [options.url] An optional url to the transition guide on the
emberjs.com website.
@for Ember
@public
- @since 1.0.0
*/
function deprecate(message, test, options) {
if (!options || !options.id && !options.until) {
deprecate(missingOptionsDeprecation, false, {
@@ -401,11 +397,10 @@
@param {String} desc A description of the assertion. This will become
the text of the Error thrown if the assertion fails.
@param {Boolean} test Must be truthy for the assertion to pass. If
falsy, an exception will be thrown.
@public
- @since 1.0.0
*/
_emberMetal.setDebugFunction('assert', function assert(desc, test) {
if (!test) {
throw new _emberMetal.Error('Assertion Failed: ' + desc);
}
@@ -724,11 +719,10 @@
`id` for this warning. The `id` can be used by Ember debugging tools
to change the behavior (raise, log, or silence) for that specific warning.
The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
@for Ember
@public
- @since 1.0.0
*/
function warn(message, test, options) {
if (!options) {
_emberMetal.deprecate(missingOptionsDeprecation, false, {
@@ -1685,11 +1679,10 @@
@method wait
@param {Object} value The value to be returned.
@return {RSVP.Promise}
@public
- @since 1.0.0
*/
function wait(app, value) {
return new _emberRuntime.RSVP.Promise(function (resolve) {
var router = app.__container__.lookup('router:main');
@@ -1759,11 +1752,13 @@
}
});
}
});
});
-enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/qunit'], function (exports, _emberMetal, _emberViews, _emberTestingTestAdapter, _emberTestingTestPending_requests, _emberTestingAdaptersQunit) {
+enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit'], function (exports, _emberMetal, _emberViews, _emberTestingTestAdapter, _emberTestingTestPending_requests, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit) {
+ /* global self */
+
'use strict';
exports.default = setupForTesting;
/**
@@ -1783,10 +1778,10 @@
_emberMetal.setTesting(true);
var adapter = _emberTestingTestAdapter.getAdapter();
// if adapter is not manually set default to QUnit
if (!adapter) {
- _emberTestingTestAdapter.setAdapter(new _emberTestingAdaptersQunit.default());
+ _emberTestingTestAdapter.setAdapter(typeof self.QUnit === 'undefined' ? new _emberTestingAdaptersAdapter.default() : new _emberTestingAdaptersQunit.default());
}
_emberViews.jQuery(document).off('ajaxSend', _emberTestingTestPending_requests.incrementPendingRequests);
_emberViews.jQuery(document).off('ajaxComplete', _emberTestingTestPending_requests.decrementPendingRequests);