UNPKG

@ledgerhq/coin-tezos

Version:
32 lines 1.31 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const config_1 = __importDefault(require("../config")); const tzkt_1 = require("../network/tzkt"); const config_2 = require("../test/config"); jest.setTimeout(2 * 60 * 1000); describe("TEZOS_MAX_TX_QUERIES", () => { const tezosConfig = config_2.mockConfig; const bigAccount = "tz1boBHAVpwcvKkNFAQHYr7mjxAz1PpVgKq7"; test("default have more than 100 txs", async () => { // Given config_1.default.setCoinConfig(() => tezosConfig); const txs = await (0, tzkt_1.fetchAllTransactions)(bigAccount); expect(txs.length).toBeGreaterThan(100); }); test("lowering it to 1 will only fetch a few txs", async () => { // Given config_1.default.setCoinConfig(() => ({ ...tezosConfig, explorer: { url: "https://xtz-tzkt-explorer.api.live.ledger.com", maxTxQuery: 1, }, })); const txs = await (0, tzkt_1.fetchAllTransactions)(bigAccount); expect(txs.length).toBeLessThanOrEqual(100); }); }); //# sourceMappingURL=synchronization.integ.test.js.map