dist/ember-testing.js in ember-source-2.15.0.beta.1 vs dist/ember-testing.js in ember-source-2.15.0.beta.2

- old
+ new

@@ -4,11 +4,11 @@ * @copyright Copyright 2011-2017 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.15.0-beta.1 + * @version 2.15.0-beta.2 */ var enifed, requireModule, Ember; var mainContext = this; // Used in ember-environment/lib/global.js @@ -226,10 +226,11 @@ </ul> @public @static @method registerDeprecationHandler + @for Ember.Debug @param handler {Function} A function to handle deprecation calls. @since 2.1.0 */ var registerHandler = function () {}; /*global __fail__*/ @@ -412,17 +413,11 @@ return _ret = new EmberError(message), (0, _emberBabel.possibleConstructorReturn)(_this, _ret); } var error = Error.call(_this, message); - - if (Error.captureStackTrace) { - Error.captureStackTrace(_this, EmberError); - } else { - _this.stack = error.stack; - } - + _this.stack = error.stack; _this.description = error.description; _this.fileName = error.fileName; _this.lineNumber = error.lineNumber; _this.message = error.message; _this.name = error.name; @@ -889,10 +884,11 @@ <li> <code>next</code> - A function that calls into the previously registered handler.</li> </ul> @public @static @method registerWarnHandler + @for Ember.Debug @param handler {Function} A function to handle warnings. @since 2.1.0 */ exports.registerHandler = registerHandler = function registerHandler(handler) { (0, _handlers.registerHandler)('warn', handler); @@ -2319,19 +2315,21 @@ lastPromise = _this; return _this; } - TestPromise.prototype.then = function then(onFulfillment) { + TestPromise.prototype.then = function then(_onFulfillment) { var _RSVP$Promise$prototy; + var onFulfillment = typeof _onFulfillment === 'function' ? function (result) { + return isolate(_onFulfillment, result); + } : undefined; + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } - return (_RSVP$Promise$prototy = _RSVP$Promise.prototype.then).call.apply(_RSVP$Promise$prototy, [this, function (result) { - return isolate(onFulfillment, result); - }].concat(args)); + return (_RSVP$Promise$prototy = _RSVP$Promise.prototype.then).call.apply(_RSVP$Promise$prototy, [this, onFulfillment].concat(args)); }; return TestPromise; }(_emberRuntime.RSVP.Promise);