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'))
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)