Permalink
Browse files

browser build

  • Loading branch information...
logicalparadox committed Jul 26, 2012
1 parent e6d69c3 commit ebb9840e6268781feb30c8f3554ce8a24267c580
Showing with 36 additions and 36 deletions.
  1. +36 −36 chai.js
View
72 chai.js
@@ -225,11 +225,11 @@
*/
Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual) {
- var msg = util.getMessage(this, arguments)
- , actual = util.getActual(this, arguments)
- , ok = util.test(this, arguments);
+ var ok = util.test(this, arguments);
if (!ok) {
+ var msg = util.getMessage(this, arguments)
+ , actual = util.getActual(this, arguments);
throw new AssertionError({
message: msg
, actual: actual
@@ -258,6 +258,38 @@
}); // module: chai/assertion.js
+ require.register("chai/browser/error.js", function(module, exports, require){
+ /*!
+ * chai
+ * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
+ * MIT Licensed
+ */
+
+ module.exports = AssertionError;
+
+ function AssertionError (options) {
+ options = options || {};
+ this.message = options.message;
+ this.actual = options.actual;
+ this.expected = options.expected;
+ this.operator = options.operator;
+
+ if (options.stackStartFunction && Error.captureStackTrace) {
+ var stackStartFunction = options.stackStartFunction;
+ Error.captureStackTrace(this, stackStartFunction);
+ }
+ }
+
+ AssertionError.prototype = Object.create(Error.prototype);
+ AssertionError.prototype.name = 'AssertionError';
+ AssertionError.prototype.constructor = AssertionError;
+
+ AssertionError.prototype.toString = function() {
+ return this.message;
+ };
+
+ }); // module: chai/browser/error.js
+
require.register("chai/core/assertions.js", function(module, exports, require){
/*!
* chai
@@ -1311,38 +1343,6 @@
}); // module: chai/core/assertions.js
- require.register("chai/browser/error.js", function(module, exports, require){
- /*!
- * chai
- * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
-
- module.exports = AssertionError;
-
- function AssertionError (options) {
- options = options || {};
- this.message = options.message;
- this.actual = options.actual;
- this.expected = options.expected;
- this.operator = options.operator;
-
- if (options.stackStartFunction && Error.captureStackTrace) {
- var stackStartFunction = options.stackStartFunction;
- Error.captureStackTrace(this, stackStartFunction);
- }
- }
-
- AssertionError.prototype = Object.create(Error.prototype);
- AssertionError.prototype.name = 'AssertionError';
- AssertionError.prototype.constructor = AssertionError;
-
- AssertionError.prototype.toString = function() {
- return this.message;
- };
-
- }); // module: chai/browser/error.js
-
require.register("chai/interface/assert.js", function(module, exports, require){
/*!
* chai
@@ -2708,7 +2708,7 @@
module.exports = function (obj, args) {
var actual = args[4];
- return 'undefined' !== actual ? actual : obj.obj;
+ return 'undefined' !== actual ? actual : obj._obj;
};
}); // module: chai/utils/getActual.js

0 comments on commit ebb9840

Please sign in to comment.