mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-21 15:25:09 +00:00
33 lines
747 B
JavaScript
33 lines
747 B
JavaScript
/*!
|
|
* chai
|
|
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
* MIT Licensed
|
|
*/
|
|
|
|
module.exports = function (chai, util) {
|
|
chai.expect = function (val, message) {
|
|
return new chai.Assertion(val, message);
|
|
};
|
|
|
|
/**
|
|
* ### .fail(actual, expected, [message], [operator])
|
|
*
|
|
* Throw a failure.
|
|
*
|
|
* @name fail
|
|
* @param {Mixed} actual
|
|
* @param {Mixed} expected
|
|
* @param {String} message
|
|
* @param {String} operator
|
|
* @api public
|
|
*/
|
|
|
|
chai.expect.fail = function (actual, expected, message, operator) {
|
|
message = message || 'expect.fail()';
|
|
throw new chai.AssertionError(message, {
|
|
actual: actual
|
|
, expected: expected
|
|
, operator: operator
|
|
}, chai.expect.fail);
|
|
};
|
|
};
|