@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 1.02 kB
JavaScript
;import{a as e}from"../../../__chunks__/chunk-W2ZRSENV.js";import"../../../__chunks__/chunk-URAH3NK6.js";import"../../../__chunks__/chunk-EXJ5ZTBR.js";import"../../../__chunks__/chunk-XBLU7KZJ.js";import{m as o}from"../../../__chunks__/chunk-HBP5N4FR.js";o();import s from"react";import{render as i}from"@testing-library/react";describe("TransactionsRow tests",()=>{beforeEach(()=>{jest.useFakeTimers(),jest.setSystemTime(new Date(2022,5,14))}),afterEach(()=>{jest.runOnlyPendingTimers(),jest.useRealTimers()}),it("should display short time",()=>{let t=i(s.createElement(e,{value:1640702304,short:!0,tooltip:!0})).getByTestId("timeAgo-"+1640702304);expect(t.textContent).toBe("167 days"),expect(t.getAttribute("title")).toBe("Dec 28, 2021 14:38:24 PM UTC")}),it("should display long time",()=>{let t=i(s.createElement(e,{value:1640702304})).getByTestId("timeAgo-"+1640702304);expect(t.textContent).toBe("167 days 6 hrs"),expect(t.getAttribute("title")).toBe(null)})});
//# sourceMappingURL=TimeAgo.test.js.map