From: Jérôme Benoit Date: Wed, 25 Jan 2023 13:58:44 +0000 (+0100) Subject: Fix UT X-Git-Tag: v1.1.92~18 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=293aaa3118bbd8c6a6e7933f049d51031c134fa6;p=e-mobility-charging-stations-simulator.git Fix UT Signed-off-by: Jérôme Benoit --- diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index a826b367..21d5d137 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -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()', () => {