udpated compiled chai.js and added to browser tests

This commit is contained in:
Jeff Barczewski 2012-02-22 16:17:08 -06:00
parent 105fb02e98
commit f64cb3ab0e
2 changed files with 16 additions and 1 deletions

16
chai.js
View file

@ -100,6 +100,20 @@ var AssertionError = require('./error')
module.exports = Assertion;
/**
* # Assertion.includeStack
*
* Assertion.includeStack = true; // enable stack on error
*
* User configurable property, influences whether stack trace
* is included in Assertion error message. Default of false
* suppresses stack trace in the error message
*
* @api public
*
*/
Assertion.includeStack = false;
/*!
* # Assertion Constructor
*
@ -134,7 +148,7 @@ Assertion.prototype.assert = function (expr, msg, negateMsg) {
throw new AssertionError({
operator: this.msg,
message: msg,
stackStartFunction: this.ssfi
stackStartFunction: (Assertion.includeStack) ? this.assert : this.ssfi
});
}
};

View file

@ -11,6 +11,7 @@
<script src="../should.js"></script>
<script src="../assert.js"></script>
<script src="../plugins.js"></script>
<script src="../assert-config.js"></script>
<script>onload = function() {
mocha.run();
}