X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=test%2Futils%2FUtilsTest.ts;h=705225b0398081c4dd09dcdf2b08232a991b797d;hb=082494a43d10cc61450c5f329655435beea7d638;hp=cb8b5d0893d86e0402e5afbfaa4bcfabc97346d7;hpb=bd9f680e5ac3b20551b7aafe1d844542cc7a0dab;p=e-mobility-charging-stations-simulator.git diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index cb8b5d08..705225b0 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -89,6 +89,19 @@ describe('Utils test suite', () => { expect(Utils.isEmptyString(new WeakSet())).toBe(false); }); + it('Verify isUndefined()', () => { + expect(Utils.isUndefined(undefined)).toBe(true); + expect(Utils.isUndefined(null)).toBe(false); + expect(Utils.isUndefined('')).toBe(false); + expect(Utils.isUndefined(0)).toBe(false); + expect(Utils.isUndefined({})).toBe(false); + expect(Utils.isUndefined([])).toBe(false); + expect(Utils.isUndefined(new Map())).toBe(false); + expect(Utils.isUndefined(new Set())).toBe(false); + expect(Utils.isUndefined(new WeakMap())).toBe(false); + expect(Utils.isUndefined(new WeakSet())).toBe(false); + }); + it('Verify isNullOrUndefined()', () => { expect(Utils.isNullOrUndefined(null)).toBe(true); expect(Utils.isNullOrUndefined(undefined)).toBe(true);