UNPKG

@helium/http

Version:

HTTP library for interacting with the Helium blockchain API

22 lines 980 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Block_1 = __importDefault(require("../Block")); const Client_1 = __importDefault(require("../../Client")); test('create Block from HTTP response', () => { const block = new Block_1.default(new Client_1.default(), { transaction_count: 65, time: 1586713800, prev_hash: 'AVVPMgQux0CVulZliJ44qg_WNGsprorv22GirrYWs0o', height: 289053, hash: 'SE1pltNLxJ61U33wDvf8gP9j6poylKyF3fdbk7tsw4o', }); expect(block.transactionCount).toBe(65); expect(block.time).toBe(1586713800); expect(block.prevHash).toBe('AVVPMgQux0CVulZliJ44qg_WNGsprorv22GirrYWs0o'); expect(block.height).toBe(289053); expect(block.hash).toBe('SE1pltNLxJ61U33wDvf8gP9j6poylKyF3fdbk7tsw4o'); }); //# sourceMappingURL=Block.spec.js.map