UNPKG

@ledgerhq/coin-tron

Version:
28 lines 953 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const lastBlock_1 = require("./lastBlock"); const config_1 = __importDefault(require("../config")); describe("lastBlock", () => { beforeAll(() => { config_1.default.setCoinConfig(() => ({ status: { type: "active", }, explorer: { url: "https://tron.coin.ledger.com", }, })); }); it("returns last block info", async () => { // When const result = await (0, lastBlock_1.lastBlock)(); // Then expect(result.hash?.length).toBeGreaterThan(0); expect(result.height).toBeGreaterThan(0); expect(result.time).toBeInstanceOf(Date); }); }); //# sourceMappingURL=lastBlock.integ.test.js.map