12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- /*!
- * chai
- * Copyright(c) 2011-2012 Jake Luer <jake@alogicalparadox.com>
- * MIT Licensed
- */
- var used = []
- , exports = module.exports = {};
- /*!
- * Chai version
- */
- exports.version = '1.2.0';
- /*!
- * Primary `Assertion` prototype
- */
- exports.Assertion = require('./chai/assertion');
- /*!
- * Assertion Error
- */
- exports.AssertionError = require('./chai/error');
- /*!
- * Utils for plugins (not exported)
- */
- var util = require('./chai/utils');
- /**
- * # .use(function)
- *
- * Provides a way to extend the internals of Chai
- *
- * @param {Function}
- * @returns {this} for chaining
- * @api public
- */
- exports.use = function (fn) {
- if (!~used.indexOf(fn)) {
- fn(this, util);
- used.push(fn);
- }
- return this;
- };
- /*!
- * Core Assertions
- */
- var core = require('./chai/core/assertions');
- exports.use(core);
- /*!
- * Expect interface
- */
- var expect = require('./chai/interface/expect');
- exports.use(expect);
- /*!
- * Should interface
- */
- var should = require('./chai/interface/should');
- exports.use(should);
- /*!
- * Assert interface
- */
- var assert = require('./chai/interface/assert');
- exports.use(assert);
|