mirror of
https://github.com/chaijs/chai
synced 2024-11-15 08:17:14 +00:00
Update the compiled browser version.
This commit is contained in:
parent
92b8ffe589
commit
f8b840fcd4
1 changed files with 22 additions and 1 deletions
23
chai.js
23
chai.js
|
@ -929,7 +929,28 @@ Assertion.prototype.respondTo = function (method) {
|
|||
this.assert(
|
||||
'function' === typeof context
|
||||
, 'expected ' + this.inspect + ' to respond to ' + inspect(method)
|
||||
, 'expected ' + this.inspect + ' to respond to ' + inspect(method));
|
||||
, 'expected ' + this.inspect + ' to not respond to ' + inspect(method));
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* # .satisfy(method)
|
||||
*
|
||||
* Assert that passes a truth test.
|
||||
*
|
||||
* expect(1).to.satisfy(function(num) { num > 0; });
|
||||
*
|
||||
* @name satisfy
|
||||
* @param {Function} matcher
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Assertion.prototype.satisfy = function (matcher) {
|
||||
this.assert(
|
||||
matcher(this.obj)
|
||||
, 'expected ' + this.inspect + ' to satisfy ' + inspect(matcher)
|
||||
, 'expected ' + this.inspect + ' to not satisfy' + inspect(matcher));
|
||||
|
||||
return this;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue