Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing msg argument for change related assertions #606

Merged
merged 2 commits into from
Feb 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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