From a00c9e2f69e558f4fb2091ba8326c1cdbb097d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Sat, 27 Jan 2024 20:32:35 +0100 Subject: [PATCH] Change `iterable` implementation to a property --- lib/chai/core/assertions.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index b90a8bd4..bec69d59 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -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')