Improve isIterable() UT
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 26 Jan 2023 19:38:27 +0000 (20:38 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 26 Jan 2023 19:38:27 +0000 (20:38 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
test/utils/UtilsTest.ts

index 987ba7fbb055e701fc4af28a2639781995a09778..019dc771b9bcb47fe25e3d3fcd1503be6db709a1 100644 (file)
@@ -151,6 +151,7 @@ describe('Utils test suite', () => {
     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([0, 1])).toBe(true);
     expect(Utils.isIterable({ 1: 1 })).toBe(false);
     expect(Utils.isIterable(new Map())).toBe(true);