Skip to content

Commit 77565f7

Browse files
authored
feat: add also language chain (#1324)
* Add `also` language chain This would be helpful, as the property doesn't clash with other methods. * Add `also` to tests
1 parent 817284c commit 77565f7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/chai/core/assertions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module.exports = function (chai, _) {
3434
* - but
3535
* - does
3636
* - still
37+
* - also
3738
*
3839
* @name language chains
3940
* @namespace BDD
@@ -43,7 +44,7 @@ module.exports = function (chai, _) {
4344
[ 'to', 'be', 'been', 'is'
4445
, 'and', 'has', 'have', 'with'
4546
, 'that', 'which', 'at', 'of'
46-
, 'same', 'but', 'does', 'still' ].forEach(function (chain) {
47+
, 'same', 'but', 'does', 'still', "also" ].forEach(function (chain) {
4748
Assertion.addProperty(chain);
4849
});
4950

test/expect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ describe('expect', function () {
233233
[ 'to', 'be', 'been', 'is'
234234
, 'and', 'has', 'have', 'with'
235235
, 'that', 'which', 'at', 'of'
236-
, 'same', 'but', 'does', 'still' ].forEach(test);
236+
, 'same', 'but', 'does', 'still', 'also' ].forEach(test);
237237
});
238238

239239
describe("fail", function() {

0 commit comments

Comments
 (0)