Skip to content

Commit

Permalink
fix: wrong assertion types (#925)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `.change`, `.increase`, and `.decrease` changed from
Chainable Method Assertions to Method Assertions. They don't have any
chaining behavior, and there's no generic semantic benefit to chaining
them.
  • Loading branch information
meeber authored and lucasfcosta committed Feb 14, 2017
1 parent f937ee5 commit a7e1200
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/chai/core/assertions.js
Expand Up @@ -2083,8 +2083,8 @@ module.exports = function (chai, _) {
);
}

Assertion.addChainableMethod('change', assertChanges);
Assertion.addChainableMethod('changes', assertChanges);
Assertion.addMethod('change', assertChanges);
Assertion.addMethod('changes', assertChanges);

/**
* ### .increase(target[, property[, message]])
Expand Down Expand Up @@ -2147,8 +2147,8 @@ module.exports = function (chai, _) {
);
}

Assertion.addChainableMethod('increase', assertIncreases);
Assertion.addChainableMethod('increases', assertIncreases);
Assertion.addMethod('increase', assertIncreases);
Assertion.addMethod('increases', assertIncreases);

/**
* ### .decrease(target[, property[, message]])
Expand Down Expand Up @@ -2211,8 +2211,8 @@ module.exports = function (chai, _) {
);
}

Assertion.addChainableMethod('decrease', assertDecreases);
Assertion.addChainableMethod('decreases', assertDecreases);
Assertion.addMethod('decrease', assertDecreases);
Assertion.addMethod('decreases', assertDecreases);

/**
* ### .by
Expand Down

0 comments on commit a7e1200

Please sign in to comment.