2011-12-15 12:21:53 +00:00
|
|
|
/*!
|
|
|
|
* chai
|
|
|
|
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
|
|
|
* MIT Licensed
|
|
|
|
*/
|
2011-12-07 05:25:52 +00:00
|
|
|
|
|
|
|
var exports = module.exports = {};
|
|
|
|
|
2012-01-25 21:34:28 +00:00
|
|
|
exports.version = '0.1.7';
|
2011-12-07 05:25:52 +00:00
|
|
|
|
2011-12-15 12:21:23 +00:00
|
|
|
exports.expect = require('./interface/expect');
|
2011-12-07 05:25:52 +00:00
|
|
|
exports.assert = require('./interface/assert');
|
2011-12-15 10:30:39 +00:00
|
|
|
exports.should = require('./interface/should');
|
2011-12-07 05:25:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
exports.Assertion = require('./assertion');
|
2011-12-15 10:54:23 +00:00
|
|
|
exports.AssertionError = require('./error');
|
|
|
|
|
2012-01-27 00:13:41 +00:00
|
|
|
exports.inspect = require('./utils/inspect');
|
|
|
|
|
|
|
|
exports.use = function (fn) {
|
|
|
|
fn(this);
|
|
|
|
return this;
|
|
|
|
};
|
|
|
|
|
2011-12-15 10:54:23 +00:00
|
|
|
exports.fail = function (actual, expected, message, operator, stackStartFunction) {
|
|
|
|
throw new exports.AssertionError({
|
|
|
|
message: message,
|
|
|
|
actual: actual,
|
|
|
|
expected: expected,
|
|
|
|
operator: operator,
|
|
|
|
stackStartFunction: stackStartFunction
|
|
|
|
});
|
2012-01-25 21:34:28 +00:00
|
|
|
};
|