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

duplicated doesNotDecrease in TOC #1285

Closed
is2ei opened this issue Aug 16, 2019 · 0 comments · Fixed by #1286
Closed

duplicated doesNotDecrease in TOC #1285

is2ei opened this issue Aug 16, 2019 · 0 comments · Fixed by #1286

Comments

@is2ei
Copy link
Contributor

is2ei commented Aug 16, 2019

I found doesNotDecrease is duplicated in the TOC.
https://www.chaijs.com/api/assert/#method_doesnotdecrease
Screen Shot 2019-08-16 at 21 47 16

Also, I found the comments are not correct.

chai/chai.js

Lines 6994 to 7025 in 6441f3d

/**
* ### .doesNotDecreaseBy(function, object, property, delta, [message])
*
* Asserts that a function does not decreases a numeric object property or a function's return value by an amount (delta)
*
* var obj = { val: 10 };
* var fn = function() { obj.val = 5 };
* assert.doesNotDecreaseBy(fn, obj, 'val', 1);
*
* @name doesNotDecrease
* @param {Function} modifier function
* @param {Object} object or getter function
* @param {String} property name _optional_
* @param {Number} change amount (delta)
* @param {String} message _optional_
* @namespace Assert
* @api public
*/
assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) {
if (arguments.length === 4 && typeof obj === 'function') {
var tmpMsg = delta;
delta = prop;
msg = tmpMsg;
} else if (arguments.length === 3) {
delta = prop;
prop = null;
}
return new Assertion(fn, msg, assert.doesNotDecreaseBy, true)
.to.not.decrease(obj, prop).by(delta);
}

keithamus pushed a commit that referenced this issue Feb 4, 2021
Co-authored-by: Issei Horie <is2ei.horie@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant