@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 1.1 kB
JavaScript
;import{a as u}from"../../../../../__chunks__/chunk-EXJ5ZTBR.js";import{m as a}from"../../../../../__chunks__/chunk-HBP5N4FR.js";a();describe("getHumanReadableTimeFormat",()=>{it("returns full readable date, non-UTC",()=>{let t=new Date(1993,3,23,8,33,12),e=t.getTime()/1e3,o=t.getUTCHours(),s=u({value:e,noSeconds:!1,utc:!1});expect(s).toEqual(`Apr 23, 1993 0${o}:33:12 AM`)}),it("returns readable date without seconds, non-UTC",()=>{let t=new Date(1993,3,23,8,33,12),e=t.getTime()/1e3,o=t.getUTCHours(),s=u({value:e,noSeconds:!0,utc:!1});expect(s).toEqual(`Apr 23, 1993 0${o}:33 AM`)}),it("returns full readable date in UTC",()=>{let t=new Date(1993,3,23,8,33,12),e=t.getTime()/1e3,o=!1,n=!0,c=t.getUTCHours(),s=u({value:e,noSeconds:o,utc:n});expect(s).toEqual(`Apr 23, 1993 0${c}:33:12 AM UTC`)}),it("returns full readable date without seconds in UTC",()=>{let t=new Date(1993,3,23,8,33,12),e=t.getTime()/1e3,o=!0,n=!0,c=t.getUTCHours(),s=u({value:e,noSeconds:o,utc:n});expect(s).toEqual(`Apr 23, 1993 0${c}:33 AM UTC`)})});
//# sourceMappingURL=getHumanReadableTimeFormat.test.js.map