mirror of
https://github.com/chaijs/chai
synced 2024-11-14 15:57:10 +00:00
feat(assertions): add 'still' language chain (#1194)
This commit is contained in:
parent
6da897d072
commit
0064f26049
3 changed files with 13 additions and 12 deletions
|
@ -33,16 +33,17 @@ module.exports = function (chai, _) {
|
|||
* - same
|
||||
* - but
|
||||
* - does
|
||||
* - still
|
||||
*
|
||||
* @name language chains
|
||||
* @namespace BDD
|
||||
* @api public
|
||||
*/
|
||||
|
||||
[ 'to', 'be', 'been'
|
||||
, 'is', 'and', 'has', 'have'
|
||||
, 'with', 'that', 'which', 'at'
|
||||
, 'of', 'same', 'but', 'does' ].forEach(function (chain) {
|
||||
[ 'to', 'be', 'been', 'is'
|
||||
, 'and', 'has', 'have', 'with'
|
||||
, 'that', 'which', 'at', 'of'
|
||||
, 'same', 'but', 'does', 'still' ].forEach(function (chain) {
|
||||
Assertion.addProperty(chain);
|
||||
});
|
||||
|
||||
|
|
|
@ -230,10 +230,10 @@ describe('expect', function () {
|
|||
expect([1, 2, 3])[chain].contains(1);
|
||||
}
|
||||
|
||||
[ 'to', 'be', 'been'
|
||||
, 'is', 'and', 'has', 'have'
|
||||
, 'with', 'that', 'which', 'at'
|
||||
, 'of', 'same', 'but', 'does' ].forEach(test);
|
||||
[ 'to', 'be', 'been', 'is'
|
||||
, 'and', 'has', 'have', 'with'
|
||||
, 'that', 'which', 'at', 'of'
|
||||
, 'same', 'but', 'does', 'still' ].forEach(test);
|
||||
});
|
||||
|
||||
describe("fail", function() {
|
||||
|
|
|
@ -227,10 +227,10 @@ describe('should', function() {
|
|||
[1, 2, 3].should[chain].contains(1);
|
||||
}
|
||||
|
||||
[ 'to', 'be', 'been'
|
||||
, 'is', 'and', 'has', 'have'
|
||||
, 'with', 'that', 'which', 'at'
|
||||
, 'of', 'same', 'but', 'does' ].forEach(test);
|
||||
[ 'to', 'be', 'been', 'is'
|
||||
, 'and', 'has', 'have', 'with'
|
||||
, 'that', 'which', 'at', 'of'
|
||||
, 'same', 'but', 'does', 'still' ].forEach(test);
|
||||
});
|
||||
|
||||
describe("fail", function() {
|
||||
|
|
Loading…
Reference in a new issue