Merge branch 'main' into combined-prs-branch
[e-mobility-charging-stations-simulator.git] / tests / utils / Utils.test.ts
index 0a8a488282bfe99c01b6f7d5c0fc81b2aa4934f6..bef31dd97eaf0512db552841410be0c4def5841d 100644 (file)
@@ -80,7 +80,7 @@ await describe('Utils test suite', async () => {
 
   await it('Verify convertToDate()', () => {
     expect(convertToDate(undefined)).toBe(undefined)
-    expect(convertToDate(null)).toBe(null)
+    expect(convertToDate(null)).toBe(undefined)
     expect(() => convertToDate('')).toThrow(new Error("Cannot convert to date: ''"))
     expect(() => convertToDate('00:70:61')).toThrow(new Error("Cannot convert to date: '00:70:61'"))
     expect(convertToDate(0)).toStrictEqual(new Date('1970-01-01T00:00:00.000Z'))
@@ -364,6 +364,8 @@ await describe('Utils test suite', async () => {
   await it('Verify isEmptyObject()', () => {
     expect(isEmptyObject({})).toBe(true)
     expect(isEmptyObject({ 1: 1, 2: 2 })).toBe(false)
+    expect(isEmptyObject([])).toBe(false)
+    expect(isEmptyObject([1, 2])).toBe(false)
     expect(isEmptyObject(new Map())).toBe(false)
     expect(isEmptyObject(new Set())).toBe(false)
     expect(isEmptyObject(new WeakMap())).toBe(false)