Skip to content

Commit

Permalink
feat(assertions): add 'still' language chain (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottRudiger authored and meeber committed Sep 20, 2018
1 parent 6da897d commit 0064f26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions lib/chai/core/assertions.js
Expand Up @@ -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);
});

Expand Down
8 changes: 4 additions & 4 deletions test/expect.js
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions test/should.js
Expand Up @@ -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() {
Expand Down

0 comments on commit 0064f26

Please sign in to comment.