Skip to content

Commit

Permalink
Merge pull request #606 from lucasfcosta/change-missing-message
Browse files Browse the repository at this point in the history
Fix missing msg argument for change related assertions
  • Loading branch information
keithamus committed Feb 1, 2016
2 parents 26131f6 + 28f7397 commit b369f25
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/chai/interface/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,7 @@ module.exports = function (chai, util) {
}

/**
* ### .changes(function, object, property)
* ### .changes(function, object, property, [message])
*
* Asserts that a function changes the value of a property
*
Expand All @@ -1361,12 +1361,12 @@ module.exports = function (chai, util) {
* @api public
*/

assert.changes = function (fn, obj, prop) {
new Assertion(fn).to.change(obj, prop);
assert.changes = function (fn, obj, prop, msg) {
new Assertion(fn, msg).to.change(obj, prop);
}

/**
* ### .doesNotChange(function, object, property)
* ### .doesNotChange(function, object, property, [message])
*
* Asserts that a function does not changes the value of a property
*
Expand All @@ -1383,12 +1383,12 @@ module.exports = function (chai, util) {
* @api public
*/

assert.doesNotChange = function (fn, obj, prop) {
new Assertion(fn).to.not.change(obj, prop);
assert.doesNotChange = function (fn, obj, prop, msg) {
new Assertion(fn, msg).to.not.change(obj, prop);
}

/**
* ### .increases(function, object, property)
* ### .increases(function, object, property, [message])
*
* Asserts that a function increases an object property
*
Expand All @@ -1405,12 +1405,12 @@ module.exports = function (chai, util) {
* @api public
*/

assert.increases = function (fn, obj, prop) {
new Assertion(fn).to.increase(obj, prop);
assert.increases = function (fn, obj, prop, msg) {
new Assertion(fn, msg).to.increase(obj, prop);
}

/**
* ### .doesNotIncrease(function, object, property)
* ### .doesNotIncrease(function, object, property, [message])
*
* Asserts that a function does not increase object property
*
Expand All @@ -1427,12 +1427,12 @@ module.exports = function (chai, util) {
* @api public
*/

assert.doesNotIncrease = function (fn, obj, prop) {
new Assertion(fn).to.not.increase(obj, prop);
assert.doesNotIncrease = function (fn, obj, prop, msg) {
new Assertion(fn, msg).to.not.increase(obj, prop);
}

/**
* ### .decreases(function, object, property)
* ### .decreases(function, object, property, [message])
*
* Asserts that a function decreases an object property
*
Expand All @@ -1449,12 +1449,12 @@ module.exports = function (chai, util) {
* @api public
*/

assert.decreases = function (fn, obj, prop) {
new Assertion(fn).to.decrease(obj, prop);
assert.decreases = function (fn, obj, prop, msg) {
new Assertion(fn, msg).to.decrease(obj, prop);
}

/**
* ### .doesNotDecrease(function, object, property)
* ### .doesNotDecrease(function, object, property, [message])
*
* Asserts that a function does not decreases an object property
*
Expand All @@ -1471,8 +1471,8 @@ module.exports = function (chai, util) {
* @api public
*/

assert.doesNotDecrease = function (fn, obj, prop) {
new Assertion(fn).to.not.decrease(obj, prop);
assert.doesNotDecrease = function (fn, obj, prop, msg) {
new Assertion(fn, msg).to.not.decrease(obj, prop);
}

/*!
Expand Down

0 comments on commit b369f25

Please sign in to comment.