From: Jérôme Benoit Date: Thu, 26 Jan 2023 19:38:27 +0000 (+0100) Subject: Improve isIterable() UT X-Git-Tag: v1.1.92~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d98f014c7958d0400f717f2704fb74bb1f7852e3;p=e-mobility-charging-stations-simulator.git Improve isIterable() UT Signed-off-by: Jérôme Benoit --- diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index 987ba7fb..019dc771 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -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);