"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const src_1 = require("../../../src");
const axios_mock_adapter_1 = __importDefault(require("axios-mock-adapter"));
const DogeMccConnection = {
    url: process.env.DOGE_URL || "",
    username: process.env.DOGE_USERNAME || "",
    password: process.env.DOGE_PASSWORD || "",
};
describe("Chain tips test ", function () {
    let MccClient;
    let mock;
    before(async function () {
        MccClient = new src_1.MCC.DOGE(DogeMccConnection);
        mock = new axios_mock_adapter_1.default(MccClient.client, { onNoMatch: "passthrough" });
        const latest = 4410875;
        mock
            .onPost("", {
            // asymmetricMatch: (actual: any) => actual.method === "getblockcount",
            jsonrpc: "1.0",
            id: "rpc",
            method: "getblockcount",
            params: [],
        })
            .reply(200, { result: latest + 3 });
    });
    after(async function () {
        mock.reset();
    });
    it("Should get tips and all blocks to certain height ", async function () {
        // const height = await MccClient.getBlockHeight();
        // console.log(height);
        const tips = await MccClient.getTopLiteBlocks(5);
        // Most of the time eq
        // console.log(tips);
        (0, chai_1.expect)(tips.length).to.greaterThanOrEqual(6);
    });
});
//# sourceMappingURL=mock.tips.test.js.map