You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
1.2 KiB
92 lines
1.2 KiB
/*!
|
|
* chai
|
|
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
* MIT Licensed
|
|
*/
|
|
|
|
var used = [];
|
|
|
|
/*!
|
|
* Chai version
|
|
*/
|
|
|
|
exports.version = '4.3.3';
|
|
|
|
/*!
|
|
* Assertion Error
|
|
*/
|
|
|
|
exports.AssertionError = require('assertion-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(exports, util);
|
|
used.push(fn);
|
|
}
|
|
|
|
return exports;
|
|
};
|
|
|
|
/*!
|
|
* Utility Functions
|
|
*/
|
|
|
|
exports.util = util;
|
|
|
|
/*!
|
|
* Configuration
|
|
*/
|
|
|
|
var config = require('./chai/config');
|
|
exports.config = config;
|
|
|
|
/*!
|
|
* Primary `Assertion` prototype
|
|
*/
|
|
|
|
var assertion = require('./chai/assertion');
|
|
exports.use(assertion);
|
|
|
|
/*!
|
|
* 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);
|
|
|