"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

require("@polkadot/types/injector");

var _types = require("@polkadot/types");

var _static = _interopRequireDefault(require("@polkadot/types/Metadata/static"));

var _fromMetadata = _interopRequireDefault(require("../fromMetadata"));

// Copyright 2017-2019 @polkadot/api-metadata authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
// Use the pre-generated metadata
const metadata = new _types.Metadata(_static.default);
const consts = (0, _fromMetadata.default)(metadata);
describe('fromMetadata', () => {
  it('should return constants with the correct type and value', () => {
    expect(consts.democracy.cooloffPeriod).toBeInstanceOf((0, _types.ClassOf)('BlockNumber'));
    expect(consts.democracy.cooloffPeriod.toHex()).toEqual('0x000c4e00');
  });
});