"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const constants_1 = require("../../../../src/parachain/constants");
const factory_1 = require("../../../../src/factory");
const config_1 = require("../../../config");
describe("Constants", function () {
    this.timeout(10000); // API can be slightly slow
    let api;
    let constantAPI;
    before(() => __awaiter(this, void 0, void 0, function* () {
        api = yield factory_1.createSubstrateAPI(config_1.PARACHAIN_ENDPOINT);
        constantAPI = new constants_1.DefaultConstantsAPI(api);
    }));
    after(() => __awaiter(this, void 0, void 0, function* () {
        yield api.disconnect();
    }));
    describe("getSystemBlockHashCount", () => {
        it("should sucessfully return", () => __awaiter(this, void 0, void 0, function* () {
            const returnValue = constantAPI.getSystemBlockHashCount();
            chai_1.assert.isDefined(returnValue);
        })).timeout(500);
    });
    describe("getSystemDbWeight", () => {
        it("should sucessfully return", () => __awaiter(this, void 0, void 0, function* () {
            const returnValue = constantAPI.getSystemDbWeight();
            chai_1.assert.isDefined(returnValue);
        })).timeout(500);
    });
    describe("getTimestampMinimumPeriod", () => {
        it("should sucessfully return", () => __awaiter(this, void 0, void 0, function* () {
            const returnValue = constantAPI.getTimestampMinimumPeriod();
            chai_1.assert.isDefined(returnValue);
        })).timeout(500);
    });
    describe("getTransactionWeightToFee", () => {
        it("should sucessfully return", () => __awaiter(this, void 0, void 0, function* () {
            const returnValue = constantAPI.getTransactionWeightToFee();
            chai_1.assert.isDefined(returnValue);
        })).timeout(500);
    });
});
//# sourceMappingURL=constants.test.js.map