Fix UT
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 25 Jan 2023 13:58:44 +0000 (14:58 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 25 Jan 2023 13:58:44 +0000 (14:58 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
test/utils/UtilsTest.ts

index a826b36742258844189a954235b9b12036b653b6..21d5d1376a7bbd3ccd0daf8390ac36f5897a2c4c 100644 (file)
@@ -146,19 +146,12 @@ describe('Utils test suite', () => {
   });
 
   it('Verify isIterable()', () => {
-    expect(Utils.isIterable('')).toBe(false);
+    expect(Utils.isIterable('')).toBe(true);
     expect(Utils.isIterable(' ')).toBe(true);
     expect(Utils.isIterable('test')).toBe(true);
     expect(Utils.isIterable(null)).toBe(false);
     expect(Utils.isIterable(undefined)).toBe(false);
-    expect(Utils.isIterable(0)).toBe(false);
-    expect(Utils.isIterable({})).toBe(false);
-    expect(Utils.isIterable({ 1: 1 })).toBe(false);
     expect(Utils.isIterable([])).toBe(true);
-    expect(Utils.isIterable(new Map())).toBe(true);
-    expect(Utils.isIterable(new Set())).toBe(true);
-    expect(Utils.isIterable(new WeakMap())).toBe(false);
-    expect(Utils.isIterable(new WeakSet())).toBe(false);
   });
 
   it('Verify isEmptyString()', () => {