Skip to content

Commit

Permalink
Change iterable implementation to a property
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Feb 11, 2024
1 parent df9485c commit 393e2ea
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/chai/core/assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3141,22 +3141,6 @@ function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
* @namespace BDD
* @api public
*/

Assertion.addMethod('iterable', function(msg) {
if (msg) flag(this, 'message', msg);
var obj = flag(this, 'object')
, flagMsg = flag(this, 'message')
, ssfi = flag(this, 'ssfi');

if (typeof obj === 'string' || !obj[Symbol.iterator]) {
throw new AssertionError(
`${flagMsg}: expected ${_.inspect(obj)} to be an iterable`,
undefined,
ssfi
);
}
});

Assertion.addMethod('members', function (subset, msg) {
if (msg) flag(this, 'message', msg);
var obj = flag(this, 'object')
Expand Down

0 comments on commit 393e2ea

Please sign in to comment.